示例#1
0
    void OnTriggerEnter(Collider other)
    {
        EnemyStates es = other.GetComponentInParent <EnemyStates>();

        if (es != null)
        {
            es.DoDamage_();
            SpellEffectManager.singleton.UseSpellEffect("onfire", null, es);
        }
    }
示例#2
0
    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);
    }