Beispiel #1
0
 internal override void MoveObject(Vector2 dir)
 {
     ConsoleHelpers.WriteString($"Player moved in direction: {dir}");
     if (CheckAttackable(dir, out Enemy enemy))
     {
         Attack(enemy);
     }
     base.MoveObject(dir);
     Screen.RevealTiles(Position, REVEAL_RADIUS);
     DisplayObject();
 }
Beispiel #2
0
 internal void Init()
 {
     Updatables            = new List <Updatable>();
     enemies               = new List <Enemy>();
     Running               = true;
     Console.CursorVisible = false;
     ConsoleHelpers.SetConsoleSize();
     Screen = Screen.Instance;
     Screen.Init();
     player = new Player(Screen.FirstRoomPos);
     enemies.Add(new RandomWalker(3, Screen.FirstRoomPos + Vector2.Up));
 }
Beispiel #3
0
 internal override void TakeDamage(int dmg)
 {
     base.TakeDamage(dmg);
     ConsoleHelpers.WriteString($"Enemy Took {dmg} damage");
 }