Beispiel #1
0
        public void OnTriggerEnter(Collider other)
        {
            EnemyStates e = other.GetComponentInParent <EnemyStates>();

            if (e != null)
            {
                e.DoDamage_();
                SpellEffectsManager.singleton.UseSpellEffect("onfire", null, e);
            }
        }
Beispiel #2
0
        public void OnTriggerEnter(Collider other)
        {
            EnemyStates es = other.GetComponentInParent <EnemyStates>();

            if (es != null)
            {
                es.health -= 10;
                es.DoDamage_();
            }

            GameObject go = Instantiate(explosionPrefab, transform.position, transform.rotation) as GameObject;

            Destroy(this.gameObject);
        }