示例#1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.GetComponent <Enemy>())
        {
            Enemy enemy = other.GetComponent <Enemy>();

            EnemyManager.Instance.QuestionPop(enemy.transform);

            enemy.ApplyStatusEffect(new StatusEffect(3, 2));
            enemy.ApplyStatusEffect(new StatusEffect(4, duration));
            enemy.ApplyStatusEffect(new StatusEffect(5, duration));
        }
        else if (other.GetComponent <player>())
        {
            player Player = other.GetComponent <player>();

            Player.ApplyStatusEffect(new StatusEffect(4, duration));
            Player.ApplyStatusEffect(new StatusEffect(5, duration));
        }
    }