@ -16,6 +16,7 @@ public partial class GameModule : CallbackHandler<GameModule>
SetEntityModel = CreateCallback < GameSetEntityModelCallback > ( Callback_GameSetEntityModel ) ,
SetEntityTransform = CreateCallback < GameSetEntityTransformCallback > ( Callback_GameSetEntityTransform ) ,
RemoveEntity = CreateCallback < GameRemoveEntityCallback > ( Callback_GameRemoveEntity ) ,
UpdateEntityAnimation = CreateCallback < GameUpdateEntityAnimationCallback > ( Callback_GameUpdateEntityAnimation ) ,
} ;
RegisterCallbacks ( callbacks ) ;
@ -32,6 +33,7 @@ public partial class GameModule : CallbackHandler<GameModule>
public IntPtr SetEntityModel ;
public IntPtr SetEntityTransform ;
public IntPtr RemoveEntity ;
public IntPtr UpdateEntityAnimation ;
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
@ -60,4 +62,13 @@ public partial class GameModule : CallbackHandler<GameModule>
{
GetSelf ( target ) . RemoveEntity ( entityNum ) ;
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate void GameUpdateEntityAnimationCallback ( IntPtr target , int entityNum , float frameNum ) ;
[MonoPInvokeCallback(typeof(GameUpdateEntityAnimationCallback))]
private static void Callback_GameUpdateEntityAnimation ( IntPtr target , int entityNum , float frameNum )
{
GetSelf ( target ) . UpdateEntityAnimation ( entityNum , frameNum ) ;
}
}