示例#1
0
 private void NailSlashOnStartSlash(On.NailSlash.orig_StartSlash orig, NailSlash self)
 {
     self.scale.x = 0.7f;
     self.scale.y = 0.7f;
     Reflection.SetAttr(self, "mantis", false);
     Reflection.SetAttr(self, "longnail", false);
     Reflection.SetAttr(self, "fury", false);
     orig(self);
 }
示例#2
0
        private static void EnableSuperslides(On.InputHandler.orig_Update orig, InputHandler self)
        {
            if (Superslides && GameManager.instance.TimeSlowed)
            {
                // Ensure the slide has the correct speed
                ReflectionHelper.SetAttr(HeroController.instance, "recoilSteps", 0);

                // Kill the thing that kills superslides
                ref int timeSlowedCount = ref Mirror.GetFieldRef <GameManager, int>(GameManager.instance, "timeSlowedCount");

                int origCount = timeSlowedCount;

                timeSlowedCount = 0;

                orig(self);

                // Restore to old value
                timeSlowedCount = origCount;
            }
        private static void EnableSuperslides(On.InputHandler.orig_Update orig, InputHandler self)
        {
            if (Superslides && GameManager.instance.TimeSlowed)
            {
                // Ensure the slide has the correct speed
                ReflectionHelper.SetAttr(HeroController.instance, "recoilSteps", 0);

                // Kill the thing that kills superslides
                int timeSlowedCount = ReflectionHelper.GetAttr <GameManager, int>(GameManager.instance, "timeSlowedCount");
                ReflectionHelper.SetAttr(GameManager.instance, "timeSlowedCount", 0);

                orig(self);

                // Restore to old value
                ReflectionHelper.SetAttr(GameManager.instance, "timeSlowedCount", timeSlowedCount);
            }
            else
            {
                orig(self);
            }
        }