virtual public void OnMove() { if (this.playerName == Characters.CHAR_PLAYER) { User.MoveRequest req = User.GetMoveRequest(); switch (req) { case User.MoveRequest.Left: playerPoint.XPos -= 1; break; case User.MoveRequest.Right: playerPoint.XPos += 1; break; case User.MoveRequest.Up: playerPoint.YPos -= 1; break; case User.MoveRequest.Down: playerPoint.YPos += 1; break; } if (ScreenCell2D.IsOnScreen(this.playerPoint) == false) { state = ObjectStatus.ActiveState.Dead; } } }
virtual public void OnDraw() { if (ScreenCell2D.IsOnScreen(this.playerPoint) == true) { Console.SetCursorPosition(playerPoint.XPos, playerPoint.YPos); Console.Write(playerName); } }