예제 #1
0
    private void OnTriggerStay2D(Collider2D other)
    {
        NPC npc = other.gameObject.GetComponentInChildren <NPC>();

        if (npc != null)
        {
            if (npcTimer.CheckTimerForEffect(npc))
            {
                EffectBody(npc);
            }
        }
    }
예제 #2
0
    private void OnTriggerStay2D(Collider2D other)
    {
        if (other.CompareTag("Enemy") || other.CompareTag("Obstacle"))
        {
            NPC npc = other.GetComponentInChildren <NPC>();

            if (npcTimer.CheckTimerForEffect(npc))
            {
                AudioManager.Instance.PlaySound("Voices/Magic2");
                DamageEffectBody(npc);
            }
        }
    }