private void HandleMovement(PlayerInput input) { Human.Move(input, Settings); Enemies.ForEach(x => x.Move(Human.X, Human.Y, Settings)); }
public static void DrawEnemy(Enemies enemyObj,ref int score) { Console.SetCursorPosition(Math.Max(2,(int)enemyObj.EnemyPosX),(int)enemyObj.EnemyPosY); if (enemyObj.Health <= 0) { enemyObj.EnemyImage = "DEAD"; enemyObj.IsAlive = false; enemiesKilled++; } if (enemyObj.EnemyPosX < 15 || (((enemyObj.EnemyPosY > 10 && enemyObj.EnemyPosY < 15) && enemyObj.EnemyPosX < 30) || (enemyObj.EnemyPosY>20 && enemyObj.EnemyPosY<24) && enemyObj.EnemyPosX < 30)) { enemyObj.EnemyImage = "*DMG*"; enemyObj.IsAlive = false; score -= 100; Console.Beep(); } Console.Write(enemyObj.EnemyImage); }