public Command Add(State touchState, Action<Touch> callback) { var command = new Command(); command.Callback += trigger => callback(touch); command.Add(new TouchPressTrigger(touchState)); Add(command); return command; }
public Command Add(MouseButton mouseButton, State buttonState, Action<Mouse> callback) { var command = new Command(); command.Callback += trigger => callback(mouse); command.Add(new MouseButtonTrigger(mouseButton, buttonState)); Add(command); return command; }
public Command Add(Key key, State keyState, Action callback) { var command = new Command(); command.Callback += trigger => callback(); command.Add(new KeyTrigger(key, keyState)); Add(command); return command; }
public void Add(Command command) { if (commands.Contains(command) == false) commands.Add(command); }
public Command Add(GamePadButton gamePadButton, State keyState, Action callback) { var command = new Command(); command.Callback += trigger => callback(); command.Add(new GamePadButtonTrigger(gamePadButton, keyState)); Add(command); return command; }
public void Remove(Command command) { commands.Remove(command); }
public Command AddMouseMovement(Action<Mouse> mouseMovementCallback) { var command = new Command(); command.Callback += trigger => mouseMovementCallback(mouse); command.Add(new MouseMovementTrigger()); Add(command); return command; }