Exemplo n.º 1
0
    void NotifyHealthValueListener(float currentAmountOfHealth)
    {
        DomainEventManager.TriggerEvent(this.gameObject, EventNames.OnHealthValueUpdate, currentAmountOfHealth);

        if (myHealthUpdateEvent != null)
        {
            myHealthUpdateEvent.Invoke(currentAmountOfHealth);
        }
        else
        {
            Debug.LogError("myHealthUpdateEvent == NULL");
        }
    }