示例#1
0
 public void RestartMusic()
 {
     GameCallbacks.AddMainLoopCall(() =>
     {
         CuiManager.RestartMusic();
     });
 }
示例#2
0
 public void Unload()
 {
     GameCallbacks.AddMainLoopCall(() =>
     {
         Game.CleanupScene();
     });
 }
示例#3
0
 public void ReloadUi()
 {
     GameCallbacks.AddMainLoopCall(() =>
     {
         UtinniCore.Utinni.CuiMisc.cui_misc.ReloadUi();
     });
 }
示例#4
0
 public void Reload()
 {
     GameCallbacks.AddMainLoopCall(() =>
     {
         GroundScene.Get().ReloadTerrain();
     });
 }
示例#5
0
 public void Load(string sceneName, string avatarObjectFilename)
 {
     GameCallbacks.AddMainLoopCall(() =>
     {
         Game.LoadScene(sceneName, avatarObjectFilename);
     });
 }
示例#6
0
 public void ReloadTextures()
 {
     GameCallbacks.AddMainLoopCall(() =>
     {
         Graphics.ReloadTextures();
     });
 }
示例#7
0
 public void RenderSkeletons(bool value)
 {
     GameCallbacks.AddMainLoopCall(() =>
     {
         UtinniCore.Utinni.SkeletalAppearance.skeleton.SetRenderSkeleton(value);
     });
 }
示例#8
0
 public void EnableWireframe(bool value)
 {
     GameCallbacks.AddMainLoopCall(() =>
     {
         directx9.ToggleWireframe();
     });
 }
示例#9
0
 private void CleanUpDragDropObject()
 {
     GameCallbacks.AddMainLoopCall(() =>
     {
         dragDropObject.Remove();
         dragDropObject = null;
     });
 }
示例#10
0
        public void ProcessInput(Keys modifierKeys, Keys key, bool isGameFocused)
        {
            if (!Enabled)
            {
                return;
            }

            foreach (var pair in Hotkeys)
            {
                Hotkey hotkey = pair.Value;
                if (hotkey.Enabled && hotkey.ModifierKeys == modifierKeys && hotkey.Key == key) // ToDo figure out a way to have some hotkeys only work if the game has focus
                {
                    if (hotkey.OnGameFocusOnly && !isGameFocused)
                    {
                        continue;
                    }

                    if (hotkey.OverrideGameInput)
                    {
                        // Not happy about this solution, but works, ToDo find a better way
                        GameCallbacks.AddPreMainLoopCall(() =>
                        {
                            UtinniCore.Utinni.CuiIo.cui_io.EnableKeyboard(false);

                            hotkey.OnDownCallback();

                            // ToDo really far from perfect, occasionally doesn't proper block a call

                            GameCallbacks.AddMainLoopCall(() =>
                            {
                                GameCallbacks.AddPreMainLoopCall(() =>
                                {
                                    UtinniCore.Utinni.CuiIo.cui_io.EnableKeyboard(true);
                                });
                            });
                        });
                    }
                    else
                    {
                        hotkey.OnDownCallback();
                    }
                }
            }
        }