public IState Handle(StateCommand command, GameManager gm) { if (command.Key != PressedKey) { return(null); } if (!command.IsPressed) { return(new NormalState()); } if (++DelayCount <= Delay) { return(null); } if (!gm.IsTouchDown()) { return(new NormalState()); } gm.TouchDown(); DelayCount = 0; return(new NormalState()); }
public IState Handle(StateCommand command, GameManager gm) { if (!command.IsPressed) { return(null); } gm.Hold(); return(new HeldState()); }
public IState Handle(StateCommand command, GameManager gm) { if (!command.IsPressed) { return(null); } var(canExecute, blockExecuted) = gm.MoveCheck(command); if (!canExecute) { return(null); } gm.BlockNow = blockExecuted; return(new DasState(command.Key)); }
public IState Handle(StateCommand command, GameManager gm) { if (command.Key != PressedKey) { return(null); } if (!command.IsPressed) { return(new NormalState()); } if (++DelayCount <= Delay) { return(null); } return(new AutoShiftState(command.Key)); }
public IState Handle(StateCommand command, GameManager gm) { if (!command.IsPressed) { return(null); } var(canExecute, blockExecuted) = gm.MoveCheck(command); if (!canExecute) { return(Constants.IsDLD ? new LockDelayState(command.Key) : null); } gm.BlockNow = blockExecuted; return(new AutoShiftState(command.Key)); }
public IState Handle(StateCommand command, GameManager gm) { if (command.Key != PressedKey) { return(null); } if (!command.IsPressed) { return(new NormalState()); } if (++DelayCount > Delay) { var(canExecute, blockExecuted) = gm.MoveCheck(command); if (!canExecute) { return(new NormalState()); } gm.BlockNow = blockExecuted; DelayCount = 0; } return(null); }