Exemplo n.º 1
0
 private void OnEnable()
 {
     if (!HealthComp)
     {
         HealthComp = GetComponent <DHealth>();
     }
 }
Exemplo n.º 2
0
    private void OnEnable()
    {
        if (!HealthComp)
        {
            HealthComp = GetComponent <DHealth>();
        }
        if (HealthComp)
        {
            HealthComp.OnHealthChange.AddListener(HandleHealthChange);
        }

        if (!DestroyableComp)
        {
            DestroyableComp = GetComponent <ADestroyable>();
        }
    }