Exemplo n.º 1
0
 /// <summary>
 /// Hurts this entity for the specified amount.
 /// </summary>
 /// <param name="amount">Number of damage points.</param>
 public void Hurt(int amount)
 {
     Health -= amount;
     if (Health <= 0)
     {
         Engine2D.DespawnEntity(Entity);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Stops highlighting the entity.
 /// </summary>
 public void Deselect()
 {
     Entity.OnPositionChanged -= PositionChanged;
     Engine2D.DespawnEntity(Effect);
     Effect = null;
 }