Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void PlayAnimationClipUnLimit(string name)
|
| | | {
|
| | | AnimationClip _clip = BuiltInLoader.LoadAnimationClip(name);
|
| | | if (_clip != null)
|
| | | {
|
| | | m_Animation.AddClip(_clip, "start_show");
|
| | | m_Animation.Play("start_show");
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnAnimationOver()
|
| | | {
|
| | | IsPlayingAnim = false;
|
| | |
| | | public static void Init()
|
| | | {
|
| | | // 登记相应的数据体及对应的数据转逻辑类
|
| | | Register(typeof(HA327_tagMCRealmExpInfo), typeof(DTCA327_tagMCRealmExpInfo));
|
| | | Register(typeof(HA40C_tagGCAllFamilyBossInfo), typeof(DTCA40C_tagGCAllFamilyBossInfo));
|
| | | Register(typeof(HA3B1_tagMCEquipPartStarInfo), typeof(DTCA3B1_tagMCEquipPartStarInfo));
|
| | | Register(typeof(HA816_tagMCMysticalShopInfo), typeof(DTCA816_tagMCMysticalShopInfo));
|
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A5 21 境界修为池提取 #tagCMTakeOutRealmExp
|
| | |
|
| | | public class CA521_tagCMTakeOutRealmExp : GameNetPackBasic {
|
| | |
|
| | | public CA521_tagCMTakeOutRealmExp () {
|
| | | combineCmd = (ushort)0x03FE;
|
| | | _cmd = (ushort)0xA521;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 60efa2ae65f837242a25ff4bbb5b456b |
| | | timeCreated: 1553064966 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Wednesday, March 20, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using Snxxz.UI;
|
| | | public class DTCA327_tagMCRealmExpInfo : DtcBasic
|
| | | {
|
| | |
|
| | | public override void Done(GameNetPackBasic vNetPack)
|
| | | {
|
| | | base.Done(vNetPack);
|
| | | var package = vNetPack as HA327_tagMCRealmExpInfo;
|
| | | ModelCenter.Instance.GetModel<RealmModel>().ReceivePackage(package);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: bbfa3dbab2a4c2b4fae460fc3830c1a6 |
| | | timeCreated: 1553065107 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A3 27 境界修为池信息 #tagMCRealmExpInfo
|
| | |
|
| | | public class HA327_tagMCRealmExpInfo : GameNetPackBasic {
|
| | | public uint BeginTime; //开始计时时间
|
| | | public uint CurExp; //当前总经验
|
| | | public uint CurExpPoint; //当前总经验点
|
| | |
|
| | | public HA327_tagMCRealmExpInfo () {
|
| | | _cmd = (ushort)0xA327;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out BeginTime, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out CurExp, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out CurExpPoint, vBytes, NetDataType.DWORD);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: cd9074b87c2c7b540b6dfa2ff01c3b0e |
| | | timeCreated: 1553065068 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | get { return wait; }
|
| | | set { wait = value; }
|
| | | }
|
| | | public bool isOpenPanel = true;
|
| | | public bool IsOpenPanel
|
| | | {
|
| | | get { return isOpenPanel; }
|
| | | set { isOpenPanel = value; }
|
| | | }
|
| | | public override void Init()
|
| | | {
|
| | | var AuctionTaxrateConfig = FuncConfigConfig.Get("AuctionTaxrate");
|
| | |
| | | [SerializeField] Button m_TypeTipBtn;
|
| | | [SerializeField] Text m_JobTipText;
|
| | | [SerializeField] Text m_TypeTipText;
|
| | | List<AuctionItemClass> FullServiceAuctionListSort = new List<AuctionItemClass>();//全服拍品列表
|
| | | List<AuctionItemClass> FullServiceAuctionListSort = new List<AuctionItemClass>();//全服拍品列表
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
|
| | |
|
| | | private bool IsSendBool = true;
|
| | | private int Times = 0;
|
| | | protected override void BindController() |
| | | {
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell; |
| | |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | IsSendBool = false; |
| | | Times = 0;
|
| | | auctionHelpModel.isOpenPanel = true;
|
| | | IsSendBool = false;
|
| | | GlobalTimeEvent.Instance.secondEvent += secondEvent; |
| | | model.FullServiceAuctionUpdate += FullServiceAuctionUpdate;//数据请求刷新 |
| | | model.RefreshAuctionItemUpdate += RefreshAuctionItemUpdate;//刷新 |
| | | model.ClearAuctionUpdate += ClearAuctionUpdate;//清除 |
| | |
| | | ListSort(); |
| | | OnCreateGridLineCell(m_ScrollerController); |
| | | OnCreateGridLineCellJob(m_ScrollerControllerJob); |
| | | OnCreateGridLineCellType(m_ScrollerControllerType); |
| | | OnCreateGridLineCellType(m_ScrollerControllerType);
|
| | | OnCreateGridLineCellItem(m_ScrollerControllerItem); |
| | | SetTipText(); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent += secondEvent; |
| | |
|
| | |
|
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | |
| | | model.BiddingItemInfoUpdate -= BiddingItemInfoUpdate;//竞价物品信息刷新
|
| | | GlobalTimeEvent.Instance.secondEvent -= secondEvent; |
| | | }
|
| | | |
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | |
| | | |
| | | private void secondEvent()
|
| | | {
|
| | | Times += 1;
|
| | | if (Times >= 3 && auctionHelpModel.isOpenPanel)
|
| | | {
|
| | | auctionHelpModel.isOpenPanel = false;
|
| | | }
|
| | | if (IsSendBool)
|
| | | {
|
| | | IsSendBool = false;
|
| | |
| | | } |
| | | private void BiddingItemInfoUpdate()
|
| | | {
|
| | | |
| | |
|
| | | } |
| | | private void OnClickJobTipBtn()
|
| | | {
|
| | |
| | | } |
| | | private void OnCreateGridLineCell(ScrollerController gridCtrl)
|
| | | {
|
| | | |
| | |
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i < auctionHelpModel.FullServiceAuctionList.Count; i++)
|
| | | {
|
| | |
| | | if (index != -1)
|
| | | {
|
| | | var fullServiceAuction = auctionHelpModel.FullServiceAuctionList[index];
|
| | | if (fullServiceAuction.ChooseItem1 != null && fullServiceAuction.ChooseItem1.Length!=0)
|
| | | if (fullServiceAuction.ChooseItem1 != null && fullServiceAuction.ChooseItem1.Length != 0)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i < fullServiceAuction.ChooseItem1.Length; i++)
|
| | |
| | | if (index != config.JobEntry)
|
| | | {
|
| | | auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].JobEntry = index;
|
| | | IsSendBool = true; |
| | | IsSendBool = true;
|
| | | SetTipText();
|
| | | }
|
| | | });
|
| | |
| | | if (index != -1)
|
| | | {
|
| | | var fullServiceAuction = auctionHelpModel.FullServiceAuctionList[index];
|
| | | if (fullServiceAuction.ChooseItem2 != null && fullServiceAuction.ChooseItem2.Length!=0)
|
| | | if (fullServiceAuction.ChooseItem2 != null && fullServiceAuction.ChooseItem2.Length != 0)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i < fullServiceAuction.ChooseItem2.Length; i++)
|
| | |
| | | if (index != config.TypeEntry)
|
| | | {
|
| | | auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].TypeEntry = index;
|
| | | IsSendBool=true; |
| | | IsSendBool = true;
|
| | | SetTipText();
|
| | | }
|
| | | });
|
| | |
| | | else
|
| | | {
|
| | | model.LocationQuery = false;
|
| | | } |
| | | }
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i <FullServiceAuctionListSort.Count; i++)
|
| | | for (int i = 0; i < FullServiceAuctionListSort.Count; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | |
| | | {
|
| | | AuctionInquiry.Instance.SendQueryAuction(string.Empty, sendNumber, 1);
|
| | | }
|
| | | |
| | |
|
| | | } |
| | | private void CloseTip()
|
| | | {
|
| | | m_JobTip.SetActive(false);
|
| | | m_TypeTip.SetActive(false);
|
| | | } |
| | | private void SetTipText()
|
| | | private void SetTipText()
|
| | | {
|
| | | var selectedGenreNow = auctionHelpModel.SelectedGenreNow;
|
| | | if (auctionHelpModel.FullServiceAuctionDic.ContainsKey(selectedGenreNow))
|
| | |
| | | }
|
| | | } |
| | | |
| | | private void ListSort()
|
| | | private void ListSort()
|
| | | {
|
| | | FullServiceAuctionListSort.Clear();
|
| | | var sendNumber = AuctionInquiry.Instance.GetSendNumber();
|
| | |
| | | {
|
| | | FullServiceAuctionListSort.Add(vlaue);
|
| | | }
|
| | | } |
| | | }
|
| | | }
|
| | | FullServiceAuctionListSort.Sort(Compare);
|
| | | }
|
| | |
| | | if (havex1.CompareTo(havey1) != 0)//是否参与
|
| | | {
|
| | | return -havex1.CompareTo(havey1);
|
| | | } |
| | | }
|
| | | return 1;
|
| | | }
|
| | | private bool IsHighestPrice(string GUID)
|
| | |
| | | isBool = true;
|
| | | }
|
| | | return isBool;
|
| | | } |
| | | }
|
| | | } |
| | | |
| | | } |
| | |
| | | if (index < 5)
|
| | | {
|
| | | var sendNumber = AuctionInquiry.Instance.GetSendNumber();
|
| | | if (sendNumber != 0 && auctionHelpModel.Wait && model.QueryRemaining.UpBool)
|
| | | if (sendNumber != 0 && auctionHelpModel.Wait && model.QueryRemaining.UpBool && !auctionHelpModel.isOpenPanel)
|
| | | {
|
| | | AuctionInquiry.Instance.SendQueryAuction(fullServiceAuction.ItemGUID, sendNumber, 2);
|
| | | auctionHelpModel.Wait = false;
|
| | |
| | | else if (index >= model.FullServiceAuctionList.Count - 3)
|
| | | {
|
| | | var sendNumber = AuctionInquiry.Instance.GetSendNumber();
|
| | | if (sendNumber != 0 && auctionHelpModel.Wait && model.QueryRemaining.DownBool)
|
| | | if (sendNumber != 0 && auctionHelpModel.Wait && model.QueryRemaining.DownBool && !auctionHelpModel.isOpenPanel)
|
| | | {
|
| | | AuctionInquiry.Instance.SendQueryAuction(fullServiceAuction.ItemGUID, sendNumber, 1);
|
| | | auctionHelpModel.Wait = false;
|
| | |
| | | { |
| | | case PackType.Item: |
| | | UpdateRedpoints(); |
| | | if (selectedLevel.value > 0) |
| | | { |
| | | RefreshCandidateEquips(selectedLevel.value); |
| | | } |
| | | break; |
| | | case PackType.Equip: |
| | | foreach (var set in equipSets.Values) |
| | |
| | | private void UpdateSuitPlaces(int level) |
| | | { |
| | | suitPlaces.Clear(); |
| | | suitPlaceCollectEffects.Clear(); |
| | | for (int i = 1; i <= 8; i++) |
| | | { |
| | | var equip = packModel.GetItemByGuid(GetEquip(new Int2(level, i))); |
| | |
| | |
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } }
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | public void SetEquipStrengthFull(string equipGuid, int level, int equipPlace)
|
| | | {
|
| | | int equipIndex = EquipPlaceMapConfig.GetServerPlace(level, equipPlace);
|
| | |
| | | if (item != null)
|
| | | {
|
| | | m_ItemEquip.Init(item);
|
| | | m_ItemEquip.button.SetListener(() =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, equipGuid, false, true);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | });
|
| | | }
|
| | | var equipLvNowList = strengthModel.GetEquipValueList(level, equipPlace);
|
| | | m_AttributesText1.gameObject.SetActive(false);
|
| | |
| | | [SerializeField] Text m_TextNumber; |
| | | [SerializeField] Text m_TextMaxLv; |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | | EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } } |
| | | public void SetEquipStrengthRein(string equipGuid,int level,int equipPlace) |
| | | { |
| | | EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } }
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } |
| | | public void SetEquipStrengthRein(string equipGuid, int level, int equipPlace) |
| | | {
|
| | | int equipIndex = EquipPlaceMapConfig.GetServerPlace(level, equipPlace); |
| | | int equipLv = 0;
|
| | | EquipStrength equipStrength = new EquipStrength(); |
| | |
| | | if (item != null) |
| | | { |
| | | m_ItemEquip.Init(item); |
| | | m_ItemEquip.button.SetListener(() =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, equipGuid, false, true);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | }); |
| | | } |
| | | m_TextNumber.text = "+" + (equipLv + 1); |
| | | NeedMoney.text = SetMoneyText(itemPlus); |
| | |
| | | } |
| | | ItemCellModel cellModel = new ItemCellModel(2100, true, (ulong)1); |
| | | m_ItemMoney.Init(cellModel); |
| | | m_ItemMoney.button.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(2100, false, (ulong)1);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | }); |
| | | var equipLvNowList = strengthModel.GetEquipValueList(level, equipPlace); |
| | | var equipAddLvList = strengthModel.GetEquipValueList(level, equipPlace,1); |
| | | var equipAddLvList = strengthModel.GetEquipValueList(level, equipPlace, 1); |
| | | m_AttributesText1.gameObject.SetActive(false); |
| | | m_AttributesText2.gameObject.SetActive(false); |
| | | m_AttributesText3.gameObject.SetActive(false); |
| | |
| | | m_Slider.delay = 0f; |
| | | m_Slider.stage = equipLv; |
| | | m_Slider.ResetStage(); |
| | | m_Slider.value = (float)Math.Round((double)equipStrength.Exp/ itemPlus.upExpNeed, 2, MidpointRounding.AwayFromZero); |
| | | m_Slider.value = (float)Math.Round((double)equipStrength.Exp / itemPlus.upExpNeed, 2, MidpointRounding.AwayFromZero); |
| | | } |
| | | else |
| | | { |
| | |
| | | string MoneyStr = ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(3)); |
| | | string NeedMoneyStr = ItemLogicUtility.Instance.OnChangeCoinsUnit(needMoney); |
| | | if (money >= needMoney) |
| | | { |
| | | {
|
| | | strMoneyText = Language.Get("ZBQH_03", NeedMoneyStr, MoneyStr); |
| | | } |
| | | else |
| | |
| | | public class EquipStrengthUpper : MonoBehaviour
|
| | | {
|
| | | [SerializeField] ItemCell m_ItemEquip; |
| | | [SerializeField] ItemCell m_ItemMoney; |
| | | [SerializeField] Text NeedMoney; |
| | | [SerializeField] Text m_AttributesText1;
|
| | | [SerializeField] Text m_AttributesText2;
|
| | |
| | | [SerializeField] Text m_TextNumber;
|
| | | [SerializeField] Text m_TextMaxLv;
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } } |
| | | EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } }
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } |
| | | public void SetEquipStrengthUpper(string equipGuid, int level, int equipPlace)
|
| | | {
|
| | | int equipIndex = EquipPlaceMapConfig.GetServerPlace(level, equipPlace);
|
| | |
| | | if (item != null)
|
| | | {
|
| | | m_ItemEquip.Init(item);
|
| | | m_ItemEquip.button.SetListener(() =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, equipGuid, false, true);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | });
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(2100, true, (ulong)1);
|
| | | m_ItemMoney.Init(cellModel);
|
| | | m_ItemMoney.button.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(2100, false, (ulong)1);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | var equipLvNowList = strengthModel.GetEquipValueList(level, equipPlace);
|
| | | var equipAddLvList = strengthModel.GetEquipValueList(level, equipPlace, 1);
|
| | | m_AttributesText1.gameObject.SetActive(false);
|
| | |
| | | }
|
| | | }
|
| | | m_EffectBoss.StopImediatly();
|
| | |
|
| | | StartLine(index);
|
| | |
|
| | |
|
| | | m_EffectLevelUp.StopImediatly();
|
| | |
| | | yield return WaitingForSecondConst.GetWaitForSeconds(effectTime);
|
| | | }
|
| | |
|
| | | if (index != -1)
|
| | | {
|
| | | m_EffectLines[index].Play();
|
| | | var animator = m_EffectLines[index].target.GetAnimator();
|
| | | animator.Play("open", 0, 0);
|
| | | yield return WaitingForSecondConst.WaitMS500;
|
| | | animator.Play("idle", 0);
|
| | | }
|
| | | var realmStage = GetRealmStageBeha(index + 1);
|
| | | if (realmStage != null)
|
| | | {
|
| | | realmStage.DisplayEffect(true);
|
| | | }
|
| | | yield return WaitingForSecondConst.WaitMS500;
|
| | |
|
| | | if (index == 3 && model.displayRealmLevel < model.realmMaxLevel)
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | void StartLine(int index)
|
| | | {
|
| | | if (index != -1)
|
| | | {
|
| | | StartCoroutine(Co_StartLine(index));
|
| | | }
|
| | | else
|
| | | {
|
| | | var realmStage = GetRealmStageBeha(index + 1);
|
| | | if (realmStage != null)
|
| | | {
|
| | | realmStage.DisplayEffect(true);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator Co_StartLine(int index)
|
| | | {
|
| | | m_EffectLines[index].Play();
|
| | | var animator = m_EffectLines[index].target.GetAnimator();
|
| | | animator.Play("open", 0, 0);
|
| | | yield return WaitingForSecondConst.WaitMS500;
|
| | | animator.Play("idle", 0);
|
| | |
|
| | | var realmStage = GetRealmStageBeha(index + 1);
|
| | | if (realmStage != null)
|
| | | {
|
| | | realmStage.DisplayEffect(true);
|
| | | }
|
| | | }
|
| | |
|
| | | void StartRotate()
|
| | | {
|
| | | rotating = true;
|
| | |
| | | StopCoroutine(m_RotateCoroutine);
|
| | | }
|
| | | m_RotateCoroutine = StartCoroutine(Co_Rotate());
|
| | | }
|
| | |
|
| | | public void StartBossEffectShow()
|
| | | {
|
| | | StartCoroutine(Co_BossEffectShow());
|
| | | }
|
| | |
|
| | | IEnumerator Co_BossEffectShow()
|
| | | {
|
| | | isPlayingBossEffect = true;
|
| | | m_EffectBoss.Play();
|
| | | m_EffectBossWord.Play();
|
| | | Animator animator = null;
|
| | | if (m_EffectBoss.target != null)
|
| | | {
|
| | | animator = m_EffectBoss.target.GetAnimator();
|
| | | animator.Play("Effect_JingJieBJ_02", 0, 0);
|
| | | }
|
| | |
|
| | | if (m_EffectBase.target != null)
|
| | | {
|
| | | var obj = m_EffectBase.target.transform.Find("GameObject/b/b (3)");
|
| | | if (obj != null)
|
| | | {
|
| | | obj.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | yield return WaitingForSecondConst.GetWaitForSeconds(m_CoverDisappearTime);
|
| | | if (m_EffectCover.IsPlaying)
|
| | | {
|
| | | m_EffectCover.StopImediatly();
|
| | | }
|
| | | yield return WaitingForSecondConst.GetWaitForSeconds(2f - m_CoverDisappearTime);
|
| | |
|
| | | isPlayingBossEffect = false;
|
| | |
|
| | | if (onBossAppearComplete != null)
|
| | | {
|
| | | onBossAppearComplete();
|
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator Co_Rotate()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void StartBossEffectShow()
|
| | | {
|
| | | StartCoroutine(Co_BossEffectShow());
|
| | | }
|
| | |
|
| | | IEnumerator Co_BossEffectShow()
|
| | | {
|
| | | isPlayingBossEffect = true;
|
| | | m_EffectBoss.Play();
|
| | | m_EffectBossWord.Play();
|
| | | Animator animator = null;
|
| | | if (m_EffectBoss.target != null)
|
| | | {
|
| | | animator = m_EffectBoss.target.GetAnimator();
|
| | | animator.Play("Effect_JingJieBJ_02", 0, 0);
|
| | | }
|
| | |
|
| | | if (m_EffectBase.target != null)
|
| | | {
|
| | | var obj = m_EffectBase.target.transform.Find("GameObject/b/b (3)");
|
| | | if (obj != null)
|
| | | {
|
| | | obj.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | yield return WaitingForSecondConst.GetWaitForSeconds(m_CoverDisappearTime);
|
| | | if (m_EffectCover.IsPlaying)
|
| | | {
|
| | | m_EffectCover.StopImediatly();
|
| | | }
|
| | | yield return WaitingForSecondConst.GetWaitForSeconds(2f - m_CoverDisappearTime);
|
| | |
|
| | | isPlayingBossEffect = false;
|
| | |
|
| | | if (onBossAppearComplete != null)
|
| | | {
|
| | | onBossAppearComplete();
|
| | | }
|
| | | }
|
| | |
|
| | | public void Dispose()
|
| | | {
|
| | | rotating = false;
|
| | |
| | | SysNotifyMgr.Instance.ShowTip("RealmLevelUpError_2");
|
| | | break;
|
| | | case 3:
|
| | | SysNotifyMgr.Instance.ShowTip("RealmLevelUpError_3");
|
| | | var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(config.NeedGood);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | List<List<int>> m_RealmStages = new List<List<int>>();
|
| | | public int realmMaxLevel { get; private set; }
|
| | | public bool isBossPass { get; private set; }
|
| | | public int realmExpTime { get; private set; }
|
| | | public long startExp { get; private set; }
|
| | |
|
| | | public long totalExp
|
| | | {
|
| | | get
|
| | | {
|
| | | var exp = startExp;
|
| | | var tick = (TimeUtility.ServerNow - expStartTime).Ticks;
|
| | | var singleTick = realmExpTime * TimeSpan.TicksPerSecond;
|
| | | var times = tick / singleTick;
|
| | |
|
| | | var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
|
| | | if (config != null && config.expRate != 0)
|
| | | {
|
| | | exp = times * config.expRate + startExp;
|
| | | exp = exp > config.expLimit ? config.expLimit : exp;
|
| | | }
|
| | |
|
| | | return exp;
|
| | | }
|
| | | }
|
| | |
|
| | | public DateTime expStartTime { get; private set; }
|
| | |
|
| | | public const int REALM_DUNGEON_ID = 31110;
|
| | |
|
| | |
| | | }
|
| | |
|
| | | public event Action selectRealmRefresh;
|
| | | public event Action realmExpRefresh;
|
| | |
|
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | |
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | isBossPass = false;
|
| | | expStartTime = DateTime.Now;
|
| | | startExp = 0;
|
| | | SysNotifyMgr.Instance.OnSystemNotifyEvent -= OnSystemNotifyEvent;
|
| | | }
|
| | |
|
| | |
| | | m_RealmPreviewEquips.Add(config.Lv, dict);
|
| | | }
|
| | | }
|
| | |
|
| | | var funcConfig = FuncConfigConfig.Get("RealmExpTime");
|
| | | realmExpTime = int.Parse(funcConfig.Numerical1);
|
| | | }
|
| | |
|
| | | public bool TryGetRealmProperty(int level, out Dictionary<int, int> propertyDict)
|
| | |
| | | RefreshRedpoint();
|
| | | }
|
| | |
|
| | | public void ReceivePackage(HA327_tagMCRealmExpInfo package)
|
| | | {
|
| | | expStartTime = TimeUtility.GetTime(package.BeginTime);
|
| | | startExp = (long)package.CurExpPoint * Constants.ExpPointValue + package.CurExp;
|
| | | if (realmExpRefresh != null)
|
| | | {
|
| | | realmExpRefresh();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage))
|
| | |
| | | using System.Collections; |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI;
|
| | |
| | | [SerializeField] ImageEx m_Word;
|
| | | [SerializeField] Transform m_Lock;
|
| | | [SerializeField] Text m_Progress;
|
| | | [SerializeField] Button m_TakeExp;
|
| | |
|
| | | int realmLevel = 0;
|
| | |
|
| | | RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
|
| | |
|
| | | private void Awake()
|
| | | {
|
| | | m_TakeExp.AddListener(TakeExp);
|
| | | }
|
| | |
|
| | | public void Display(int realmLevel)
|
| | | {
|
| | | this.realmLevel = realmLevel;
|
| | | var config = RealmConfig.Get(realmLevel);
|
| | | var isOpen = config.expRate != 0;
|
| | | m_Bottom.gray = !isOpen;
|
| | | m_Word.gray = !isOpen;
|
| | | m_Lock.gameObject.SetActive(!isOpen);
|
| | | m_Progress.gameObject.SetActive(isOpen);
|
| | |
|
| | | if (isOpen)
|
| | | {
|
| | | DisplayProgress();
|
| | | }
|
| | |
|
| | | model.realmExpRefresh -= RealmExpRefresh;
|
| | | model.realmExpRefresh += RealmExpRefresh;
|
| | |
|
| | | GlobalTimeEvent.Instance.secondEvent -= PerSecond;
|
| | | GlobalTimeEvent.Instance.secondEvent += PerSecond;
|
| | |
|
| | | }
|
| | |
|
| | | public void DisplayProgress()
|
| | | {
|
| | | var config = RealmConfig.Get(realmLevel);
|
| | | var progress = Mathf.Clamp01((float)model.totalExp / config.expLimit);
|
| | | var progressInt = (int)(progress * 100);
|
| | | m_Progress.text = StringUtility.Contact(progressInt, "%");
|
| | | }
|
| | |
|
| | | private void TakeExp()
|
| | | {
|
| | | var config = RealmConfig.Get(realmLevel);
|
| | | var isOpen = config.expRate != 0;
|
| | | if (isOpen)
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmTakeExpWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | private void PerSecond()
|
| | | {
|
| | | DisplayProgress();
|
| | | }
|
| | |
|
| | | private void RealmExpRefresh()
|
| | | {
|
| | | DisplayProgress();
|
| | | }
|
| | |
|
| | | public void Dispose()
|
| | | {
|
| | | model.realmExpRefresh -= RealmExpRefresh;
|
| | | GlobalTimeEvent.Instance.secondEvent -= PerSecond;
|
| | | }
|
| | | }
|
| | | } |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Wednesday, March 20, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class RealmTakeExpWin : Window
|
| | | {
|
| | | [SerializeField] Text m_TotalExp;
|
| | | [SerializeField] Text m_ExpRate;
|
| | | [SerializeField] Button m_TakeExp;
|
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | RealmModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<RealmModel>(); }
|
| | | }
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_TakeExp.AddListener(TakeExp);
|
| | | m_Close.AddListener(CloseClick);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | Display();
|
| | | GlobalTimeEvent.Instance.secondEvent += PerSecond;
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent -= PerSecond;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | |
|
| | | void Display()
|
| | | {
|
| | | DisplayExp();
|
| | | DisplayRate();
|
| | | }
|
| | |
|
| | | void DisplayExp()
|
| | | {
|
| | | var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
|
| | | var expLabel = UIHelper.ReplaceLargeNum(model.totalExp);
|
| | | var expLimitLabel = UIHelper.ReplaceLargeNum(config.expLimit);
|
| | | m_TotalExp.text = StringUtility.Contact(expLabel, "/", expLimitLabel);
|
| | | }
|
| | |
|
| | | void DisplayRate()
|
| | | {
|
| | | var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
|
| | | m_ExpRate.text = Language.Get("RealmExpRate", model.realmExpTime, UIHelper.ReplaceLargeNum(config.expRate));
|
| | | }
|
| | |
|
| | | private void PerSecond()
|
| | | {
|
| | | DisplayExp();
|
| | | }
|
| | |
|
| | | private void TakeExp()
|
| | | {
|
| | | CA521_tagCMTakeOutRealmExp pak = new CA521_tagCMTakeOutRealmExp();
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 37d48d8cfc34fd04995fc93fbfdaf43a |
| | | timeCreated: 1553067471 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | [SerializeField] UIAlphaTween m_AlphaTween;
|
| | | [SerializeField] Transform m_ContainerProgress;
|
| | | [SerializeField] Image m_Progress;
|
| | | [SerializeField, Header("进入时间"), Range(0.1f, 5f)] float m_Duration = 1f;
|
| | | [SerializeField, Header("进度时长"), Range(0.1f, 5f)] float m_Duration = 0.8f;
|
| | |
|
| | | float timer = 0f;
|
| | | #region Built-in
|
| | |
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | StartCoroutine(Co_Enter());
|
| | | if (!CameraController.Instance.IsPlayingAnim)
|
| | | {
|
| | | CameraController.Instance.PlayAnimationClipUnLimit("RealmFuncOpen");
|
| | | }
|
| | | m_AlphaTween.Play(OnTweenComplete);
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | protected override void OnPreClose()
|
| | | {
|
| | | WindowCenter.Instance.windowBeforeOpenEvent -= WindowBeforeOpenEvent;
|
| | | StopAllCoroutines();
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | protected override void LateUpdate()
|
| | | {
|
| | | base.LateUpdate();
|
| | | if (m_Progress.fillAmount <= m_Duration)
|
| | | if (m_Progress.fillAmount <= 1f)
|
| | | {
|
| | | var progress = Mathf.Clamp01(timer / m_Duration);
|
| | | m_Progress.fillAmount = progress;
|
| | |
| | | timer += Time.deltaTime;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | IEnumerator Co_Enter()
|
| | | {
|
| | | yield return WaitingForSecondConst.GetWaitForSeconds(m_Duration);
|
| | | CameraController.Instance.PlayAnimationClip("RealmFuncOpen");
|
| | | m_AlphaTween.Play(OnTweenComplete);
|
| | | }
|
| | |
|
| | | private void WindowBeforeOpenEvent(Window window)
|
| | | {
|
| | |
| | | [SerializeField] Transform m_ContainerRealmUp;
|
| | | [SerializeField] RealmBriefBehaviour m_RealmBrief;
|
| | | [SerializeField] RealmLevelUpBehaviour m_RealmLevelUp;
|
| | | [SerializeField] RealmPoolBehaviour m_RealmPool;
|
| | | [SerializeField] RealmAnimationBehaviour m_RealmAnimation;
|
| | | [SerializeField] RealmStageBehaviour[] m_RealmStages;
|
| | | [SerializeField] Transform m_ContainerUnlockEquip;
|
| | |
| | | DisplayRealmLevelUp();
|
| | | DisplayRealmStages();
|
| | | DisplayRealmBrief();
|
| | | DisplayRealmPool();
|
| | | DisplayUnlockEquip();
|
| | | DisplayCover();
|
| | |
|
| | |
| | | m_RealmBriefTween.SetEndState();
|
| | | m_RealmLevelUpTween.Stop();
|
| | | m_RealmLevelUpTween.SetEndState();
|
| | | m_RealmPool.Dispose();
|
| | | model.displayRealms.Clear();
|
| | | foreach (var item in m_RealmStages)
|
| | | {
|
| | |
| | | void DisplayRealmBrief()
|
| | | {
|
| | | m_RealmBrief.Display(model.selectRealm);
|
| | | }
|
| | |
|
| | | void DisplayRealmPool()
|
| | | {
|
| | | m_RealmPool.Display(model.displayRealmLevel);
|
| | | }
|
| | |
|
| | | void DisplayUnlockEquip()
|
| | |
| | | model.displayRealms.Clear();
|
| | | model.selectRealm = PlayerDatas.Instance.baseData.realmLevel + 1;
|
| | | DisplayRealmStages();
|
| | | DisplayRealmPool();
|
| | | DisplayCover();
|
| | | DisplayEffectBoss();
|
| | | }
|
| | |
| | | {
|
| | | TryStartAnimation();
|
| | | }
|
| | |
|
| | | DisplayRealmPool();
|
| | | }
|
| | |
|
| | | private void OnLevelUpComplete()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | DisplayRealmPool();
|
| | |
|
| | | if (customUpPower > 0)
|
| | | {
|
| | | mainDateModel.CustomPowerUp((int)customUpPower);
|