void* IAGSEngine::GetManagedObjectAddressByKey(int key) { void *object; ICCDynamicObject *manager; ScriptValueType obj_type = ccGetObjectAddressAndManagerFromHandle(key, object, manager); if (obj_type == kScValPluginObject) { GlobalReturnValue.SetPluginObject(object, manager); } else { GlobalReturnValue.SetDynamicObject(object, manager); } return object; }
void IAGSEngine::RegisterUnserializedObject(int key, const void *object, IAGSScriptManagedObject *callback) { GlobalReturnValue.SetPluginObject((void*)object, (ICCDynamicObject*)callback); ccRegisterUnserializedObject(key, object, (ICCDynamicObject*)callback, true); }
int IAGSEngine::RegisterManagedObject(const void *object, IAGSScriptManagedObject *callback) { GlobalReturnValue.SetPluginObject((void*)object, (ICCDynamicObject*)callback); return ccRegisterManagedObject(object, (ICCDynamicObject*)callback, true); }