コード例 #1
0
    public UIManager()
    {
        pHealthBar = GameObject.Find("HealthBar_Back");

        ManaPanel.S_Initialize();
        pCharPanel = GameObject.FindObjectOfType <CharacterPanel>();
        pInvPanel  = GameObject.FindObjectOfType <InventoryPanel>();
        InitPanel(pCharPanel);
        InitPanel(pInvPanel);
    }
コード例 #2
0
    public void TogglePanel(ManaPanel pPanel, bool bOpened)
    {
        pCharPanel.UIElementActive = false;
        pInvPanel.UIElementActive = false;

        pPanel.UIElementActive = bOpened;

        bool bNewState = pCharPanel.UIElementActive || pInvPanel.UIElementActive;
        bool bStateChanged = (m_bUIOpened != bNewState);
        m_bUIOpened = bNewState;

        pHealthBar.SetActive(!m_bUIOpened);

        if (bStateChanged)
            OnMenuOpenClose();
    }
コード例 #3
0
    public void TogglePanel(ManaPanel pPanel, bool bOpened)
    {
        pCharPanel.UIElementActive = false;
        pInvPanel.UIElementActive  = false;

        pPanel.UIElementActive = bOpened;

        bool bNewState     = pCharPanel.UIElementActive || pInvPanel.UIElementActive;
        bool bStateChanged = (m_bUIOpened != bNewState);

        m_bUIOpened = bNewState;

        pHealthBar.SetActive(!m_bUIOpened);

        if (bStateChanged)
        {
            OnMenuOpenClose();
        }
    }
コード例 #4
0
 void InitPanel(ManaPanel pPanel)
 {
     pPanel.Initialize();
     TogglePanel(pPanel, false);
 }
コード例 #5
0
 void InitPanel(ManaPanel pPanel)
 {
     pPanel.Initialize();
     TogglePanel(pPanel, false);
 }