internal static IntPtr GetNativeInstance(VariantMap source) { if (source == null) { return(IntPtr.Zero); } return(source.NativeInstance); }
internal static IntPtr __ToPInvoke(VariantMap source) { if (source == null) { return(IntPtr.Zero); } return(source.instance_); }
public void SubscribeToEvent(Object sender, StringHash eventType, Action <VariantMap> function) { Urho3D_Object_SubscribeToEvent(__ToPInvoke(this), GCHandle.ToIntPtr(GCHandle.Alloc(function)), eventType.Hash, (gcHandle, type, args) => { var callback = (Action <VariantMap>)GCHandle.FromIntPtr(gcHandle).Target; callback.Invoke(VariantMap.__FromPInvoke(args, false)); }, __ToPInvoke(sender)); }
public void SubscribeToEvent(StringHash eventType, Action <StringHash, VariantMap> function) { Urho3D_Object_SubscribeToEvent(__ToPInvoke(this), GCHandle.ToIntPtr(GCHandle.Alloc(function)), eventType.Hash, (gcHandle, type, args) => { var callback = (Action <StringHash, VariantMap>)GCHandle.FromIntPtr(gcHandle).Target; callback.Invoke(StringHash.__FromPInvoke(type), VariantMap.__FromPInvoke(args)); }, IntPtr.Zero); }
public Enumerator(VariantMap hashMap) { _hashMap = hashMap; Reset(); }
private void HandleEventWithoutType(IntPtr gcHandle, uint type, IntPtr args) { var callback = (Action <VariantMap>)GCHandle.FromIntPtr(gcHandle).Target; callback.Invoke(VariantMap.__FromPInvoke(args, false)); }