コード例 #1
0
 private void InitMenu(GameElementManager gem)
 {
     elementManager = gem;
     menuController = this.gameObject.GetComponent <ModalMenuController>();
     saveButton.onClick.AddListener(SaveGame);
     saveButton.GetComponentInChildren <Text>().text = LabelUtility.Instance.GetLabel(LabelNames.SAVE);
     menuController.SetMenuName(LabelUtility.Instance.GetLabel(LabelNames.SAVE));
     inputPlaceholder.text = LabelUtility.Instance.GetLabel(LabelNames.SAVENAME);
     foreach (string savedGameName in ObjectManager.CurrentGEM.savedGameNames)
     {
         menuController.AddButton(savedGameName, delegate { SetSaveName(savedGameName); });
     }
 }
コード例 #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
 public void SetParentModalController(ModalMenuController parent)
 {
     this.parentModalController = parent;
 }