| | |
| | | [SerializeField] List<CommonItemBaisc> firstItemlist = new List<CommonItemBaisc>();
|
| | | [SerializeField] List<CommonItemBaisc> secondItemlist = new List<CommonItemBaisc>();
|
| | | [SerializeField] List<CommonItemBaisc> thirdItemlist = new List<CommonItemBaisc>();
|
| | | [SerializeField] Button m_Recharge;
|
| | |
|
| | | FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } }
|
| | | KingFairyModel kingFairyModel { get { return ModelCenter.Instance.GetModel<KingFairyModel>(); } }
|
| | |
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | |
| | | m_Recharge.SetListener(GotoRecharge);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | |
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | |
| | | private void Init()
|
| | | {
|
| | | ceremonyModel.SendGetRankInfo(RankType.Def_BT_FCCostGold);
|
| | | SetRankAward(firstItemlist,ceremonyModel.GetRankAwardByLv(1));
|
| | | SetRankAward(firstItemlist, ceremonyModel.GetRankAwardByLv(1));
|
| | | SetRankAward(secondItemlist, ceremonyModel.GetRankAwardByLv(2));
|
| | | SetRankAward(thirdItemlist, ceremonyModel.GetRankAwardByLv(3));
|
| | | RefreshRankInfo();
|
| | | RefreshSecond();
|
| | | }
|
| | |
|
| | |
|
| | | private void OnRefreshRankList(int type)
|
| | | {
|
| | |
| | | if (list.Count > 0)
|
| | | {
|
| | | firstNameText.text = list[0].name1;
|
| | | SetRankEffect(0,(int)list[0].id);
|
| | | SetRankEffect(0, (int)list[0].id);
|
| | | }
|
| | |
|
| | | if (list.Count > 1)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void SetRankEffect(int rank,int playerId)
|
| | | private void SetRankEffect(int rank, int playerId)
|
| | | {
|
| | | for(int i = 0; i < rankEffectlist.Count; i++)
|
| | | for (int i = 0; i < rankEffectlist.Count; i++)
|
| | | {
|
| | | if(rank == i && playerId == PlayerDatas.Instance.baseData.PlayerID)
|
| | | if (rank == i && playerId == PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | | if(!rankEffectlist[i].IsPlaying)
|
| | | if (!rankEffectlist[i].IsPlaying)
|
| | | {
|
| | | rankEffectlist[i].Play();
|
| | | }
|
| | |
| | | private void RefreshSecond()
|
| | | {
|
| | | int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.FairyCeremony);
|
| | | if(seconds > 0)
|
| | | if (seconds > 0)
|
| | | {
|
| | | remainTimeText.text = StringUtility.Contact("<color=#8DDC11FF>", TimeUtility.SecondsToHMS(seconds), "</color>");
|
| | | }
|
| | | else
|
| | | {
|
| | | remainTimeText.text = UIHelper.AppendColor(TextColType.Red,Language.Get("XMZZ110"));
|
| | | remainTimeText.text = UIHelper.AppendColor(TextColType.Red, Language.Get("XMZZ110"));
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | private void SetRankAward(List<CommonItemBaisc> baiscs,List<FairylandCeremonyModel.AwardItem> list)
|
| | | private void SetRankAward(List<CommonItemBaisc> baiscs, List<FairylandCeremonyModel.AwardItem> list)
|
| | | {
|
| | | if (list == null) return;
|
| | |
|
| | |
| | | {
|
| | | baiscs[i].gameObject.SetActive(true);
|
| | | FairylandCeremonyModel.AwardItem itemData = list[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true, (ulong)itemData.itemCount);
|
| | | baiscs[i].Init(cellModel);
|
| | | baiscs[i].button.RemoveAllListeners();
|
| | | baiscs[i].button.AddListener(() =>
|
| | | {
|
| | | switch(itemData.itemId)
|
| | | switch (itemData.itemId)
|
| | | {
|
| | | case 2278:
|
| | | kingFairyModel.ViewKingFairyChest(itemData.itemId,itemData.itemCount);
|
| | | kingFairyModel.ViewKingFairyChest(itemData.itemId, itemData.itemCount);
|
| | | break;
|
| | | default:
|
| | | ItemTipUtility.Show(itemData.itemId);
|
| | | break;
|
| | | }
|
| | | |
| | |
|
| | | });
|
| | | }
|
| | | else
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void GotoRecharge()
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo( JumpUIType.VipRechargeFunc1);
|
| | | }
|
| | |
|
| | | }
|
| | | }
|