/// <summary> /// 初始化容器 /// </summary> /// <param name="tapIndex">Tap index.</param> public void initContent(int tapIndex) { resetContentsActive(); GameObject content = getContent(tapIndex); switch (tapIndex) { case TAP_SHOP_CONTENT: titleText.text = LanguageConfigManager.Instance.getLanguage("shop02"); ContentShopPoint csp = content.GetComponent <ContentShopPoint> (); csp.init(this); break; case TAP_MYSTICAL_CONTENT: titleText.text = LanguageConfigManager.Instance.getLanguage("shop_mystical"); ContentMysticalShop cms = content.GetComponent <ContentMysticalShop> (); cms.init(this); break; case TAP_TEHUI_CONTEXT: titleText.text = LanguageConfigManager.Instance.getLanguage("shop_tehui"); ContentTeHuiShop cmss = content.GetComponent <ContentTeHuiShop> (); cmss.init(this); break; } if (GuideManager.Instance.isEqualStep(132003000)) { GuideManager.Instance.doGuide(); GuideManager.Instance.guideEvent(); } }
public override void buttonEventBase(GameObject gameObj) { base.buttonEventBase(gameObj); if (gameObj.name == "close") { if (callback != null) { callback(); callback = null; return; } finishWindow(); } else { GameObject content = getContent(currentTapIndex); if (currentTapIndex == TAP_SHOP_CONTENT) { ContentShopPoint sshc = content.GetComponent <ContentShopPoint> (); sshc.buttonEventBase(gameObj); } else if (currentTapIndex == TAP_MYSTICAL_CONTENT) { ContentMysticalShop ssec = content.GetComponent <ContentMysticalShop> (); ssec.buttonEventBase(gameObj); } } }
/** 更新节点容器 */ public void UpdateContent() { GameObject content = getContent(currentTapIndex); if (currentTapIndex == TAP_SHOP_CONTENT) { titleText.text = LanguageConfigManager.Instance.getLanguage("shop02"); ContentShopPoint csp = content.GetComponent <ContentShopPoint>(); csp.updateUI(); } else if (currentTapIndex == TAP_MYSTICAL_CONTENT) { titleText.text = LanguageConfigManager.Instance.getLanguage("shop_mystical"); ContentMysticalShop cms = content.GetComponent <ContentMysticalShop> (); cms.updateUI(); } else if (currentTapIndex == TAP_TEHUI_CONTEXT) { titleText.text = LanguageConfigManager.Instance.getLanguage("shop_tehui"); ContentTeHuiShop cmss = content.GetComponent <ContentTeHuiShop> (); cmss.updateUI(); } }