DangerousD/DangerousD/GameCore/GameObjects/LivingEntities/CoreEnemy.cs
2023-08-16 09:54:15 +03:00

40 lines
1 KiB
C#

using DangerousD.GameCore.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DangerousD.GameCore.GameObjects.LivingEntities
{
public abstract class CoreEnemy : LivingEntity
{
protected int monster_health;
protected int monster_speed;
protected string name;
protected bool isAlive = true;
public CoreEnemy(Vector2 position) : base(position)
{
//здесь я не понял
}
public virtual void Update(GameTime gameTime, Player player)
{
if (monster_health <= 0)
{
Death();
isAlive = false;
}
base.Update(gameTime);
}
public abstract void Death();
public abstract void Attack();
public abstract void Move(GameTime gameTime);
}
}