Example #1
0
            internal void UpdateKey(MyKeys key, string value, UiInput uiInput)
            {
                var keyString = key.ToString();

                switch (value)
                {
                case "kinetic":
                    Energy          = keyString;
                    uiInput.Kinetic = key;
                    break;

                case "energy":
                    Energy         = keyString;
                    uiInput.Energy = key;
                    break;

                case "action":
                    ActionKey         = keyString;
                    uiInput.ActionKey = key;
                    break;

                case "noshunt":
                    NoShunting       = keyString;
                    uiInput.Shunting = key;
                    break;

                case "left":
                    Left         = keyString;
                    uiInput.Left = key;
                    break;

                case "right":
                    Right         = keyString;
                    uiInput.Right = key;
                    break;

                case "front":
                    Front         = keyString;
                    uiInput.Front = key;
                    break;

                case "back":
                    Back         = keyString;
                    uiInput.Back = key;
                    break;

                case "up":
                    Up         = keyString;
                    uiInput.Up = key;
                    break;

                case "down":
                    Down         = keyString;
                    uiInput.Down = key;
                    break;
                }
            }
Example #2
0
        public override void HandleInput()
        {
            try
            {
                if (HandlesInput && PlayersLoaded)
                {
                    if (ControlRequest != ControlQuery.None)
                    {
                        UpdateControlKeys();
                    }

                    UiInput.UpdateInputState();
                    if (MpActive)
                    {
                    }
                }
            }
            catch (Exception ex) { Log.Line($"Exception in HandleInput: {ex}"); }
        }
Example #3
0
 public Session()
 {
     UiInput = new UiInput(this);
     UtilsStatic.UnitSphereRandomOnly(ref LosPointSphere);
 }