|
|
@ -20,6 +20,7 @@ public partial class GameModule : CallbackHandler<GameModule> |
|
|
|
|
|
|
|
|
RunParticleEffect = CreateCallback<RunParticleEffectCallback>(Callback_RunParticleEffect), |
|
|
RunParticleEffect = CreateCallback<RunParticleEffectCallback>(Callback_RunParticleEffect), |
|
|
ParticleExplosion = CreateCallback<ParticleExplosionCallback>(Callback_ParticleExplosion), |
|
|
ParticleExplosion = CreateCallback<ParticleExplosionCallback>(Callback_ParticleExplosion), |
|
|
|
|
|
TeleportSplash = CreateCallback<TeleportSplashCallback>(Callback_TeleportSplash), |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
RegisterCallbacks(callbacks); |
|
|
RegisterCallbacks(callbacks); |
|
|
@ -39,6 +40,7 @@ public partial class GameModule : CallbackHandler<GameModule> |
|
|
|
|
|
|
|
|
public IntPtr RunParticleEffect; |
|
|
public IntPtr RunParticleEffect; |
|
|
public IntPtr ParticleExplosion; |
|
|
public IntPtr ParticleExplosion; |
|
|
|
|
|
public IntPtr TeleportSplash; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
@ -117,4 +119,15 @@ public partial class GameModule : CallbackHandler<GameModule> |
|
|
GetSelf(context).ParticleExplosion(origin.ToUnityPosition()); |
|
|
GetSelf(context).ParticleExplosion(origin.ToUnityPosition()); |
|
|
Profiler.EndSample(); |
|
|
Profiler.EndSample(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
|
|
|
private delegate void TeleportSplashCallback(IntPtr context, ref QVec3 origin); |
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallback(typeof(TeleportSplashCallback))] |
|
|
|
|
|
private static void Callback_TeleportSplash(IntPtr context, ref QVec3 origin) |
|
|
|
|
|
{ |
|
|
|
|
|
Profiler.BeginSample("TeleportSplash"); |
|
|
|
|
|
GetSelf(context).TeleportSplash(origin.ToUnityPosition()); |
|
|
|
|
|
Profiler.EndSample(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |