Example #1
0
File: Entity.cs Project: fuchs-/MBA
	public void attack(Entity e)
	{
		//Checking if e is in the attack range
		if (!isInAttackRange(e))
			return;

		e.takeDamage (this.makeDamageForEntity (e));
	}
Example #2
0
 public void dealDamage(Entity entity, int damage)
 {
     entity.takeDamage(damage);
 }
Example #3
0
 public void attack(Entity entity)
 {
     entity.takeDamage (strength);
 }
Example #4
0
 private void damageIfEnemy(Entity other)
 {
     if (other != null && other.getIsPlayer() != GameManager.gameManager.getPlayerTurn())
     {
         other.takeDamage();
     }
 }