Beispiel #1
0
 public void Update(InputState inputState)
 {
     var command = _inputManager.HandleInput(inputState, Buttons);
     if(command != null)
     {
         ExecuteCommand(command);
     }
 }
 public BaseCommand HandleInput(InputState inputState, List<Button> buttons)
 {
     if(inputState.LeftClick())
     {
         foreach (var button in buttons)
         {
             if (button.BeenClicked(inputState.CurrentMouseState))
             {
                 return button.Command;
             }
         }
     }
     return null;
 }
Beispiel #3
0
 public void Update(InputState inputState)
 {
 }