示例#1
0
 public void GoodSpaceShipLocationChangedEventHandler(object sender, LocationEventArgs e)
 {
     Console.ForegroundColor = ConsoleColor.DarkGray;
     Console.WriteLine($"\t\tThe ship has been moved by {sender}");
     Console.WriteLine($"\t\tThe ship is now at {e.x} and {e.y} \n");
     Console.ResetColor();
     Beep.BeeperMovement();
     Delay();
 }
示例#2
0
 public void GoodSpaceShipHPChangedEventHandler(object sender, PointsEventArgs e)
 {
     Console.ForegroundColor = ConsoleColor.DarkGray;
     Console.WriteLine($"\t\tThe ship has been hit by {sender}");
     Console.WriteLine($"\t\tThe ship points are now {e.points} \n");
     Console.ResetColor();
     Beep.BeeperPointDown();
     Delay();
 }
示例#3
0
 public void LevelUpReachedEventHandler(object sender, LevelEventArgs e)
 {
     Console.ForegroundColor = ConsoleColor.Magenta;
     Console.WriteLine("#######\t\t WELL DONE LEVEL UP! \t\t#######");
     Console.ForegroundColor = ConsoleColor.DarkGray;
     Console.WriteLine($"\t\tLevel up by {sender}");
     Console.WriteLine($"\t\tYou are now in Level: {e.level} \n");
     Console.ResetColor();
     Beep.BeeperLevelUp();
     ConsoleReset();
 }
示例#4
0
 public void BadShipsExplodedEventHandler(object sender, BadShipsExplodedEventArgs e)
 {
     Console.ForegroundColor = ConsoleColor.DarkGray;
     Console.WriteLine($"\t\tEnemy Destroyed by {sender}");
     Console.Write($"\t\tRemaining bad ships: ");
     Console.ForegroundColor = ConsoleColor.DarkRed;
     Console.WriteLine(e.badShipExplode + "\n");
     Console.ResetColor();
     Beep.BeeperBadShipExploded();
     Delay();
 }
示例#5
0
 public void GoodSpaceShipDestroyedEventHandler(object sender, LocationEventArgs e)
 {
     Console.ForegroundColor = ConsoleColor.Red;
     Console.WriteLine("Good spaceship destroyed - Game Over!");
     Console.ForegroundColor = ConsoleColor.DarkGray;
     Console.WriteLine($"\t\tThe ship has been destroyed by {sender}");
     Console.WriteLine($"\t\tThe ship position reset to {e.x} and {e.y} \n");
     Console.ResetColor();
     Beep.BeeperGoodShipDestroyed();
     ConsoleReset();
 }