Terraria.Player.WingMovement C# (CSharp) Method

WingMovement() public method

public WingMovement ( ) : void
return void
        public void WingMovement()
        {
            if (this.wingsLogic == 4 && this.controlUp)
            {
                this.velocity.Y -= 0.2f * this.gravDir;
                if ((double)this.gravDir == 1.0)
                {
                    if ((double)this.velocity.Y > 0.0)
                        --this.velocity.Y;
                    else if ((double)this.velocity.Y > -(double)Player.jumpSpeed)
                        this.velocity.Y -= 0.2f;
                    if ((double)this.velocity.Y < -(double)Player.jumpSpeed * 3.0)
                        this.velocity.Y = (float)(-(double)Player.jumpSpeed * 3.0);
                }
                else
                {
                    if ((double)this.velocity.Y < 0.0)
                        ++this.velocity.Y;
                    else if ((double)this.velocity.Y < (double)Player.jumpSpeed)
                        this.velocity.Y += 0.2f;
                    if ((double)this.velocity.Y > (double)Player.jumpSpeed * 3.0)
                        this.velocity.Y = Player.jumpSpeed * 3f;
                }
                this.wingTime -= 2f;
            }
            else
            {
                float num1 = 0.1f;
                float num2 = 0.5f;
                float num3 = 1.5f;
                float num4 = 0.5f;
                float num5 = 0.1f;
                if (this.wingsLogic == 26)
                {
                    num2 = 0.75f;
                    num5 = 0.15f;
                    num4 = 1f;
                    num3 = 2.5f;
                    num1 = 0.125f;
                }
                if (this.wingsLogic == 29)
                {
                    num2 = 0.85f;
                    num5 = 0.15f;
                    num4 = 1f;
                    num3 = 3f;
                    num1 = 0.135f;
                }
                if (this.wingsLogic == 30)
                {
                    num4 = 1f;
                    num3 = 2f;
                    num1 = 0.15f;
                }
                if (this.wingsLogic == 31)
                {
                    num2 = 0.75f;
                    num5 = 0.15f;
                    num4 = 1f;
                    num3 = 3f;
                    num1 = 0.125f;
                }
                if (this.wingsLogic == 32)
                {
                    num4 = 0.6f;
                    num3 = 1.5f;
                    num1 = 0.125f;
                }
                this.velocity.Y -= num1 * this.gravDir;
                if ((double)this.gravDir == 1.0)
                {
                    if ((double)this.velocity.Y > 0.0)
                        this.velocity.Y -= num2;
                    else if ((double)this.velocity.Y > -(double)Player.jumpSpeed * (double)num4)
                        this.velocity.Y -= num5;
                    if ((double)this.velocity.Y < -(double)Player.jumpSpeed * (double)num3)
                        this.velocity.Y = -Player.jumpSpeed * num3;
                }
                else
                {
                    if ((double)this.velocity.Y < 0.0)
                        this.velocity.Y += num2;
                    else if ((double)this.velocity.Y < (double)Player.jumpSpeed * (double)num4)
                        this.velocity.Y += num5;
                    if ((double)this.velocity.Y > (double)Player.jumpSpeed * (double)num3)
                        this.velocity.Y = Player.jumpSpeed * num3;
                }
                if ((this.wingsLogic == 22 || this.wingsLogic == 28 || (this.wingsLogic == 30 || this.wingsLogic == 32)) && (this.controlDown && !this.controlLeft && !this.controlRight))
                    this.wingTime -= 0.5f;
                else
                    --this.wingTime;
            }
        }
Player