void OnTriggerEnter(Collider other) { EnemyStates eStates = other.GetComponentInChildren <EnemyStates>(); if (eStates != null) { eStates.DoDamageSpell(); SpellEffectsManager.singleton.UseSpellEffect("onFire", null, eStates); } }
void OnTriggerEnter(Collider other) { EnemyStates eStates = other.GetComponentInParent <EnemyStates>(); if (eStates != null) { eStates.DoDamageSpell(); SpellEffectsManager.singleton.UseSpellEffect("onFire", null, eStates); } GameObject g0 = Instantiate(explosionPrefab, transform.position, transform.rotation) as GameObject; Destroy(this.gameObject); }