コード例 #1
0
        private static bool DisableDash(On.HeroController.orig_CanDash orig, HeroController self)
        {
            // Only disable dash in a direction if they have it in the other direction. If they have both or neither dash
            // direction, then it will be handled by the original function.
            // We don't need to check if Split Cloak is active, because we only change the output if the player has exactly one cloak piece
            switch (GetDashDirection(self))
            {
            default:
                return(orig(self));

            case Direction.leftward:
                return(orig(self) && (!RandomizerMod.Instance.Settings.GetBool(name: "canDashRight") || RandomizerMod.Instance.Settings.GetBool(name: "canDashLeft")));

            case Direction.rightward:
                return(orig(self) && (!RandomizerMod.Instance.Settings.GetBool(name: "canDashLeft") || RandomizerMod.Instance.Settings.GetBool(name: "canDashRight")));

            case Direction.downward:
                return(orig(self));
            }
        }
コード例 #2
0
 private bool True(On.HeroController.orig_CanDash orig, HeroController self)
 {
     return(true);
 }