示例#1
0
 private void HyperWarpKeyPress(TCKeyBinding k)
 {
     if (keysPressedDown.Contains(k.KeyCombination.Last()))
     {
         LogKeyPress(k, "HyperWarp");
         TimeController.Instance.ToggleHyperWarp();
     }
 }
示例#2
0
 private void ToggleGUIKeyPress(TCKeyBinding k)
 {
     if (keysPressedDown.Contains(k.KeyCombination.Last()))
     {
         LogKeyPress(k, "ToggleGUIKeyPress");
         TCGUI.Instance.ToggleGUIVisibility();
     }
 }
示例#3
0
 private void PauseKeyPress(TCKeyBinding k)
 {
     if (keysPressedDown.Contains(k.KeyCombination.Last()))
     {
         LogKeyPress(k, "PauseKeyPress");
         TimeController.Instance.TogglePause();
     }
 }
示例#4
0
 private void CustomKeySliderKeyPress(TCKeyBinding k)
 {
     if (keysPressedDown.Contains(k.KeyCombination.Last()))
     {
         LogKeyPress(k, "SetCustomKeySlider");
         TimeController.Instance.UpdateTimeSlider(Settings.Instance.CustomKeySlider);
     }
 }
示例#5
0
 private void SlowMo64KeyPress(TCKeyBinding k)
 {
     if (keysPressedDown.Contains(k.KeyCombination.Last()))
     {
         LogKeyPress(k, "SetSlowMo64");
         TimeController.Instance.UpdateTimeSlider(1);
     }
 }
示例#6
0
        private void StepKeyPress(TCKeyBinding k)
        {
            if (keysPressedDown.Contains(k.KeyCombination.Last()))
            {
                LogKeyPress(k, "StepKeyPress");

                TimeController.Instance.IncrementTimeStep();
            }
        }
示例#7
0
        private void RealtimeKeyPress(TCKeyBinding k)
        {
            if (keysPressedDown.Contains(k.KeyCombination.Last()))
            {
                LogKeyPress(k, "RealtimeKeyPress");

                TimeController.Instance.Realtime();
            }
        }
示例#8
0
        private void SlowDownKeyPress(TCKeyBinding k)
        {
            if (keysPressedDown.Contains(k.KeyCombination.Last()))
            {
                LogKeyPress(k, "SlowDownKeyPress Started");
            }
            if (keysReleased.Contains(k.KeyCombination.Last()))
            {
                LogKeyPress(k, "SlowDownKeyPress Ended");
            }

            if (TimeController.Instance.CurrentWarpState == TimeControllable.Hyper)
            {
                if (keysPressedDown.Contains(k.KeyCombination.Last()))
                {
                    TimeController.Instance.SlowDownTime();
                }
            }
            else
            {
                TimeController.Instance.SlowDownTime();
            }
        }
示例#9
0
 private void LogKeyPress(TCKeyBinding k, string caller)
 {
     Log.Trace(String.Format("Key Pressed {0} : {1}", k.KeyCombination.Select(x => x.ToString()).Aggregate((current, next) => current + " + " + next), k.Description), "KeyboardInputManager." + caller);
 }