void OnTriggerEnter(Collider other) { EnemyStates es = other.GetComponentInParent <EnemyStates>(); if (es != null) { es.DoDamage_(); SpellEffectManager.singleton.UseSpellEffect("onfire", null, es); } }
public void OnTriggerEnter(Collider other) { EnemyStates es = other.GetComponentInParent <EnemyStates>(); if (es != null) { es.health -= 40; es.DoDamage_(); SpellEffectManager.singleton.UseSpellEffect("onfire", null, es); } GameObject go = Instantiate(explosionPrefab, transform.position, transform.rotation) as GameObject; Destroy(this.gameObject); }