private static void Player_DashBegin(On.Celeste.Player.orig_DashBegin orig, Player self)
        {
            orig(self);

            if (HasDreamTunnelDash)
            {
                dreamTunnelDashAttacking = true;
                dreamTunnelDashTimer     = self.GetData().Get <float>("dashAttackTimer");

                // Ensures the player enters the dream tunnel dash state if dashing into a fast moving block
                // Because of how it works, it removes dashdir leniency :(
                DynData <Player> playerData = self.GetData();
                Vector2          lastAim    = Input.GetAimVector(self.Facing);
                Vector2          dir        = lastAim.Sign();
                if (!self.CollideCheck <Solid, DreamBlock>() && self.CollideCheck <Solid, DreamBlock>(self.Position + dir))
                {
                    self.Speed = self.DashDir = lastAim;
                    self.MoveHExact((int)dir.X, playerData.Get <Collision>("onCollideH"));
                    self.MoveVExact((int)dir.Y, playerData.Get <Collision>("onCollideV"));
                }

                if (NextDashFeather)
                {
                    FeatherMode     = true;
                    NextDashFeather = false;
                }
            }
            HasDreamTunnelDash = false;
        }
 private void OnPlayerDashBegin(On.Celeste.Player.orig_DashBegin orig, Celeste.Player self)
 {
     if (Settings.Enabled && self.InControl)
     {
         ApplyRules(self.Scene, "Dash");
     }
     orig(self);
 }
예제 #3
0
        private void modDashBegin(On.Celeste.Player.orig_DashBegin orig, Player self)
        {
            orig(self);

            if (Settings.DashLength != 10)
            {
                DynData <Player> selfData  = new DynData <Player>(self);
                bool             superDash = SaveData.Instance.Assists.SuperDashing;

                // vanilla dash is 0.15, 0.3 with superdash

                // vanilla is 0.3, 0.45 with superdash => in 2x, you get 0.45, 0.75 with superdash
                selfData["dashAttackTimer"] = (superDash ? 0.3f : 0.15f) * Settings.DashLength / 10f + 0.15f;

                // vanilla is 0.55 all the time => in 2x, you get 0.7, 0.85 with superdash
                selfData["gliderBoostTimer"] = (superDash ? 0.3f : 0.15f) * Settings.DashLength / 10f + (superDash ? 0.25f : 0.4f);
            }
        }
예제 #4
0
 private static void Player_DashBegin(On.Celeste.Player.orig_DashBegin orig, Player self)
 {
     orig(self);
     self.GetData()[Player_canEnterDreamDashCollider] = true;
 }