Example #1
0
 /// <summary>
 /// Creates a Human
 /// </summary>
 /// <param name="name">The name to display for this character</param>
 /// <param name="x">The starting x position</param>
 /// <param name="y">The starting y position</param>
 public Human(string name, int x, int y)
 {
     this.name = name;
     health = 100;
     Killable = new BasicKillable(100);
     Movable = new BasicMovable(50, 50);
 }
 void p_Killed(IKillable killed, IGameObject source)
 {
     GameOver = true;
 }
 void target_Killed(IKillable killed, IGameObject source)
 {
     Player.Target = null;
 }
 public void Character_Killed(IKillable killed, IGameObject source)
 {
     var s = source as Character;
     if (s.Experience != null) s.Experience.Add(ExperienceWhenKilled);
     Loot.Drop();
     GameWorld.Remove(this);
 }