Ejemplo n.º 1
0
 public void TriggerActionPoint(ActionPointType actionPointType, ActionExecution action)
 {
     if (ActionPoints.ContainsKey(actionPointType) && ActionPoints[actionPointType].Listeners.Count > 0)
     {
         for (int i = ActionPoints[actionPointType].Listeners.Count - 1; i >= 0; i--)
         {
             var item = ActionPoints[actionPointType].Listeners[i];
             item.Invoke(action);
         }
     }
 }
 private void WhenReceiveDamage(ActionExecution combatAction)
 {
     //Log.Debug($"{GetType().Name}->WhenReceiveDamage");
     NoDamageTimer.Reset();
 }
Ejemplo n.º 3
0
        public void ReceiveDamage(ActionExecution combatAction)
        {
            var damageAction = combatAction as DamageAction;

            CurrentHealth.Minus(damageAction.DamageValue);
        }
Ejemplo n.º 4
0
        public void ReceiveCure(ActionExecution combatAction)
        {
            var cureAction = combatAction as CureAction;

            CurrentHealth.Add(cureAction.CureValue);
        }
Ejemplo n.º 5
0
 public void TriggerActionPoint(ActionPointType actionPointType, ActionExecution action)
 {
     GetComponent <ActionPointManageComponent>().TriggerActionPoint(actionPointType, action);
 }