コード例 #1
0
    public static void Load(bool actOnData = true)
    {
        SaveLoadSystem.Load(ref gameData);

        if (!actOnData || gameData.sceneAlias == "" || gameData.sceneAlias == null)
        {
            return;
        }

        Player.preloadPosition = new Vector2(gameData.playerPosition[0], gameData.playerPosition[1]);
        MHS.LoadScene(gameData.sceneAlias);
    }
コード例 #2
0
    public static void GoToLevel(string sceneAlias, Vector2?playerPosition = null)
    {
        if (changingScene)
        {
            return;
        }

        changingScene = true;
        MHSFader.FadeOut(0.75f, () => {
            if (playerPosition != null)
            {
                Player.preloadPosition = playerPosition;
            }

            MHSFader.instance.preventAutomaticFadeIn = true;
            MHS.LoadScene(sceneAlias);
        });
    }