Beispiel #1
0
        private void OnTriggerEnter(Collider other)
        {
            EnemyStates enemy = other.GetComponent <EnemyStates>();

            if (enemy != null)
            {
                enemy.DoDamage_();
                SpellEffectManager.Instance.UseSpellEffect("OnFire", null, enemy);
            }
        }
        private void OnTriggerEnter(Collider other)
        {
            EnemyStates enemyStates = other.GetComponent <EnemyStates>();

            if (enemyStates != null)
            {
                enemyStates.health -= 40;
                enemyStates.DoDamage_();
                SpellEffectManager.Instance.UseSpellEffect("OnFire", null, enemyStates);
            }

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

            Destroy(this.gameObject);
        }