コード例 #1
0
 public static void EnableAsyncTasks(this ICoreClientAPI api)
 {
     api.Event.LevelFinalize += () =>
     {
         if (!api.IsClientSystemLoaded <ClientSystemAsyncActions>())
         {
             api.InjectClientThread("AsyncActions", new ClientSystemAsyncActions(api.AsClientMain()));
         }
     };
 }
コード例 #2
0
        public static Vec2f ClientWindowSize(this ICoreClientAPI capi)
        {
            var platform = capi.AsClientMain().GetField <ClientPlatformWindows>("Platform");

            return(new Vec2f(platform.window.Width, platform.window.Height));
        }