private void Construct()
        {
            if (self_Entity == null)
            {
                self_Entity = new Battle_Entity(max_Health, initative, action_Points, bonus_Action_Points, name);
            }
            else
            {
                self_Entity.Initalize(max_Health, initative, action_Points, bonus_Action_Points);
            }

            entity_Command_Controller = new Entity_Command_Controller(self_Entity);
            current_Health            = self_Entity.Combat_Controller.health.Value;
        }
        private void Death_Check()
        {
            Battle_Entity battle_Entity = Unit;
            int           death_Health  = (int)(origin_Stat.Value * -1);
            bool          health_Not_Reduced_To_Less_Than_Death_Value_Recently = !Reduced_To_Less_Than_Value_Recently(Value, death_Health);

            if (health_Not_Reduced_To_Less_Than_Death_Value_Recently)
            {
                return;
            }
            bool Health_Less_Than_Death_Health = Value <= death_Health;

            if (Health_Less_Than_Death_Health & !battle_Entity.Is_Dead)
            {
                battle_Entity.Is_Dead = true;
                Death_Event?.Invoke(battle_Entity);
            }
        }
Example #3
0
 public Entity_Command_Controller(Battle_Entity unit)
 {
     Action_Points = new Action_Points(unit);
 }
 private void Health_Death_Event(Battle_Entity battle_Entity)
 {
     Debug.Log($"{battle_Entity} is dead");
 }
 public Combat_Controller(Battle_Entity battle_Entity)
 {
     health              = new Health(battle_Entity);
     health.Death_Event += Health_Death_Event;
 }
Example #6
0
 public Action_Points(Battle_Entity unit)
 {
     Unit = unit;
     Initalize(unit._Entity_Stats.Action_Points);
 }
 public Health(Battle_Entity unit)
 {
     Initalize(unit._Entity_Stats.Health);
     Unit = unit;
 }