public void ForceSetCurrentMove(GameMove move) { //StageForm.PhysicsTimer.Tick -= MoveForward; //StageForm.PhysicsTimer.Tick -= MoveBackward; //StageForm.PhysicsTimer.Tick -= JumpOffset; CurrentMove = move; CurrentMove.Perform(this); }
private void JumpOffset(object sender, EventArgs args) { ++ticksInAir; MoveVector = MoveVector.SetY(60 - 5 * ticksInAir); if (Position.Y <= 0 && ticksInAir > 1) { Stop(); CurrentMove = PlayingCharacter.MoveList["Idle"]; CurrentMove.Perform(this); } }
public void SetCurrentMove(GameMove move, bool ignoreRepeat = false) { if (!Busy && (CurrentMove != move || ignoreRepeat)) { if (OnGround) { Stop(); } CurrentMove = move; CurrentMove.Perform(this); } }