Exemple #1
0
 /// <summary>
 /// Set color of button which should be active (this difficult level is sets)
 /// </summary>
 /// <param name="levelName">name of level (Difficult, Medium, Easy) must be same as a button</param>
 public void SetLevel(int difficultLevel)
 {
     setButtonState(difficultButton, StateVar.getTextColor(Menu.menuType), 30);
     setButtonState(mediumButton, StateVar.getTextColor(Menu.menuType), 30);
     setButtonState(easyButton, StateVar.getTextColor(Menu.menuType), 30);
     setButtonState(Utility.FindChildByName(((difficultyLevel)difficultLevel).ToString(), transform),
                    StateVar.getHeaderColor(Menu.menuType), 50);
     SaveManager.instance.data.SetData(StateVar.prefLevelName, (int)difficultLevel, SaveData.saveDictionariesTypes.options);
 }
 void Start()
 {
     timeForLevel *= LevelMenu.getTimeAmountMultiply();
     SetDetailsLevel();
     Menu.loadMenuType(StateVar.getHeaderColor(type), StateVar.getTextColor(type));
     hourglass = Hourglass.instance;
     hourglass.startTiming(timeForLevel);
     maxShootedTargetsAmount = GameObject.FindGameObjectsWithTag("Target").Length;
     EventManager.StartListening("Endgame", EndGame);
 }
Exemple #3
0
 void loadMenuType(string type)
 {
     headerColor = StateVar.getHeaderColor(type);
     textColor   = StateVar.getTextColor(type);
     loadMenuType(headerColor, textColor);
 }