Added ShowMouse and get global position to .net api, deferred onInit after all entities have been initialized

This commit is contained in:
Antoine Pilote
2024-03-16 16:37:38 -04:00
parent a5ca094c5f
commit 69205ec4fa
6 changed files with 61 additions and 7 deletions

View File

@@ -134,10 +134,16 @@ namespace Nuake.Net
public class Input
{
internal static unsafe delegate*<bool, void> ShowMouseIcall;
internal static unsafe delegate*<int, bool> IsKeyDownIcall;
internal static unsafe delegate*<int, bool> IsKeyPressedIcall;
internal static unsafe delegate*<NativeArray<float>> GetMousePositionIcall;
public static void ShowMouse(bool visible)
{
unsafe { ShowMouseIcall(visible); }
}
public static bool IsKeyDown(Key keys)
{
unsafe { return IsKeyDownIcall((int)keys); }