public void MakeMove(Point move) { SetLookDirectionToPlayer(); MoveTimer.Restart(); var newLocation = Location + (Size)move; Game.Map[Location.Y, Location.X] = State.Empty; Location = newLocation; Game.Map[Location.Y, Location.X] = State.Enemy; }
public void MakeMove(Point move) { SetLookDirectionToPlayer(); if (MoveTimer.ElapsedMilliseconds != 0 && MoveTimer.ElapsedMilliseconds < MoveInterval) { return; } MoveTimer.Restart(); var newLocation = Location + (Size)move; Game.Map[Location.Y, Location.X] = State.Empty; Location = newLocation; Game.Map[Location.Y, Location.X] = State.Enemy; }