Ejemplo n.º 1
0
 public void HandleInput(InputAction input)
 {
     _current.HandleInput(input);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
 public void AddInput(InputAction input)
 {
     _inputQueue.Enqueue(input);
 }
Ejemplo n.º 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;
     }
 }