public static void EnableAsyncTasks(this ICoreClientAPI api) { api.Event.LevelFinalize += () => { if (!api.IsClientSystemLoaded <ClientSystemAsyncActions>()) { api.InjectClientThread("AsyncActions", new ClientSystemAsyncActions(api.AsClientMain())); } }; }
public static Vec2f ClientWindowSize(this ICoreClientAPI capi) { var platform = capi.AsClientMain().GetField <ClientPlatformWindows>("Platform"); return(new Vec2f(platform.window.Width, platform.window.Height)); }