Ejemplo n.º 1
0
            internal static bool Prefix(string levelPath, CustomLevel __instance)
            {
                void Invoke(MethodBase methodBase, params object[] parameters)
                {
                    methodBase.Invoke(__instance, parameters);
                }

                Invoke(_printesp, (object)"");
                int num = __instance.LoadLevel(levelPath) ? 1 : 0;

                if (num == 0)
                {
                    return(false);
                }
                __instance.editor.filenameText.text      = Path.GetFileName(levelPath);
                __instance.editor.filenameText.fontStyle = FontStyle.Bold;
                __instance.conductor.SetupConductorWithLevelData(__instance.levelData);
                __instance.RemakePath();
                __instance.ReloadAssets();
                DiscordController.instance.UpdatePresence();
                if (editor)
                {
                    editor = false;
                    __instance.editor.Run(SelectFirstFloor);
                    return(false);
                }
                else
                {
                    __instance.Play();
                }

                return(false);
            }
Ejemplo n.º 2
0
 public static bool Prefix(CustomLevel __instance, int seqID)
 {
     if (seqID == 0 || !RandomTweaks.settings.DisableRestartAtCheckpoint)
     {
         return(true);
     }
     __instance.Play(0);
     return(false);
 }