Exemple #1
0
        //private Coroutine healEffectRoutine;

        //[SerializeField]
        //private GameObject damageParticles;

        //[SerializeField]
        //private GameObject healingParticles;

        public void OnEnable()
        {
            health = GetComponent <HealthTracker>();
            //health.OnDamaged += OnDamaged;
            health.OnDestroyed += OnDestroyed;
            //health.OnHealed += OnHealed;
        }
Exemple #2
0
 public void OnEnable()
 {
     sprite              = GetComponent <SpriteRenderer>();
     sprite.color        = Color.white;
     health              = GetComponent <HealthTracker>();
     health.OnDamaged   += OnDamaged;
     health.OnDestroyed += OnDestroyed;
     health.OnHealed    += OnHealed;
 }