コード例 #1
0
ファイル: darkboi.cs プロジェクト: ricardosouzag/trimod
 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
ファイル: darkboi.cs プロジェクト: ricardosouzag/trimod
        private void HeroControllerOnLookForInput(On.HeroController.orig_LookForInput orig, HeroController self)
        {
            if (Reflection.GetAttr <HeroController, InputHandler>(HeroController.instance, "inputHandler")
                .inputActions.dash.WasPressed &&
                voidCount > 4)
            {
                isBerserk = true;
                StartCoroutine(BerserkMode());
            }

            orig(self);
        }
コード例 #3
0
 private static bool CanQuickMap(On.HeroController.orig_CanQuickMap orig, HeroController self)
 {
     return(Storage
         ? !GameManager.instance.isPaused &&
            !self.cState.onConveyor &&
            !self.cState.dashing &&
            !self.cState.backDashing &&
            (!self.cState.attacking || ReflectionHelper.GetAttr <HeroController, float>(self, "attack_time") >= self.ATTACK_RECOVERY_TIME) &&
            !self.cState.recoiling &&
            !self.cState.hazardDeath &&
            !self.cState.hazardRespawning
         : orig(self));
 }
コード例 #4
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;
            }
コード例 #5
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
                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);
            }
        }
コード例 #6
0
 private static string GetSavePath(int saveSlot, string ending)
 {
     return(Path.Combine(ReflectionHelper.GetAttr <DesktopPlatform, string>(Platform.Current as DesktopPlatform, "saveDirPath"), $"user{saveSlot}.{ending}"));
 }