//Метод взаимодействия пользователя и героя public void Move(ConsoleKey key) { IMove moveObj = this.mainHeroy as IMove; if (moveObj != null) { switch (key) { case ConsoleKey.W: moveObj.MoveUp(this.terrain); break; case ConsoleKey.S: moveObj.MoveDown(this.terrain); break; case ConsoleKey.A: moveObj.MoveLeft(this.terrain); break; case ConsoleKey.D: moveObj.MoveRigth(this.terrain); break; default: return; } } }
public void MoveDown() { _moveImplementation.MoveDown(); }