예제 #1
0
파일: NodeSpawner.cs 프로젝트: Ziplaw/ZSave
    private void ToggleCanvas()
    {
        uiManager.gameObject.SetActive(!uiManager.gameObject.activeSelf);
        tutorialCanvas.SetActive(!tutorialCanvas.activeSelf);
        uiManager.DestroyAllButtons();
        var levelNames = ZSerialize.GetLevelNames();

        foreach (var levelName in levelNames)
        {
            uiManager.CreateButton(levelName, transform, () =>
            {
                ZSerialize.LoadLevel(levelName, transform, true);
            });
        }
    }
예제 #2
0
파일: ButtonInfo.cs 프로젝트: Ziplaw/ZSave
    public void SaveLevel()
    {
        FindObjectOfType <NodeSpawner>().ResetNodes();
        ZSerialize.SaveLevel(levelName, levelParent);
        var uiManager = FindObjectOfType <UIManager>();

        uiManager.DestroyAllButtons();
        var levelNames = ZSerialize.GetLevelNames();

        foreach (var levelName in levelNames)
        {
            uiManager.CreateButton(levelName, transform, () =>
            {
                ZSerialize.LoadLevel(levelName, levelParent, true);
            });
        }
    }