コード例 #1
0
    private void InitStoredGameLoaderMenu()
    {
        storedGameLoaderMenu.menuName.text = "Load stored game";
        List <string> storedGameNames = PersistanceHelper.GetStoredGameNames();

        foreach (string storedGameName in storedGameNames)
        {
            storedGameLoaderMenu.AddButton(storedGameName, delegate { LoadStoredGame(storedGameName); });
        }
        storedGameLoaderMenu.AddBackButton();
    }
コード例 #2
0
 public void InitMenu()
 {
     menuController = this.gameObject.GetComponent <ModalMenuController>();
     saveButton.onClick.AddListener(DeleteSelectedGames);
     storedGameNames   = PersistanceHelper.GetStoredGameNames();
     selectedGameNames = new List <string>();
     foreach (string storedGameName in storedGameNames)
     {
         menuController.AddButton(storedGameName, delegate { HandleClickOnGameName(storedGameName); });
     }
     if (storedGameNames.Count != 0)
     {
         InitColors(storedGameNames[0]);
     }
     initiated = true;
 }
コード例 #3
0
    private void RefreshStoredGamesMenu()
    {
        List <string> storedGameNames = PersistanceHelper.GetStoredGameNames();

        storedGameLoaderMenu.KeepButtons(storedGameNames);
    }