Exemple #1
0
 public void HandleInput(InputAction input)
 {
     _current.HandleInput(input);
 }
Exemple #2
0
 // In here check that input is valid for state etc.
 public virtual void HandleInput(InputAction input)
 {
     if (_allowedInputs.Contains(input.GetType()))
         _inputSystem.AddInput(input);
 }
Exemple #3
0
 public void AddInput(InputAction input)
 {
     _inputQueue.Enqueue(input);
 }
Exemple #4
0
 void InputManager_DoAction(InputAction action)
 {
     switch (action.InputType)
     {
         case ActionType.EndTurn:
             CallEndState();
             break;
         case ActionType.Pause:
             CallPauseState();
             break;
         case ActionType.Click:
             ClickAction(action as Click);
             break;
         case ActionType.Zoom:
             ZoomAction(action as Zoom);
             break;
         case ActionType.MoveCameraTargetLocation:
             MoveCameraTargetLocationAction(action as MoveCameraTagetLocation);
             break;
         case ActionType.MouseUp:
             MouseUpAction(action as MouseUpAction);
             break;
         case ActionType.MouseDown:
             MouseDownAction(action as MouseDownAction);
             break;
         case ActionType.MouseMove:
             MouseMoveAction(action as MouseMoveAction);
             break;
         case ActionType.SelectPrevNextObject:
             SelectPrevNextObjectAction(action as SelectPrevNextObject);
             break;
         default:
             break;
     }
 }