Core/GameEngine/DataToCtl/PackageRegedit.cs
@@ -477,6 +477,7 @@ Register(typeof(HB510_tagGCBiddingItemInfo), typeof(DTCB510_tagGCBiddingItemInfo)); #endregion Register(typeof(HA3B3_tagMCEquipPartPlusInfo), typeof(DTCA3B3_tagMCEquipPartPlusInfo));//装备强化 Register(typeof(HA502_tagMCFamilyActivityExchangeResult), typeof(DTCA502_tagMCFamilyActivityExchangeResult));//装备换活跃度 } private static void Register(Type _pack, Type _business) Core/NetworkPackage/ClientPack/ClientToMapServer/CA6_Family/CA606_tagCMFamilyActivityExchange.cs
New file @@ -0,0 +1,22 @@ using UnityEngine; using System.Collections; // A6 06 家族兑换活跃令 #tagCMFamilyActivityExchange public class CA606_tagCMFamilyActivityExchange : GameNetPackBasic { public byte Count; //材料所在背包索引的数量 public ushort[] IndexList; //材料所在背包索引列表 public uint[] ItemIDList; //材料所在背包物品ID列表 public CA606_tagCMFamilyActivityExchange () { combineCmd = (ushort)0x03FE; _cmd = (ushort)0xA606; } public override void WriteToBytes () { WriteBytes (Count, NetDataType.BYTE); WriteBytes (IndexList, NetDataType.WORD, Count); WriteBytes (ItemIDList, NetDataType.DWORD, Count); } } Core/NetworkPackage/ClientPack/ClientToMapServer/CA6_Family/CA606_tagCMFamilyActivityExchange.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 1ada5429f23a310409413aab69463435 timeCreated: 1560135823 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA502_tagMCFamilyActivityExchangeResult.cs
New file @@ -0,0 +1,15 @@ using UnityEngine; using System.Collections; using Snxxz.UI; // A5 02 家族活跃令兑换结果 #tagMCFamilyActivityExchangeResult public class DTCA502_tagMCFamilyActivityExchangeResult : DtcBasic { private ExchangeActiveTokenModel m_ExchangeModel { get { return ModelCenter.Instance.GetModel<ExchangeActiveTokenModel>(); } } public override void Done(GameNetPackBasic vNetPack) { base.Done(vNetPack); HA502_tagMCFamilyActivityExchangeResult vNetData = vNetPack as HA502_tagMCFamilyActivityExchangeResult; m_ExchangeModel.ReciveExchangeResult(vNetData); } } Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA502_tagMCFamilyActivityExchangeResult.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: ecd85f072841839448d8748a71c9edce timeCreated: 1560135957 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/ServerPack/HA5_Family/HA502_tagMCFamilyActivityExchangeResult.cs
New file @@ -0,0 +1,17 @@ using UnityEngine; using System.Collections; // A5 02 家族活跃令兑换结果 #tagMCFamilyActivityExchangeResult public class HA502_tagMCFamilyActivityExchangeResult : GameNetPackBasic { public uint Point; // 活跃令 public HA502_tagMCFamilyActivityExchangeResult () { _cmd = (ushort)0xA502; } public override void ReadFromBytes (byte[] vBytes) { TransBytes (out Point, vBytes, NetDataType.DWORD); } } Core/NetworkPackage/ServerPack/HA5_Family/HA502_tagMCFamilyActivityExchangeResult.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 5f57f5aebd2fc664dbed44c5fa334584 timeCreated: 1560136026 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/Dungeon/IceCrystalVeinModel.cs
@@ -5,9 +5,7 @@ //冰晶矿脉新 using System; using System.Collections.Generic; using Snxxz.UI; [XLua.LuaCallCSharp] public class IceLodeStarAwardClass @@ -40,8 +38,7 @@ DungeonModel m_Model; DungeonModel model { get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<DungeonModel>()); } } public const int ICECRYSTALVEIN_MAPID = 31140; public const int ICECRYSTALVEIN_REDPOINT = 78102; public Redpoint Redpoint = new Redpoint(78001, ICECRYSTALVEIN_REDPOINT); public override void Init() { var IceLodeCfg = FuncConfigConfig.Get("IceLodeCfg"); @@ -61,10 +58,6 @@ private void dungeonRecordChangeEvent(int fbId) { if (fbId == ICECRYSTALVEIN_MAPID) { IsShowRedPoint(); } } public override void UnInit() @@ -75,7 +68,6 @@ { model.dungeonRecordChangeEvent += dungeonRecordChangeEvent; AddIceLodeStarAwardList(); IsShowRedPoint(); } private void Assignment() @@ -126,7 +118,6 @@ HasSweep = (int)info.HasSweep; DayLv = (int)info.DayLV; AddIceLodeStarAwardList(); IsShowRedPoint(); if (UpdateIceLodeInf != null) { UpdateIceLodeInf(); @@ -162,7 +153,7 @@ public bool IsFree(int Index) { DungeonRecord dungeonRecord; if (model.TryGetRecord(31140, out dungeonRecord)) if (model.TryGetRecord(ICECRYSTALVEIN_MAPID, out dungeonRecord)) { if (dungeonRecord.lineGrades.ContainsKey(Index)) { @@ -195,28 +186,6 @@ { IceLodeStarAwardList.Add(Dic); } } } private void IsShowRedPoint()//是否显示红点 { bool Isbool = false; for (int i = 0; i < IceLodeStarAwardList.Count; i++) { IceLodeStarAwardClass IceLode = IceLodeStarAwardList[i]; int All_star = GetAllStar(); bool _bool = MathUtility.GetBitValue((uint)AwardRecord, (ushort)IceLode.Index); if (All_star >= IceLode.Star && !_bool) { Isbool = true; } } if (Isbool) { Redpoint.state = RedPointState.Simple; } else { Redpoint.state = RedPointState.None; } } } System/FairyAu/EquipCellLine.cs
New file @@ -0,0 +1,19 @@ using Snxxz.UI; using System.Collections; using System.Collections.Generic; using UnityEngine; public class EquipCellLine : ScrollItem { [SerializeField] ExchangeEquipCell[] m_EquipCells; public override void Display(object _data) { base.Display(_data); var data = (ItemModel[])_data; for (int i = 0; i < data.Length; i++) { m_EquipCells[i].SetSelf(data[i]); } } } System/FairyAu/EquipCellLine.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 5f95b96c2fff6fb41917e377d1c6aca8 timeCreated: 1560151090 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/FairyAu/ExchangeActiveSuccessWin.cs
New file @@ -0,0 +1,46 @@ using Snxxz.UI; using System.Collections; using System.Collections.Generic; using UnityEngine; using System; using UnityEngine.UI; public class ExchangeActiveSuccessWin : Window { [SerializeField] Button m_UseBtn; [SerializeField] Text m_ActiveCount; private ExchangeActiveTokenModel m_Model { get { return ModelCenter.Instance.GetModel<ExchangeActiveTokenModel>(); } } protected override void AddListeners() { m_UseBtn.AddListener(() => Close()); } protected override void BindController() { } protected override void OnAfterClose() { } protected override void OnAfterOpen() { } protected override void OnPreClose() { } protected override void OnPreOpen() { m_ActiveCount.text = m_Model.NewActivePoint.ToString(); } } System/FairyAu/ExchangeActiveSuccessWin.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 94015ec0376ce5a41826a3992dc7768c timeCreated: 1560232461 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/FairyAu/ExchangeActiveTokenModel.cs
New file @@ -0,0 +1,241 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using Snxxz.UI; using System; using System.Text.RegularExpressions; public class ExchangeActiveTokenModel : Model { private PackModel m_PackModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } private EquipStarModel m_EquipStarModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } private EquipModel m_EquipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } public HashSet<ItemModel> ChoseEquips { get; private set; } public int NewActivePoint { get; private set; } public int SuitEquipActiveCount { get; private set; } public int NormalEquipActiveCount { get; private set; } public event Action RefreshActiveCanGetEvent; public event Action ExchangetSuccessEvent; public override void Init() { ChoseEquips = new HashSet<ItemModel>(); ParseConfig(); } public override void UnInit() { } public void ReciveExchangeResult(HA502_tagMCFamilyActivityExchangeResult info) { NewActivePoint = (int)info.Point; WindowCenter.Instance.Open<ExchangeActiveSuccessWin>(); if (ExchangetSuccessEvent != null) { ExchangetSuccessEvent(); } } private bool IsBetterThanBodyEquip(ItemModel item) { if(item.config.JobLimit != PlayerDatas.Instance.baseData.Job) { return false; } var equipGUID = m_EquipModel.GetEquip(new Int2(1, item.config.Type - 100)); var equip = m_PackModel.GetItemByGuid(equipGUID); if(equip == null) { return true; } if(equip.config.LV < item.config.LV) { return true; } if(equip.score < item.score) { return true; } return false; } public void EquipCellClick(ItemModel item ,Action CellAct) { if(ChoseEquips.Contains(item)) { ChoseEquips.Remove(item); } else { ChoseEquips.Add(item); } CellAct(); if (RefreshActiveCanGetEvent != null) { RefreshActiveCanGetEvent(); } } public int GetTotalActiveCount() { int totalCount = 0; foreach (var equip in ChoseEquips) { if(equip.config.SuiteiD == 0) { totalCount += NormalEquipActiveCount; } else { totalCount += SuitEquipActiveCount; } } return totalCount; } public void ParseConfig() { Regex r = new Regex(@"\[(\d+),(\d+)\]"); var res = r.Match(FuncConfigConfig.Get("FamilyDonate").Numerical1); NormalEquipActiveCount = int.Parse(res.Groups[1].Value); SuitEquipActiveCount = int.Parse(res.Groups[2].Value); } public void SendExchangeRequest() { Action SendInfo = () => { var info = new CA606_tagCMFamilyActivityExchange(); info.Count = (byte)ChoseEquips.Count; info.IndexList = new ushort[info.Count]; info.ItemIDList = new uint[info.Count]; int i = 0; foreach (var equip in ChoseEquips) { info.IndexList[i] = (ushort)equip.gridIndex; info.ItemIDList[i] = (uint)equip.itemId; i++; } GameNetSystem.Instance.SendInfo(info); }; bool bIsHasBetterEquip = false; foreach (var equip in ChoseEquips) { if(IsBetterThanBodyEquip(equip)) { bIsHasBetterEquip = true; break; } } if(bIsHasBetterEquip) { ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("ExchangeActiveTokenWin_Tip_4"), (bIsExchange) => { if (bIsExchange) { SendInfo(); } }); } else { SendInfo(); } } public List<ItemModel> GetShowEquips() { ChoseEquips.Clear(); SinglePack.FilterParams par = new SinglePack.FilterParams(); par.qualitys = new List<int>() { 4 }; par.itemTypes = new List<int>() { 101, 102, 103, 104, 105, 106, 107, 108 }; var suitEquips = m_PackModel.GetItems(PackType.Item, par); Int2 equPos = new Int2(1, 1); bool bIsAllEquMaxStar = true; for (int i = 1; i < 9; ++i) { equPos.y = i; int posStarLevel = m_EquipStarModel.GetStarLevel(equPos); int equMaxStarLevel = m_EquipStarModel.GetEquipPositionMaxStarLevel(equPos); if(equMaxStarLevel > posStarLevel || equMaxStarLevel == 0) { bIsAllEquMaxStar = false; break; } } Debug.LogFormat("<color=#00ff00ff>{0}</color>", bIsAllEquMaxStar); var playerJob = PlayerDatas.Instance.baseData.Job; //物品排序 for (int i = 0; i < suitEquips.Count; i++) { var iEqu = suitEquips[i]; if (bIsAllEquMaxStar) { if(!IsBetterThanBodyEquip(iEqu)) { ChoseEquips.Add(iEqu); } } for (int j = i - 1; j >= 0; j--) { var jEqu = suitEquips[j]; bool bHasIEqu = ChoseEquips.Contains(iEqu); bool bHasJEqu = ChoseEquips.Contains(jEqu); if (!bHasIEqu && bHasJEqu) { break; } if(bHasIEqu && !bHasJEqu) { goto Swap; } if(iEqu.config.LV > jEqu.config.LV) { break; } if(iEqu.config.LV < jEqu.config.LV) { goto Swap; } if(iEqu.config.JobLimit > jEqu.config.JobLimit) { break; } if (iEqu.config.JobLimit < jEqu.config.JobLimit) { goto Swap; } if (iEqu.config.Type > jEqu.config.Type) { break; } if (iEqu.config.Type < jEqu.config.Type) { goto Swap; } if (iEqu.score >= jEqu.score) { break; } Swap: suitEquips[j + 1] = jEqu; suitEquips[j] = iEqu; } } return suitEquips; } } System/FairyAu/ExchangeActiveTokenModel.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 826676fe2901c4b4c80dc4324266c3dc timeCreated: 1559801992 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/FairyAu/ExchangeActiveTokenWin.cs
New file @@ -0,0 +1,102 @@ using Snxxz.UI; using System.Collections; using System.Collections.Generic; using UnityEngine; using System; using UnityEngine.UI; public class ExchangeActiveTokenWin : Window { [SerializeField] CyclicScroll m_EquipsScroll; [SerializeField] Button m_CloseBtn; [SerializeField] Button m_ConvertBtn; [SerializeField] Text m_ActiveCanGetText; [SerializeField] Text m_ActiveCountText; private ExchangeActiveTokenModel m_Model { get { return ModelCenter.Instance.GetModel<ExchangeActiveTokenModel>(); } } private const int MINLINECOUNT = 5; protected override void AddListeners() { m_CloseBtn.AddListener(() => Close()); m_ConvertBtn.AddListener(OnConvertBtnDown); } protected override void BindController() { } protected override void OnAfterClose() { m_EquipsScroll.Dispose(); m_Model.RefreshActiveCanGetEvent -= RefreshActiveCanGet; m_Model.ExchangetSuccessEvent -= ExchangeSuccess; } protected override void OnAfterOpen() { } protected override void OnPreClose() { } protected override void OnPreOpen() { RefreshEquipsScroll(); RefreshActiveCanGet(); RefreshActiveCount(); m_Model.RefreshActiveCanGetEvent += RefreshActiveCanGet; m_Model.ExchangetSuccessEvent += ExchangeSuccess; } private void ExchangeSuccess() { Close(); } private void RefreshActiveCanGet() { m_ActiveCanGetText.text = m_Model.GetTotalActiveCount().ToString(); } private void RefreshActiveCount() { m_ActiveCountText.text = UIHelper.ReplaceLargeNum(UIHelper.GetMoneyCnt(15)); } private void OnConvertBtnDown() { m_Model.SendExchangeRequest(); } private void RefreshEquipsScroll() { var itemModelList = m_Model.GetShowEquips(); int count = itemModelList.Count / 5 + (itemModelList.Count % 5 == 0 ? 0 : 1); count = Mathf.Max(MINLINECOUNT, count); List<ItemModel[]> itemModelAryList = new List<ItemModel[]>(); for (int i = 0; i < count; i++) { ItemModel[] itemModelAry = new ItemModel[5]; for (int j = 0; j < 5; j++) { int id = 5 * i + j; if (id >= itemModelList.Count) { break; } itemModelAry[j] = itemModelList[id]; } itemModelAryList.Add(itemModelAry); } m_EquipsScroll.Init(itemModelAryList); } } System/FairyAu/ExchangeActiveTokenWin.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 9f12ccd457dc4034f980f8c5a286523b timeCreated: 1559802030 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/FairyAu/ExchangeEquipCell.cs
New file @@ -0,0 +1,38 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using Snxxz.UI; using UnityEngine.UI; public class ExchangeEquipCell : MonoBehaviour { [SerializeField] ItemCell m_ItemCell; [SerializeField] Image m_ChoseImg; private ItemModel m_ItemModel; private ExchangeActiveTokenModel m_Model { get { return ModelCenter.Instance.GetModel<ExchangeActiveTokenModel>(); } } public void SetSelf(ItemModel item) { m_ItemModel = item; if(m_ItemModel == null) { m_ItemCell.gameObject.SetActive(false); m_ChoseImg.gameObject.SetActive(false); return; } m_ItemCell.gameObject.SetActive(true); bool bIsChose = m_Model.ChoseEquips.Contains(m_ItemModel); m_ChoseImg.gameObject.SetActive(bIsChose); m_ItemCell.Init(item, true); m_ItemCell.button.RemoveAllListeners(); m_ItemCell.button.AddListener(() => { m_Model.EquipCellClick(m_ItemModel, ()=> { m_ChoseImg.gameObject.SetActive(m_Model.ChoseEquips.Contains(m_ItemModel)); }); }); } } System/FairyAu/ExchangeEquipCell.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 411b050b83331844d975f91460e2e6ff timeCreated: 1560150075 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/FairyAu/FairyBasicFunctionWin.cs
@@ -23,6 +23,7 @@ [SerializeField] Text textFairyName; [SerializeField] Text textFairyLv; [SerializeField] Text m_FairyRankTxt; [SerializeField] Button m_ExchangeBtn; StoreModel _storeModel; StoreModel m_storeModel @@ -54,6 +55,7 @@ SkillBtn.onClick.AddListener(SkillBtna); HallBtn.onClick.AddListener(HallButton); FairyAuBtn.AddListener(FairyAuButton); m_ExchangeBtn.AddListener(() => WindowCenter.Instance.Open<ExchangeActiveTokenWin>()); } protected override void OnPreOpen() System/MainInterfacePanel/HighSettingTip.cs
@@ -2,19 +2,15 @@ // [Author]: 第二世界 // [ Date ]: Friday, September 08, 2017 //-------------------------------------------------------- using UnityEngine; using System.Collections; using UnityEngine; using UnityEngine.UI; using System; using System.Collections.Generic; //顶层面板框按钮 namespace Snxxz.UI { public class HighSettingTip : MonoBehaviour { [SerializeField] Button _DaTreasureBtn;//打宝按钮 [SerializeField] Button m_LootPrecious;//夺宝 [SerializeField] Button _MarketBtn;//市场按钮 @@ -100,13 +96,13 @@ void MarketButton()//市场按钮 { WindowCenter.Instance.Close<MainInterfaceWin>(); HighSettingFadeInFadeOut.SetAutoCloseTimer(); WindowCenter.Instance.Open<AuctionHouseWin>(); } void OpenService()//开服活动 { WindowCenter.Instance.Close<MainInterfaceWin>(); HighSettingFadeInFadeOut.SetAutoCloseTimer(); WindowCenter.Instance.Open<OpenServerActivityWin>(); } @@ -114,7 +110,7 @@ { if (FuncOpen.Instance.IsFuncOpen(79)) { WindowCenter.Instance.Close<MainInterfaceWin>(); HighSettingFadeInFadeOut.SetAutoCloseTimer(); WindowCenter.Instance.Open<StoreWin>(); } else @@ -125,12 +121,14 @@ void WelfareButton()//福利按钮 { HighSettingFadeInFadeOut.SetAutoCloseTimer(); WelfareCenter.Instance.OpenWelfare(); } void DaTreasureButton()//打宝按钮 { WindowCenter.Instance.Close<MainInterfaceWin>(); HighSettingFadeInFadeOut.SetAutoCloseTimer(); if (NewBieCenter.Instance.inGuiding && NewBieCenter.Instance.currentGuide == 111) { @@ -144,7 +142,7 @@ void LootPreciousButton()//夺宝 { WindowCenter.Instance.Close<MainInterfaceWin>(); HighSettingFadeInFadeOut.SetAutoCloseTimer(); WindowCenter.Instance.Open<LootPreciousFrameWin>(false, 1); } @@ -156,17 +154,16 @@ return; } HighSettingFadeInFadeOut.SetAutoCloseTimer(); switch (m_RechargetBtnBehaviour.state) { case 1: if (!NewBieCenter.Instance.inGuiding) { WindowCenter.Instance.Close<MainInterfaceWin>(); WindowCenter.Instance.Open<FirstRechargeWin>(true); } break; case 3: WindowCenter.Instance.Close<MainInterfaceWin>(); WindowCenter.Instance.Open<VipRechargeWin>(false, 0); break; } @@ -174,69 +171,62 @@ void RuneTaButton()//符印塔 { WindowCenter.Instance.Close<MainInterfaceWin>(); HighSettingFadeInFadeOut.SetAutoCloseTimer(); WindowCenter.Instance.Open<TowerWin>(false, 0); } void OnClickHappyXBBtn()//寻宝 { WindowCenter.Instance.Close<MainInterfaceWin>(); HighSettingFadeInFadeOut.SetAutoCloseTimer(); WindowCenter.Instance.Open<HappyXBWin>(); } void OnClickFindHostBtn()//仙宝寻主 { WindowCenter.Instance.Close<MainInterfaceWin>(); HighSettingFadeInFadeOut.SetAutoCloseTimer(); WindowCenter.Instance.Open<TreasureFindHostWin>(); } void OnClickElfFestivalBtn() { WindowCenter.Instance.Close<MainInterfaceWin>(); HighSettingFadeInFadeOut.SetAutoCloseTimer(); WindowCenter.Instance.Open<FairylandCeremonyWin>(); } void OnClickCrossServerBtn()//跨服PK { int limitlv = FuncOpenLVConfig.Get(157).LimitLV; HighSettingFadeInFadeOut.SetAutoCloseTimer(); if (FuncOpen.Instance.IsFuncOpen(157) && TimeUtility.OpenDay >= crossServerModel.afterOpenDayOpenCross) { WindowCenter.Instance.Close<MainInterfaceWin>(); WindowCenter.Instance.Open<CrossServerWin>(); } else { WindowCenter.Instance.Open<CrossServerWin>(); //if (PlayerDatas.Instance.baseData.LV < limitlv) //{ // SysNotifyMgr.Instance.ShowTip("CrossMatching14", limitlv); //} //else //{ // SysNotifyMgr.Instance.ShowTip("CrossMatching15", crossServerModel.afterOpenDayOpenCross); //} } } private void OpenHazyRegion() { WindowCenter.Instance.Close<MainInterfaceWin>(); HighSettingFadeInFadeOut.SetAutoCloseTimer(); WindowCenter.Instance.Open<HazyRegionFrameWin>(); } void OnClickOpenServiceBtn() { HighSettingFadeInFadeOut.SetAutoCloseTimer(); WindowCenter.Instance.Open<AchievementActivityWin>(); } void OnClickNewYearBtn() { WindowCenter.Instance.Close<MainInterfaceWin>(); HighSettingFadeInFadeOut.SetAutoCloseTimer(); WindowCenter.Instance.Open<NewYearFairylandCeremonyWin>(); } private void RefreshOSCEffect() { HighSettingFadeInFadeOut.SetAutoCloseTimer(); var _open = ModelCenter.Instance.GetModel<ImpactRankModel>().OSCEffectOpen; if (_open && !m_OSCEffect.IsPlaying) { @@ -250,6 +240,7 @@ private void OnStoreFuncOpen() { HighSettingFadeInFadeOut.SetAutoCloseTimer(); RefreshStoreEffect(); } System/MainInterfacePanel/LowSettingTip.cs
@@ -40,7 +40,6 @@ _Synthesis1Btn.onClick.AddListener(Synthesis1Button); _Rune1Btn.onClick.AddListener(Rune1Button); _Pet1Btn.onClick.AddListener(Pet1Button); //_RealmBtn.onClick.AddListener(OnRealmButton); _SetUp1Btn.onClick.AddListener(SetUp1Btn); _RankingListBtn.onClick.AddListener(RankingListButton); m_BagualuBtn.AddListener(OnClickBagualuBtn); @@ -67,19 +66,19 @@ void Role1Button() { MainPositionTween.SetRecoverToSkillTimer(); ModelCenter.Instance.GetModel<RoleModel>().OpenRolePanel(); } void OnClickBagualuBtn() { WindowCenter.Instance.Close<MainInterfaceWin>(); MainPositionTween.SetRecoverToSkillTimer(); WindowCenter.Instance.Open<AlchemyBaseWin>(); } void SkillButton() { WindowCenter.Instance.Close<MainInterfaceWin>(); MainPositionTween.SetRecoverToSkillTimer(); var skillModel = ModelCenter.Instance.GetModel<SkillModel>(); var treasureSkillModel = ModelCenter.Instance.GetModel<TreasureSkillModel>(); @@ -106,13 +105,14 @@ void OpenTreasure() { MainPositionTween.SetRecoverToSkillTimer(); if (!treasureModel.SatisfyEntranceOpen()) { treasureModel.DisplayEntranceLimitHint(); return; } WindowCenter.Instance.Close<MainInterfaceWin>(); if (treasureModel.IsRequireUnlockAnim(TreasureCategory.Human) != 0) { treasureModel.currentCategory = TreasureCategory.Human; @@ -137,57 +137,56 @@ private void GodBeastBtn() { WindowCenter.Instance.Close<MainInterfaceWin>(); MainPositionTween.SetRecoverToSkillTimer(); WindowCenter.Instance.Open<DogzWin>(); } void Strengthen1Button() { WindowCenter.Instance.Close<MainInterfaceWin>(); MainPositionTween.SetRecoverToSkillTimer(); WindowCenter.Instance.Open<EquipFrameWin>(false, EquipFrameWin.GetRedpointFunction()); } void OpenEquip() { WindowCenter.Instance.Close<MainInterfaceWin>(); MainPositionTween.SetRecoverToSkillTimer(); WindowCenter.Instance.Open<RealmEquipWin>(); } void Asuram1Button() { WindowCenter.Instance.Close<MainInterfaceWin>(); MainPositionTween.SetRecoverToSkillTimer(); ModelCenter.Instance.GetModel<FairyModel>().GotoFairyWin(); } void Synthesis1Button() { WindowCenter.Instance.Close<MainInterfaceWin>(); MainPositionTween.SetRecoverToSkillTimer(); WindowCenter.Instance.Open<ComposeWin>(); } void Rune1Button() { WindowCenter.Instance.Close<MainInterfaceWin>(); MainPositionTween.SetRecoverToSkillTimer(); WindowCenter.Instance.Open<RunePanel>(); } void Pet1Button() { WindowCenter.Instance.Close<MainInterfaceWin>(); MainPositionTween.SetRecoverToSkillTimer(); WindowCenter.Instance.Open<PetWin>(); } void SetUp1Btn() { WindowCenter.Instance.Close<MainInterfaceWin>(); MainPositionTween.SetRecoverToSkillTimer(); WindowCenter.Instance.Open<SettingUpWin>(); //DesignDebug.Log("设置按钮"); } void RankingListButton()//排行榜 { MainPositionTween.SetRecoverToSkillTimer(); WindowCenter.Instance.Open<RankFrameWin>(); WindowCenter.Instance.Close<MainInterfaceWin>(); } System/MainInterfacePanel/MainInterfaceWin.cs
@@ -339,7 +339,8 @@ m_MainPositionTween.SwitchFunctions(new MainPositionTween.SwitchParam() { showDefault = !MainPositionTween.isDefaultState, immediately = false immediately = false, manual = true, } ); } System/MainInterfacePanel/MainPositionTween.cs
@@ -122,9 +122,18 @@ public static bool isDefaultState { get; private set; } public static event Action<bool> switchFunctionStateEvent; float resetToDefaultTimer = 0; static float resetToDefaultTimer = 0; public static void SetRecoverToSkillTimer() { resetToDefaultTimer = 20f; } public void SwitchFunctions(SwitchParam switchParams) { if (switchParams.manual && switchParams.showDefault) { resetToDefaultTimer = 0f; } ProcessSwitch(switchParams); } @@ -182,7 +191,11 @@ break; } var rightBottomState = switchParams.showDefault && !isGuiding && !treasureModel.newGotShowing ? RightBottomState.Skill : RightBottomState.Function; var rightBottomState = resetToDefaultTimer <= 0f && switchParams.showDefault && !isGuiding && !treasureModel.newGotShowing ? RightBottomState.Skill : RightBottomState.Function; switch (rightBottomState) { case RightBottomState.Function: @@ -212,7 +225,7 @@ } isDefaultState = rightBottomState == RightBottomState.Skill; resetToDefaultTimer = !isDefaultState ? 7f : 0f; resetToDefaultTimer = !isDefaultState ? 20f : 0f; m_RayMask.gameObject.SetActive(!isDefaultState); if (switchParams.immediately) @@ -242,11 +255,7 @@ return; } SwitchFunctions(new SwitchParam() { immediately = false, showDefault = true, }); resetToDefaultTimer = 0.0001f; } private void OnSwitchAccount() @@ -277,6 +286,7 @@ { public bool showDefault; public bool immediately; public bool manual; } } System/MainWin/HighSettingFadeInFadeOut.cs
@@ -28,13 +28,18 @@ State state = State.Closed; float closeTimer = 0f; static float closeTimer = 0f; int openedFunctionCount = 0; TreasureFindHostModel hostModel { get { return ModelCenter.Instance.GetModel<TreasureFindHostModel>(); } } LimitedTimePackageItemClassModel limitedTimePackageItemModel { get { return ModelCenter.Instance.GetModel<LimitedTimePackageItemClassModel>(); } } ImpactRankModel impactRankModel { get { return ModelCenter.Instance.GetModel<ImpactRankModel>(); } } OpenServiceAchievementModel OpenServerModel { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } } public static void SetAutoCloseTimer() { closeTimer = 20f; } void Start() { @@ -114,7 +119,7 @@ DisplayArrow(state); if (state == State.Opened) { closeTimer = GeneralDefine.mainWinTopCloseTime; SetAutoCloseTimer(); } } @@ -154,7 +159,7 @@ DisplayArrow(state); if (state == State.Opened) { closeTimer = GeneralDefine.mainWinTopCloseTime; SetAutoCloseTimer(); } } System/Role/RoleModel.cs
@@ -112,7 +112,6 @@ { functionOrder = 4; } WindowCenter.Instance.Close<MainInterfaceWin>(); WindowCenter.Instance.Open<RolePanel>(false, functionOrder); } } System/SystemSetting/HangUpWin.cs
@@ -99,7 +99,7 @@ { return; } _offlinePluginTimeText.text = StringUtility.Contact(UIHelper.AppendColor(TextColType.Green, _offlinePluginTimeText.text = StringUtility.Contact(UIHelper.AppendColor(TextColType.DarkGreen, HangUpSetModel.Instance.GetOfflinePluginTimeStr()), "/", "20小时"); var ItemCount = packModel.GetItemCountByID(PackType.Item, m_TargetItemId); string ItemCountStr = StringUtility.Contact(UIHelper.AppendColor(ItemCount > 0 ? TextColType.LightGreen : TextColType.Red, ItemCount.ToString()), "/1");