示例#1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         if (canFreeze)
         {
             effectManager.Freezing(freezeDuration);
         }
         else if (canGround)
         {
             effectManager.Grounded(groundDuration);
         }
     }
 }
示例#2
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.gameObject.tag == "Player")
        {
            DealDamage();
        }

        if (canBurn)
        {
            statusEffect.Burning(20, 5, 1);
        }
        else if (canBleed)
        {
            statusEffect.Bleeding(50, 25, 2);
        }
        else if (canFreeze)
        {
            statusEffect.Freezing(5);
        }
        else if (canGround)
        {
            statusEffect.Grounded(5);
        }
    }