Beispiel #1
0
    IEnumerator C_Flip(PlatformerCharacter2D GuysScript)
    {
        AbleToFlip = false;

        if (InstaFlip)
        {
            GuysScript.ZeroFallSpeed();
        }

        if (UpsideDownFlip == UprightFlip)
        {
            GuysScript.FlipCharacter();
            if (DoubleJumpRefresh)
            {
                GuysScript.Refresh_MultiJump();
            }
        }
        else
        {
            if (UprightFlip)
            {
                if (GuysScript.FlipCharacter_Upright() && DoubleJumpRefresh)
                {
                    GuysScript.Refresh_MultiJump();
                }
            }

            if (UpsideDownFlip)
            {
                if (GuysScript.FlipCharacter_UpsideDown() && DoubleJumpRefresh)
                {
                    GuysScript.Refresh_MultiJump();
                }
            }
        }

        yield return(new WaitForSeconds(ReuseDelay));

        AbleToFlip = true;
    }