예제 #1
0
    public void ShowByType(EnergyNoEnoughUITab type, bool isShow = true)
    {
        if (m_goGOEnergyNoEnoughUIGridDescBuy == null)
        {
            m_goGOEnergyNoEnoughUIGridDescBuy = FindTransform("GOEnergyNoEnoughUIGridDescBuy").gameObject;
        }
        if (m_goGOEnergyNoEnoughUIGridDescLimit == null)
        {
            m_goGOEnergyNoEnoughUIGridDescLimit = FindTransform("GOEnergyNoEnoughUIGridDescLimit").gameObject;
        }
        if (m_goGOEnergyNoEnoughUIGridDescOther == null)
        {
            m_goGOEnergyNoEnoughUIGridDescOther = FindTransform("GOEnergyNoEnoughUIGridDescOther").gameObject;
        }

        m_goGOEnergyNoEnoughUIGridDescBuy.SetActive(false);
        m_goGOEnergyNoEnoughUIGridDescLimit.SetActive(false);
        m_goGOEnergyNoEnoughUIGridDescOther.SetActive(false);

        switch (type)
        {
        case EnergyNoEnoughUITab.BuyEnergyTab:
        {
            m_goGOEnergyNoEnoughUIGridDescBuy.SetActive(isShow);
            ShowGridBtn(true);
        } break;

        case EnergyNoEnoughUITab.LimitActivityTab:
        {
            m_goGOEnergyNoEnoughUIGridDescLimit.SetActive(isShow);
            ShowGridBtn(true);
        } break;

        case EnergyNoEnoughUITab.OtherSystemTab:
        {
            m_goGOEnergyNoEnoughUIGridDescOther.SetActive(isShow);
        } break;

        default:
            break;
        }
    }
예제 #2
0
    void OnChooseWay(int way)
    {
        CurrentGuideType = (EnergyNoEnoughUITab)way;

        switch ((EnergyNoEnoughUITab)way)
        {
        case EnergyNoEnoughUITab.BuyEnergyTab:
        {
            SetBuyEnergy();
        } break;

        case EnergyNoEnoughUITab.LimitActivityTab:
        {
            SetLimitActivity();
        } break;

        case EnergyNoEnoughUITab.OtherSystemTab:
        {
            SetNoNeedEnergy();
        } break;
        }
    }
예제 #3
0
    public void ShowByType(EnergyNoEnoughUITab type, bool isShow = true)
    {
        if (m_goGOEnergyNoEnoughUIGridDescBuy == null)
            m_goGOEnergyNoEnoughUIGridDescBuy = FindTransform("GOEnergyNoEnoughUIGridDescBuy").gameObject;
        if (m_goGOEnergyNoEnoughUIGridDescLimit == null)
            m_goGOEnergyNoEnoughUIGridDescLimit = FindTransform("GOEnergyNoEnoughUIGridDescLimit").gameObject;
        if (m_goGOEnergyNoEnoughUIGridDescOther == null)
            m_goGOEnergyNoEnoughUIGridDescOther = FindTransform("GOEnergyNoEnoughUIGridDescOther").gameObject;

        m_goGOEnergyNoEnoughUIGridDescBuy.SetActive(false);
        m_goGOEnergyNoEnoughUIGridDescLimit.SetActive(false);
        m_goGOEnergyNoEnoughUIGridDescOther.SetActive(false);

        switch (type)
        {
            case EnergyNoEnoughUITab.BuyEnergyTab:
                {
                    m_goGOEnergyNoEnoughUIGridDescBuy.SetActive(isShow);
                    ShowGridBtn(true);
                }break;
            case EnergyNoEnoughUITab.LimitActivityTab:
                {
                    m_goGOEnergyNoEnoughUIGridDescLimit.SetActive(isShow);
                    ShowGridBtn(true);
                }break;
            case EnergyNoEnoughUITab.OtherSystemTab:
                {
                    m_goGOEnergyNoEnoughUIGridDescOther.SetActive(isShow);
                }break;
            default:
                break;
        }
    }
    void OnChooseWay(int way)
    {
        CurrentGuideType = (EnergyNoEnoughUITab)way;

        switch ((EnergyNoEnoughUITab)way)
        {
            case EnergyNoEnoughUITab.BuyEnergyTab:
                {
                    SetBuyEnergy();
                }break;
            case EnergyNoEnoughUITab.LimitActivityTab:
                {
                    SetLimitActivity();
                }break;
            case EnergyNoEnoughUITab.OtherSystemTab:
                {
                    SetNoNeedEnergy();
                }break;
        }       
    }