/// <summary> /// 切换页签的时候关闭掉页签碰撞,等数据接受完再打开 /// </summary> /// <param name="index"></param> public void HideCheckBox(int index) { for (int i = 0; i < checkBoxs.GetBoxList().Length; i++) { if (index == i) { checkBoxs.GetBoxList()[i].GetComponent <BoxCollider>().enabled = true; checkBoxs.GetBoxList()[i].isEnabled = true; } else { checkBoxs.GetBoxList()[i].isEnabled = false; checkBoxs.GetBoxList()[i].GetComponent <BoxCollider>().enabled = false; } } }
protected override void Init() { instance = this; HeroPosEmb = GameObject.Find("HeroPosEmbattle"); dingweigrid = transform.Find("DingweiContainer/Grid").GetComponent <UIGrid>(); tediangrid = transform.Find("TedianContainer/Grid").GetComponent <UIGrid>(); login = VOManager.Instance().GetCSV <LoginCSV>("Login").GetVoList(); sureBtn.onClick = OnSureBtn; //randomBtn.onClick = OnRandomClick; pai1 = transform.Find("pai1").GetComponent <UIToggle>(); pai2 = transform.Find("pai2").GetComponent <UIToggle>(); pai3 = transform.Find("pai3").GetComponent <UIToggle>(); skillMultList = transform.Find("ScrollView/MultList").GetComponent <GUISingleMultList>(); skillPanel = transform.Find("SkillDescribePanel"); heroName = transform.Find("Name").GetComponent <UILabel>(); des = transform.Find("ScrollViewLabel/Des").GetComponent <UILabel>(); checkBoxs.onClick = OnCreateRoleClick; boxs = checkBoxs.GetBoxList(); //for (int i = 0; i < boxs.Length; i++) //{ // boxs[i].GetComponent<UISprite>().spriteName = ((LoginVO)login[i + 1]).card_name.Trim(); //} //checkBoxs.onHover = OnCreateRoleHover; //selectRoleSceneObj = GameObject.Find("Xuanren").transform; EventDelegate ed2 = new EventDelegate(this, "OnSelectCard"); pai1.onChange.Add(ed2); pai2.onChange.Add(ed2); pai3.onChange.Add(ed2); backBtn.onClick = OnBackClick; //if (FSDataNodeTable<PlayerNameNode>.GetSingleton().DataNodeList.Count > 0) //{ // nodeDic = FSDataNodeTable<PlayerNameNode>.GetSingleton().DataNodeList; // foreach (var nameLists in nodeDic) // { // playerData.GetInstance().selfData.nameList.Add(nameLists.Value); // } //} InitNameList(); //EventDelegate.Add(nicknameInput.GetComponent<UIInput>().onChange, OnChange); spinWithMouse = transform.Find("HeroTexture").GetComponent <SpinWithMouse>(); collder = transform.transform.Find("HeroTexture").GetComponent <BoxCollider>(); }
public void SetCheckBoxGroup() { GUISingleCheckBox[] aa = checkBoxs.GetBoxList(); if (SocietyManager.Single().societyStatus == SocietyStatus.Member) { if (aa.Length >= 3) { aa[aa.Length - 1].gameObject.SetActive(false); aa[aa.Length - 2].gameObject.SetActive(false); Singleton <RedPointManager> .Instance.DeletChildFlag(EnumRedPoint.RD_Guild, 1); redPoint.Hide(); } } else if (SocietyManager.Single().societyStatus == SocietyStatus.President) { aa[aa.Length - 1].gameObject.SetActive(false); aa[aa.Length - 2].gameObject.SetActive(true); } }
/// <summary> /// 英雄详情标签 /// </summary> /// <param name="index"></param> /// <param name="boo"></param> private void OnDetailsTabClick(int index, bool boo) { if (index == 4) { //英雄的技能开放验证 if (!DataDefine.isSkipFunction && !FunctionOpenMng.GetInstance().GetFunctionOpen(7)) { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[7].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); return; } } if (index == 3) { //英雄的装备页签开放验证 if (!DataDefine.isSkipFunction && !FunctionOpenMng.GetInstance().GetFunctionOpen(14)) { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[14].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); return; } } if (boo == false) { return; } UpGradeStar.gameObject.SetActive(false); Equip.gameObject.SetActive(false); heroDes.gameObject.SetActive(false); HeroSkill.gameObject.SetActive(false); Runes.gameObject.SetActive(false); breakthrough.gameObject.SetActive(false); switch (index) { case 0: if (playerData.GetInstance().GetHeroDataByID((Globe.selectHero.hero_id)) == null) { detailsTab.GetBoxList()[0].transform.Find("Label").GetComponent <UILabel>().text = "技能"; SkillListShow(); for (int i = 1; i < detailsTab.GetBoxList().Length; i++) { detailsTab.GetBoxList()[i].gameObject.SetActive(false); } } else { HeroAndEquipNodeData.TabType = 0; HeroAndEquipNodeData.TanNUm = 0; NameArea.gameObject.SetActive(true); Blickline.gameObject.SetActive(false); heroDes.ShowOrHidePanel(false); ScrollViewResetPosition(); Property.SetActive(true); upGradeProperty.SetActive(false); Property.transform.localPosition = new Vector3(408, -110, 0); detailsTab.GetBoxList()[0].transform.Find("Label").GetComponent <UILabel>().text = "属性"; for (int i = 0; i < detailsTab.GetBoxList().Length; i++) { detailsTab.GetBoxList()[i].gameObject.SetActive(true); } } //HeroDescription.Instance().OnAttributesBtn(); //Control.ShowGUI(GameLibrary.UI_HeroDetail); //SkillListShow(); break; case 1: HeroAndEquipNodeData.TabType = 0; HeroAndEquipNodeData.TanNUm = 1; NameArea.gameObject.SetActive(true); Blickline.gameObject.SetActive(true); UpGradeStar.gameObject.SetActive(true); if (UpGradeState) { UpdateInfo(); UpGradeState = false; } ScrollViewResetPosition(); Property.SetActive(false); upGradeProperty.SetActive(true); Property.transform.localPosition = new Vector3(408, 70, 0); break; case 2: HeroAndEquipNodeData.TabType = 0; HeroAndEquipNodeData.TanNUm = 2; NameArea.gameObject.SetActive(true); breakthrough.gameObject.SetActive(true); Blickline.gameObject.SetActive(false); Property.SetActive(true); upGradeProperty.SetActive(false); Property.transform.localPosition = new Vector3(408, 56, 0); ScrollViewResetPosition(); break; case 3: //装备 HeroAndEquipNodeData.TabType = 0; HeroAndEquipNodeData.TanNUm = 3; BtnState = true; AdvancedBtn.gameObject.SetActive(true); HeroPreview.gameObject.SetActive(true); EquipIntensify.gameObject.SetActive(false); NameArea.gameObject.SetActive(false); Blickline.gameObject.SetActive(false); Equip.gameObject.SetActive(true); Property.SetActive(false); upGradeProperty.SetActive(false); EquipPanel.instance.ShowEquip(hd); ScrollViewResetPosition(); break; case 4: // HeroAndEquipNodeData.TabType = 0; // HeroAndEquipNodeData.TanNUm = 4; // BtnState = false; // AdvancedBtn.gameObject.SetActive(false); // HeroPreview.gameObject.SetActive(false); // EquipIntensify.gameObject.SetActive(true); // NameArea.gameObject.SetActive(false); // Blickline.gameObject.SetActive(false); // Equip.gameObject.SetActive(true); // EquipPanel.instance.ShowEquip(hd); // ScrollViewResetPosition(); // break; //case 5: SkillListShow(); break; default: break; } }