Exemplo 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();
 }
Exemplo n.º 3
0
        public void ReceiveDamage(ActionExecution combatAction)
        {
            var damageAction = combatAction as DamageAction;

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

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