12345678910111213141516171819202122232425262728293031323334353637383940 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- namespace KairoEngine.CharacterSystem
- {
- public class DamageEvents
- {
- public static event System.Action<DamageData> OnDamage;
- public static event System.Action<DamageController, int> OnHeal;
- public static event System.Action<DamageController, CharacterController> OnDeath;
- public static void DamageEvent(DamageData damageData)
- {
- if(OnDamage != null)
- {
- //Debug.Log("ItemContainerEvents.OnOpen has been triggered");
- OnDamage(damageData);
- }
- }
- public static void HealEvent(DamageController damageController, int heal)
- {
- if(OnHeal != null)
- {
- //Debug.Log("ItemContainerEvents.OnOpen has been triggered");
- OnHeal(damageController, heal);
- }
- }
- public static void DeathEvent(DamageController damageController, CharacterController killedBy)
- {
- if(OnDeath != null)
- {
- //Debug.Log("ItemContainerEvents.OnOpen has been triggered");
- OnDeath(damageController, killedBy);
- }
- }
- }
- }
|