Ejemplo n.º 1
0
        public override void CastAction()
        {
            if (health == null)
            {
                health = data.source.GetComponent <Health>();
            }
            if (effectInstance == null)
            {
                effectInstance = Instantiate(effect, transform);
            }

            float maxLife    = health.GetMaxValue();
            float healPerSec = maxLife * (baseEffectValue / 100f);

            health.ApplyDamage(gameObject, maxLife * 0.2f);
            StartCoroutine(ActiveHeal(healPerSec));
        }