edited core enemy
This commit is contained in:
parent
ff46f3694a
commit
5e5cc3ef74
4 changed files with 10 additions and 11 deletions
|
@ -24,11 +24,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
|
|||
|
||||
public override void Update(GameTime gameTime)
|
||||
{
|
||||
if (monster_health <= 0)
|
||||
{
|
||||
Death();
|
||||
isAlive = false;
|
||||
}
|
||||
base.Update(gameTime);
|
||||
}
|
||||
public abstract void Death();
|
||||
|
@ -36,5 +31,15 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
|
|||
public abstract void Attack();
|
||||
|
||||
public abstract void Move(GameTime gameTime);
|
||||
|
||||
public void TakeDamage(int damage)
|
||||
{
|
||||
monster_health -= damage;
|
||||
if (monster_health <= 0)
|
||||
{
|
||||
Death();
|
||||
isAlive = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -106,11 +106,5 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
|||
}
|
||||
base.OnCollision(gameObject);
|
||||
}
|
||||
|
||||
public void TakeDamage(int damage)
|
||||
{
|
||||
monster_health -= damage;
|
||||
//play take damage animation
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue