public void Init(ItemItem itemConfig, int showOrder, WeaponRaiseNode parent)
        {
            gameObject.SetActive(true);
            m_Parent = parent;
            Item.gameObject.SetActive(true);
            m_ItemConfig = itemConfig;
            transform.SetSiblingIndex(1 * (showOrder * 10000 + m_ItemConfig.showorder));

            GeneralConfigItem gCfg = Global.gApp.gGameData.GeneralConfigData.Get(GeneralConfigConstVal.ASK_WEAPON_OPEN_PASS);

            if (gCfg != null)
            {
                int id       = int.Parse(gCfg.contents[0]);
                int openPass = int.Parse(gCfg.contents[1]);
                if (m_ItemConfig.id == id && Global.gApp.gSystemMgr.GetPassMgr().GetPassSerial() <= openPass)
                {
                    Item.gameObject.SetActive(false);
                    return;
                }
            }

            UIFresh();
            NewbieGuideButton[] newBieButtons = this.GetComponentsInChildren <NewbieGuideButton>();
            foreach (NewbieGuideButton newBieButton in newBieButtons)
            {
                newBieButton.Param = m_WeaponName;
                newBieButton.OnStart();
            }
        }
예제 #2
0
        protected override void InitOnceInfo()
        {
            base.InitOnceInfo();
            RegisterListeners();

            m_WeaponNode = GetComponentInChildren <WeaponRaiseNode>();
            m_WeaponNode.Init(this);

            m_ExchangeNode = GetComponentInChildren <MatExchangeNode>();
            m_ExchangeNode.Init(this);
            InitNode();
        }