Пример #1
0
 public void InitPanel(int index, EctypeSelectConfigData ectypeSelectConfigData, EctypePanel_V4 myParent)
 {
     this.PositionIndex = index;
     this.myParent      = myParent;
     if (transform.childCount > 0)
     {
         transform.ClearChild();
     }
     this.ectypeSelectConfigData = ectypeSelectConfigData;
     this.ectypeSelectConfigData.InitectContainer();
     for (int i = 0; i < this.ectypeSelectConfigData._vectContainer.Length; i++)
     {
         //add by lee 如果是封妖副本 break
         if (ectypeSelectConfigData._vectContainer[i] == ectypeSelectConfigData._sirenEctypeContainerID)
         {
             break;
         }
         GameObject EctypeCard = null;
         EctypeCard = CreatObjectToNGUI.InstantiateObj(LocalEctypeCarPrefab, transform);
         LocalEctypePanel_v3 ectypeCard = EctypeCard.GetComponent <LocalEctypePanel_v3>();
         ectypeCard.ContainerID = ectypeSelectConfigData._lEctypeID;
         ectypeCard.InitPanel(this.ectypeSelectConfigData._vectContainer[i], myParent);
         this.LocalPanelList.Add(ectypeCard);
     }
     SetMyPosition(index);
 }
Пример #2
0
        public void OnSelectEctype(LocalEctypePanel_v3 localEctypePanel_v3)
        {
            OnSelectEctypeCard = localEctypePanel_v3;

//            StroyLineDataManager.Instance.CurSelectEctype(OnSelectEctypeCard.sMSGEctypeData_SC);
//
//            ShowBtnCostInfo();
//            foreach (var child in LocalEctypePanelList)
//            {
//                child.OnSelectEctypeCard(OnSelectEctypeCard.sMSGEctypeData_SC);
//            }
        }
Пример #3
0
//        public void UnlockMyPanel(SMSGEctypeData_SC sMSGEctypeData_SC)
//        {
//            if(sMSGEctypeData_SC.dwEctypeID == this.ectypeSelectConfigData._lEctypeID)
//            {
//                int EctypeID = 0;
//                if(this.ectypeSelectConfigData.VectContainerList.TryGetValue(sMSGEctypeData_SC.byDiff,out EctypeID))
//                {
//                    var EctypeCard = LocalPanelList.SingleOrDefault(P=>P.ectypeContainerData.lEctypeContainerID == EctypeID);
//                    if (EctypeCard != null)
//                    {
//                        EctypeCard.UnlockMyself(sMSGEctypeData_SC);
//                        m_IsFirstEctypeUnlock = true;
//                    }
//                }
//            }
//        }
//
//        public EctypeContainerData GetSingleEctypeData(SMSGEctypeData_SC sMSGEctypeData_SC)
//        {
//            EctypeContainerData ectypeContainerData;
//            ectypeContainerData = this.LocalPanelList.SingleOrDefault(P => P.sMSGEctypeData_SC.dwEctypeID == sMSGEctypeData_SC.dwEctypeID&& P.sMSGEctypeData_SC.byDiff == sMSGEctypeData_SC.byDiff).ectypeContainerData;
//            return ectypeContainerData;
//        }
//
//        public void SelectPanel(SMSGEctypeData_SC sMSGEctypeData_SC)
//        {
//            var SelectPanel = LocalPanelList.FirstOrDefault(P => P.sMSGEctypeData_SC.dwEctypeID == sMSGEctypeData_SC.dwEctypeID && P.sMSGEctypeData_SC.byDiff == sMSGEctypeData_SC.byDiff);
//            if (SelectPanel != null)
//            {
//                SelectPanel.SelectMyself();
//            }
//            //for (int i = 0; i < LocalPanelList.Count; i++)
//            //{
//            //    if (LocalPanelList[i].SelectMyself())
//            //        return;
//            //}
//        }
//
//        public void OnSelectEctypeCard(SMSGEctypeData_SC sMSGEctypeData_SC)
//        {
//            foreach (var child in LocalPanelList)
//            {
//                child.UnSelectMyself(sMSGEctypeData_SC);
//            }
//        }

        /// <summary>
        /// 出现妖女副本
        /// </summary>
        /// <param name="regionID">区域id</param>
        /// <param name="ectypeID">副本id</param>
        /// <param name="time">时间(毫秒)</param>
        public void AppearSirenEctype(int regionID, int ectypeID, int time)
        {
            if (this.LocalPanelList.Any(p => p.ectypeContainerData.lEctypeContainerID == ectypeID))
            {
                return;
            }

            GameObject EctypeCard = null;

            EctypeCard = CreatObjectToNGUI.InstantiateObj(LocalEctypeCarPrefab, transform);
            LocalEctypePanel_v3 ectypeCard = EctypeCard.GetComponent <LocalEctypePanel_v3>();

            ectypeCard.ContainerID = this.ectypeSelectConfigData._lEctypeID;
            ectypeCard.CreateSirenPanel(regionID, ectypeID, myParent, time);
            this.LocalPanelList.Add(ectypeCard);
        }