Exemple #1
0
    public override void InitBuildModel()
    {
        base.InitBuildModel();
        //临时做法
        if (LifeEnvironment.Edit == Environment)
        {
            m_CurrentGlod = UserDC.GetCoin();
        }
        else
        {
            m_CurrentGlod = CmCarbon.DefenderInfo.Coin;
        }
        int typeGold = ConfigM.GetGoldType(m_CurrentGlod);

        if (m_Property == null)
        {
            Debug.Log("Building1300 error");
            return;
        }

        m_goBody01 = m_Property.HelpPoint.GetVauleByKey(BuildHelpPointName.body01);
        m_goBody02 = m_Property.HelpPoint.GetVauleByKey(BuildHelpPointName.body02);
        m_goBody03 = m_Property.HelpPoint.GetVauleByKey(BuildHelpPointName.body03);
        m_goBody04 = m_Property.HelpPoint.GetVauleByKey(BuildHelpPointName.body04);
        m_goBody05 = m_Property.HelpPoint.GetVauleByKey(BuildHelpPointName.body05);
        (m_Property as BuildProperty).SetAllBodyActive(false);
        if (typeGold == 1)
        {
            m_goBody01.SetActive(true);
        }
        else if (typeGold == 2)
        {
            m_goBody02.SetActive(true);
        }
        else if (typeGold == 3)
        {
            m_goBody03.SetActive(true);
        }
        else if (typeGold == 4)
        {
            m_goBody04.SetActive(true);
        }
        else
        {
            m_goBody05.SetActive(true);
        }
    }