public void Show(EctypeContainerListPanel myParent) { gameObject.SetActive(true); MyParent = myParent; Init(); ShowPanel(); }
/*private bool isInEctypeContainer(int ectypeID) * { * * }*/ public void UpdateStatus(EctypeContainerListPanel myParent) { this.MyParent = myParent; CurrentStarNum = 0; foreach (var child in EctypeModel.Instance.sMSGEctypeSelect_SC.sMSGEctypeData_SCs) { if (myParent.myEctypeContainerIDList.Contains((int)child.dwEctypeContaienrID) && child.byGrade == 6) //sss评分 { CurrentStarNum++; } } curFullStarNum = myParent.EctypeSelectData.Difficult2Container.Count + myParent.EctypeSelectData._vectContainer.Length; GetStarNumLabel.SetText(string.Format("{0}/{1}", CurrentStarNum, curFullStarNum)); SliderBar.sliderValue = CurrentStarNum / (float)curFullStarNum; EffectPos.ClearChild(); switch (GetTreausreChestsStatus()) { case TreasureItemStatus.Close: BackgroundSwith.ChangeSprite(1); break; case TreasureItemStatus.isOpended: BackgroundSwith.ChangeSprite(2); break; case TreasureItemStatus.CanOpend: BackgroundSwith.ChangeSprite(1); CreatObjectToNGUI.InstantiateObj(EnabelEffect, EffectPos); break; } }
public void Init(int esyContaienrID, int diffContainerID, EctypeContainerListPanel myParent, int pointEctypeID) { MyParent = myParent; IsLock = myParent.EctypeIDIsLock(esyContaienrID); EsyContainerID = esyContaienrID; DiffContainerID = diffContainerID; LockPos.gameObject.SetActive(IsLock); LevelLabel.gameObject.SetActive(!IsLock); EctypeNameLabel.gameObject.SetActive(!IsLock); //EctypeIconPos.gameObject.SetActive(!IsLock); StarPos_Esy.gameObject.SetActive(!IsLock); StarPos_Diff.gameObject.SetActive(!IsLock); EctypeIconPos.ClearChild(); EctypeContainerIconData ectypeIconData = myParent.EctypeIconData.iconDataList.First(P => P.lEctypeContainerID == EsyContainerID); CreatObjectToNGUI.InstantiateObj(ectypeIconData.EctypeIconPrefab, EctypeIconPos); if (IsLock) { return; } StarPos_Esy.ClearChild(); StarPos_Diff.ClearChild(); CreatObjectToNGUI.InstantiateObj(GetStarPrefab(esyContaienrID), StarPos_Esy); CreatObjectToNGUI.InstantiateObj(GetStarPrefab(diffContainerID), StarPos_Diff); var ectypeContainerData = EctypeConfigManager.Instance.EctypeContainerConfigList[esyContaienrID]; EctypeNameLabel.SetButtonText(LanguageTextManager.GetString(ectypeContainerData.lEctypeName)); LevelLabel.SetButtonText(ectypeContainerData.lMinActorLevel.ToString()); //if(isPointEctype || (!isPointEctype && (myParent.isMaxEctypeContaienrID(esyContaienrID)||myParent.isMaxEctypeContaienrID(diffContainerID))) ) if (pointEctypeID != -1 && (pointEctypeID == esyContaienrID || pointEctypeID == diffContainerID)) { OnClickEvent(false); } else if (pointEctypeID == -1 && (myParent.isMaxEctypeContaienrID(esyContaienrID) || myParent.isMaxEctypeContaienrID(diffContainerID))) { OnClickEvent(false); } mobaMark.SetActive(ectypeContainerData.IsMOBA == 0?false:true); #region ` 引导注入代码 gameObject.RegisterBtnMappingId(esyContaienrID, UIType.Battle, BtnMapId_Sub.Battle_EctypeChoice); #endregion }
public void Init(int esyEctypeContaienrID, int diffEctypeContaienrID, EctypeContainerListPanel myParent) { EctypeContainerData esyData; EctypeConfigManager.Instance.EctypeContainerConfigList.TryGetValue(esyEctypeContaienrID, out esyData); EctypeContainerData diffData; EctypeConfigManager.Instance.EctypeContainerConfigList.TryGetValue(diffEctypeContaienrID, out diffData); this.EsyEctypeContainerData = esyData; this.DiffEctypeContainerData = diffData; /*if (diffData == null) { * TitleBtn_Diff.gameObject.SetActive (false); * } else { * TitleBtn_Diff.gameObject.SetActive(true); * }*/ //TitleBtn_Esy.SetCallBackFuntion(OnTitleBtnClick,EsyEctypeContainerData); //TitleBtn_Diff.SetCallBackFuntion(OnTitleBtnClick,DiffEctypeContainerData); MyParent = myParent; //选中默认难度按钮 SelectTitleBtn(EsyEctypeContainerData); if (MyParent.EctypeIDIsLock(diffEctypeContaienrID)) { /*TitleBtn_Diff.spriteSwithList.ApplyAllItem(P=>P.ChangeSprite(1)); * TitleBtn_Diff.spriteSwith.ChangeSprite(3); * TitleBtn_Diff.Enable = false;*/ SetCreateTeam(EsyEctypeContainerData.AllowCreatTeam); } else { //TitleBtn_Diff.Enable = true; SetCreateTeam(DiffEctypeContainerData.AllowCreatTeam); } InitSweep(esyEctypeContaienrID, true); UpdateLabel(); }
public void Init(EctypeContainerListPanel myParent) { MyParent = myParent; }