Exemplo n.º 1
0
 // Update stats when in turbo move
 private void Player_MovementUpdate(On.Player.orig_MovementUpdate orig, Player self, bool eu)
 {
     if (self.room.world.game.GetStorySession?.saveState is SprinterSaveState css && css.isTurbo)
     {
         self.slugcatStats.runspeedFac = 5f;
     }
     orig(self, eu);
 }
Exemplo n.º 2
0
        private void Player_MovementUpdate(On.Player.orig_MovementUpdate orig, Player self, bool eu)
        {
#if DEBUG
            // intro
            if (introIndex < introText.Length)
            {
                introLabel.text += introText[introIndex].ToString();
                introIndex++;
            }
            else if (introTimer++ == 120)
            {
                introLabel.isVisible = false;
            }
#endif
            if (needToInitCat)
            {
                needToInitCat = false;
#if DEBUG
                if (introLabel == null)
                {
                    introLabel = new FLabel("font", "");
                    introLabel.SetPosition(120, 240);
                    Futile.stage.AddChild(introLabel);
                }

                if (config.UnlimitedRedCycles && self.slugcatStats.name == SlugcatStats.Name.Red)
                {
                    self.redsIllness.cycle = 9999;
                }
#endif
                acc     = self.slugcatStats.runspeedFac;
                minAcc  = acc;
                maxAcc  = acc * 1.75f;
                hookPos = new Vector2[self.bodyChunks.Length];
            }

            BrokenTeleportation(self);
            BackFlipSlowmotion(self);
            AccMovement(self);
            AirInLungsX2(self);

            slugcatUnderWater = self.submerged;

            orig(self, eu);
        }