Exemplo n.º 1
0
    void Awake()
    {
        cameraController = Camera.main.GetComponent <CameraController>();
        gameSpeedManager = GetComponent <GameSpeedUpdater>();
        menuManager      = GetComponent <UIMenuManager>();

        gameSpeedManager.RegisterObject(this);

        InitGame();
    }
Exemplo n.º 2
0
 private void Awake()
 {
     if (self == null)
     {
         self = this;
     }
     else
     {
         Destroy(this);
     }
 }
Exemplo n.º 3
0
 // Token: 0x06000584 RID: 1412 RVA: 0x000066E9 File Offset: 0x000048E9
 public static bool MenuIsActive(bool _bypassTimeCheck = false)
 {
     if (UIMenuManager.AnyMenuActive())
     {
         InputManager.menuCooldown = 200;
     }
     else
     {
         InputManager.menuCooldown--;
     }
     return(InputManager.menuCooldown > 0);
 }
Exemplo n.º 4
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Debug.Log("Instance already exists, destroying object");
         Destroy(this);
     }
 }
Exemplo n.º 5
0
    private void OnEnable()
    {
        uISpellsManager = GetComponent <UISpellsManager> ();
        uIMenuManager   = GetComponent <UIMenuManager> ();
        uIInfoPanel     = GetComponent <UIInfoPanel> ();

        var rootGameUI = uiGame.rootVisualElement;

        var rootSpellsUI = uiSpellsPanel.rootVisualElement;

        uISpellsManager.SetRootAndInit(rootSpellsUI);
        uIInfoPanel.SetRootAndInit(rootSpellsUI);

        var rootMenuUI = uiMenu.rootVisualElement;

        uIMenuManager.SetRootAndInit(rootMenuUI);

        menuButton   = rootGameUI.Query <Button> ("menu");
        speedButton  = rootGameUI.Query <Button> ("speed");
        spellsButton = rootGameUI.Query <Button> ("spells-button");

        prepareIcon = rootGameUI.Query <IMGUIContainer> ("prepare-bar-icon");

        messageScreen = rootGameUI.Query <VisualElement> ("message-screen");
        defenceBar    = rootGameUI.Query <VisualElement> ("defence-bar-line");
        manaBar       = rootGameUI.Query <VisualElement> ("mana-bar-line");
        prepareBar    = rootGameUI.Query <VisualElement> ("prepare-bar-line");
        gamePanel     = rootGameUI.Query <VisualElement> ("game-panel");

        //Labels
        messageLabel = rootGameUI.Query <Label> ("message");
        manaValue    = rootGameUI.Query <Label> ("mana-bar-value");
        defenceValue = rootGameUI.Query <Label> ("defence-bar-value");
        spellsText   = rootGameUI.Query <Label> ("spells-txt");
        FontUtilities.SetFontSize42(spellsText);
        spellsNumber = rootGameUI.Query <Label> ("spells-number");
        FontUtilities.SetFontSize42(spellsNumber);
        xPText = rootGameUI.Query <Label> ("exp-text");
        FontUtilities.SetFontSize42(xPText);
        xPoints = rootGameUI.Query <Label> ("exp-number");
        FontUtilities.SetFontSize42(xPoints);
    }
Exemplo n.º 6
0
 public void Construct(UIMenuManager uiMenuManager)
 {
     this.uiMenuManager = uiMenuManager;
     SetState(menuState);
 }
Exemplo n.º 7
0
 public void Construct(AudioSource music, UIMenuManager uiMenuManager)
 {
     this.music         = music;
     this.uiMenuManager = uiMenuManager;
     uiMenuManager.SetMusicToggle(PlayerPrefs.GetInt(StringConstants.PREFS_MUSIC) == 0);
 }
Exemplo n.º 8
0
 private void Awake()
 {
     _instance = this;
 }
Exemplo n.º 9
0
 // Sets the Menu Manager
 public void SetMenuManager(UIMenuManager manager)
 {
     menuManager = manager;
 }
Exemplo n.º 10
0
    void Awake()
    {
        cameraController = Camera.main.GetComponent<CameraController>();
        gameSpeedManager = GetComponent<GameSpeedUpdater>();
        menuManager = GetComponent<UIMenuManager>();

        gameSpeedManager.RegisterObject(this);

        InitGame();
    }
Exemplo n.º 11
0
 // Token: 0x060002D6 RID: 726 RVA: 0x00004779 File Offset: 0x00002979
 private void Update()
 {
     MouseControl.HideMouse(!UIMenuManager.AnyMenuActive());
 }