public static IEnumerator BoostCoroutine()
        {
            Player player = FrostModule.StateGetPlayer();
            GenericCustomBooster booster = GetBoosterThatIsBoostingPlayer(player);

            if (booster.BoostTime > 0.25f)
            {
                yield return(booster.BoostTime - 0.25f);

                Audio.Play(booster.boostSfx, booster.Position);
                booster.Flash();
                yield return(0.25f);
            }
            else
            {
                yield return(booster.BoostTime);
            }

            player.StateMachine.State = RedDash ? CustomRedBoostState : Player.StDash;
            yield break;
        }
        public static int RedDashUpdate()
        {
            Player           player = FrostModule.StateGetPlayer();
            DynData <Player> data   = new DynData <Player>(player);

            data["StartedDashing"] = false;
            bool ch9hub = false;//this.LastBooster != null && this.LastBooster.Ch9HubTransition;

            data["gliderBoostTimer"] = 0.05f;
            if (player.CanDash)
            {
                GenericCustomBooster booster = null;
                foreach (GenericCustomBooster b in player.Scene.Tracker.GetEntities <GenericCustomBooster>())
                {
                    if (b.BoostingPlayer)
                    {
                        booster = b;
                        break;
                    }
                }
                booster.BoostingPlayer = false;
                return(player.StartDash());
            }
            if (player.DashDir.Y == 0f)
            {
                foreach (Entity entity in player.Scene.Tracker.GetEntities <JumpThru>())
                {
                    JumpThru jumpThru = (JumpThru)entity;
                    if (player.CollideCheck(jumpThru) && player.Bottom - jumpThru.Top <= 6f)
                    {
                        player.MoveVExact((int)(jumpThru.Top - player.Bottom), null, null);
                    }
                }
                if (player.CanUnDuck && Input.Jump.Pressed && data.Get <float>("jumpGraceTimer") > 0f && !ch9hub)
                {
                    //player.SuperJump();
                    Player_SuperJump.Invoke(player, null);
                    return(0);
                }
            }
            if (!ch9hub)
            {
                if (data.Get <bool>("SuperWallJumpAngleCheck"))
                {
                    if (Input.Jump.Pressed && player.CanUnDuck)
                    {
                        if ((bool)player_WallJumpCheck.Invoke(player, new object[] { 1 }))
                        {
                            Player_SuperWallJump.Invoke(player, new object[] { -1 });
                            return(0);
                        }
                        if ((bool)player_WallJumpCheck.Invoke(player, new object[] { -1 }))
                        {
                            Player_SuperWallJump.Invoke(player, new object[] { 1 });
                            return(0);
                        }
                    }
                }
                else if (Input.Jump.Pressed && player.CanUnDuck)
                {
                    if ((bool)player_WallJumpCheck.Invoke(player, new object[] { 1 }))
                    {
                        if (player.Facing == Facings.Right && Input.Grab.Check && player.Stamina > 0f && player.Holding == null && !ClimbBlocker.Check(player.Scene, player, player.Position + Vector2.UnitX * 3f))
                        {
                            Player_ClimbJump.Invoke(player, null);
                        }
                        else
                        {
                            player_WallJump.Invoke(player, new object[] { -1 });
                        }
                        return(0);
                    }
                    if ((bool)player_WallJumpCheck.Invoke(player, new object[] { -1 }))
                    {
                        if (player.Facing == Facings.Left && Input.Grab.Check && player.Stamina > 0f && player.Holding == null && !ClimbBlocker.Check(player.Scene, player, player.Position + Vector2.UnitX * -3f))
                        {
                            Player_ClimbJump.Invoke(player, null);
                        }
                        else
                        {
                            player_WallJump.Invoke(player, new object[] { 1 });
                        }
                        return(0);
                    }
                }
            }
            return(CustomRedBoostState);//5;
        }