| System/Realm/RealmBriefBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/RealmLevelUpBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/RealmMissionCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/RealmModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/RealmPromoteWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/RealmRecommandEquipWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/RealmUnlockEffectCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/RealmUnlockEffectCell.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/RealmUnlockEffectWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/RealmUnlockEffectWin.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| UI/Core/TextEx.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Utility/UIHelper.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/Realm/RealmBriefBehaviour.cs
@@ -85,7 +85,11 @@ unLockEffectBtn.RemoveAllListeners(); } //unLockEffectShowAllBtn.AddListener(); unLockEffectShowAllBtn.AddListener(() => { WindowCenter.Instance.Open<RealmUnlockEffectWin>(); } ); var missions = RealmLVUPTaskConfig.GetMissionIDs(PlayerDatas.Instance.baseData.realmLevel); for (int i = 0; i < missionObjs.Count; i++) System/Realm/RealmLevelUpBehaviour.cs
@@ -45,10 +45,17 @@ private void OnLevelUp() { int error; if (model.TryLevelUp(out error)) bool hasBoss; bool hasAward; if (model.TryLevelUp(out error, out hasBoss, out hasAward)) { CA523_tagCMRealmLVUp pak = new CA523_tagCMRealmLVUp(); GameNetSystem.Instance.SendInfo(pak); ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("RealmBreakUP"), (bool isOk) => { if (isOk) { CA523_tagCMRealmLVUp pak = new CA523_tagCMRealmLVUp(); GameNetSystem.Instance.SendInfo(pak); } }); } else { @@ -71,6 +78,7 @@ { case 101: SysNotifyMgr.Instance.ShowTip("RealmMissionAward"); model.RequestAllAwards(); break; case 102: SysNotifyMgr.Instance.ShowTip("RealmLevelUpError_1"); System/Realm/RealmMissionCell.cs
@@ -18,6 +18,7 @@ [SerializeField] ItemCell itemCell; [SerializeField] Image awardStateImg; [SerializeField] Button receiveBtn; [SerializeField] UIEffect awardEffect; RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } } @@ -33,6 +34,15 @@ missionTabImg.SetSprite(StringUtility.Contact("RealmMissionTab", state)); missionBGImg.SetSprite(StringUtility.Contact("RealmMissionBG", state)); missionStateText.text = Language.Get(StringUtility.Contact("RealmMissionState", state)); if (state == 1) { awardEffect.Play(); } else { awardEffect.Stop(); } int type = config.TaskType; int curValue = 0; @@ -107,32 +117,24 @@ receiveBtn.AddListener(() => { if (state == 1) { CA504_tagCMPlayerGetReward pak = new CA504_tagCMPlayerGetReward(); pak.RewardType = 68; pak.DataEx = (uint)missionID; GameNetSystem.Instance.SendInfo(pak); model.RequestAllAwards(); } else if (state == 0) { WindowCenter.Instance.Close<RealmWin>(); if (type == 5) { model.realmUpgrateNoEnoughReason = 2; WindowCenter.Instance.Open<RealmRecommandEquipWin>(); } else if (model.realMissionGuides.ContainsKey(type)) { NewBieCenter.Instance.StartNewBieGuideEx(model.realMissionGuides[type]); } if (type == 4) { LimitedTimeLuxuryGiftModel.Instance.IsItemIdShow(23, RealmModel.BreakRealmPill, config.NeedValueList[0], 1, 0); if (LimitedTimeLuxuryGiftModel.Instance.IsItemIdShow(23, RealmModel.BreakRealmPill, config.NeedValueList[0], 1, 0)) return; } model.RealMissionGuide(type, id); } }); } } } System/Realm/RealmModel.cs
@@ -43,6 +43,7 @@ public readonly Redpoint levelUpRedpoint = new Redpoint(114, 11401); public readonly Redpoint challengeRedpoint = new Redpoint(114, 11402); public readonly Redpoint missionRedpoint = new Redpoint(114, 11403); public readonly Redpoint towerRedpoint = new Redpoint(114, 11406); int m_SelectRealm = 0; @@ -95,9 +96,8 @@ EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } EquipStarModel equipStarModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } ActivitiesPushModel pushModel { get { return ModelCenter.Instance.GetModel<ActivitiesPushModel>(); } } TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } } DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } } SkyTowerModel skyTowerModel { get { return ModelCenter.Instance.GetModel<SkyTowerModel>(); } } public override void Init() { @@ -106,6 +106,7 @@ GlobalTimeEvent.Instance.secondEvent += PerSecond; packModel.refreshItemCountEvent += RefreshItemCountEvent; FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent; skyTowerModel.OnChallengeState += OnChallengeState; ParseConfig(); } @@ -131,8 +132,6 @@ SysNotifyMgr.Instance.OnSystemNotifyEvent -= OnSystemNotifyEvent; SysNotifyMgr.Instance.OnSystemNotifyEvent += OnSystemNotifyEvent; RefreshRedpoint(); TryPushRealmPoolMessage(); } public override void UnInit() @@ -142,14 +141,20 @@ packModel.refreshItemCountEvent -= RefreshItemCountEvent; GlobalTimeEvent.Instance.secondEvent -= PerSecond; FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent; skyTowerModel.OnChallengeState -= OnChallengeState; } private void OnFuncStateChangeEvent(int id) { if (id == (int)FuncOpenEnum.Realm) { RefreshRedpoint(); redpointDirty = true; } } void OnChallengeState() { redpointDirty = true; } private void PerSecond() @@ -196,7 +201,7 @@ realmExpTime = int.Parse(funcConfig.Numerical1); funcConfig = FuncConfigConfig.Get("RealmMission"); realMissionGuides = ConfigParse.ParseIntDict(funcConfig.Numerical1); realMissionGuides = ConfigParse.ParseIntArrayDict(funcConfig.Numerical1); } @@ -257,7 +262,7 @@ } if (!m_RecommandEquips[level].ContainsKey(job)) { m_RecommandEquips[level].Add(job, new int[3]); m_RecommandEquips[level].Add(job, new int[8]); } for (int i = 0; i < EquipModel.equip8Places.Length; i++) @@ -272,7 +277,7 @@ equips = m_RecommandEquips[level][job]; return false; return true; } //从任务条件获取 @@ -282,13 +287,15 @@ //return m_RealmEquipConditions.TryGetValue(level, out equipCondition); return false; } //境界任务完成后才可以渡劫,否则点击渡劫按任务顺序做引导 public bool TryLevelUp(out int error) // error: 小于100的错误码是任务类型用于引导等;101 任务奖励可领取未领取;102 等级不足;103 经验不足 public bool TryLevelUp(out int error, out bool hasBoss, out bool hasAward) { error = 100; //小于100的错误码是任务引导 var missions = RealmLVUPTaskConfig.GetMissionIDs(PlayerDatas.Instance.baseData.realmLevel); bool hasAward = false; //是否有奖励可领取 hasAward = false; //是否有奖励可领取 hasBoss = false; //是否有BOSS任务 for (int i = 0; i < missions.Count; i++) { int missionID = missions[i]; @@ -296,13 +303,23 @@ if (state == 0) { var id = RealmLVUPTaskConfig.GetID(PlayerDatas.Instance.baseData.realmLevel, missionID); error = RealmLVUPTaskConfig.Get(id).TaskType; return false; var type = RealmLVUPTaskConfig.Get(id).TaskType; if (error == 100) error = type; if (type == 6) { hasBoss = true; } } if (state == 1) else if (state == 1) { hasAward = true; } } if (error < 100) { return false; } if (hasAward) @@ -428,6 +445,8 @@ return notSatisfyPlaces.Count == 0; } // 装备条件是否满足 1 缺少装备 2 星级不足 public bool SatisfyEquipCondition(RealmLVUPTaskConfig config, out int error) { error = 0; @@ -449,7 +468,7 @@ { if (itemModel.config.SuiteiD == 0) { error = 4; error = 1; return false; } } @@ -457,7 +476,7 @@ { if (itemModel.config.ItemColor < equipCondition.itemColor) { error = 4; error = 1; return false; } } @@ -466,13 +485,13 @@ if (starLevel < equipCondition.starLevel) { error = 5; error = 2; return false; } } else { error = 4; error = 1; return false; } } @@ -595,11 +614,6 @@ return false; } public void SendLevelUpRealm() { CA523_tagCMRealmLVUp pak = new CA523_tagCMRealmLVUp(); GameNetSystem.Instance.SendInfo(pak); } public void TryPushRealmPoolMessage() { @@ -617,7 +631,7 @@ } RealmMissionRefreshEvent?.Invoke(); RefreshRedpoint(); redpointDirty = true; } public void ReceivePackage(HA327_tagMCRealmExpInfo package) @@ -630,9 +644,7 @@ { realmExpRefresh(); } //RefreshRealmPoolRedpoint(); TryPushRealmPoolMessage(); } private void OnStageLoadFinish() @@ -673,7 +685,7 @@ { if (dataType == PlayerDataType.RealmLevel || dataType == PlayerDataType.LV || dataType == PlayerDataType.FightPoint) || dataType == PlayerDataType.TotalExp) { redpointDirty = true; } @@ -706,18 +718,17 @@ private void RefreshItemCountEvent(PackType packType, int arg2, int itemId) { //if (packType == PackType.Item) //{ // var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); // if (config != null && config.NeedGood == itemId) // { // redpointDirty = true; // } //} //if (packType == PackType.Equip) //{ // redpointDirty = true; //} if (packType == PackType.Item) { if (BreakRealmPill == itemId) { redpointDirty = true; } } if (packType == PackType.Equip) { redpointDirty = true; } } IEnumerator Co_TryOpenRealmWin() @@ -747,31 +758,40 @@ void RefreshRedpoint() { var levelUpable = false; levelUpRedpoint.state = RedPointState.None; towerRedpoint.state = RedPointState.None; challengeRedpoint.state = RedPointState.None; missionRedpoint.state = RedPointState.None; if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Realm)) if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Realm)) return; var realmLevel = PlayerDatas.Instance.baseData.realmLevel; if (realmLevel < realmMaxLevel) { var realmLevel = PlayerDatas.Instance.baseData.realmLevel; if (realmLevel < realmMaxLevel) int error; bool hasBoss; bool hasAward; if (TryLevelUp(out error, out hasBoss, out hasAward)) { int error; if (TryLevelUp(out error)) { levelUpable = true; } levelUpRedpoint.state = RedPointState.Simple; } if (GetErrorOfChallenge() == 0) if (hasAward) { towerRedpoint.state = RedPointState.Simple; missionRedpoint.state = RedPointState.Simple; } if (hasBoss) { challengeRedpoint.state = RedPointState.Simple; } } levelUpRedpoint.state = levelUpable ? RedPointState.Simple : RedPointState.None; if (GetErrorOfChallenge() == 0) { towerRedpoint.state = RedPointState.Simple; } } @@ -839,7 +859,7 @@ { selectFloorID = passedFloor; } RefreshRedpoint(); redpointDirty = true; OnTowerPassEvent?.Invoke(); } @@ -858,7 +878,7 @@ Dictionary<int, int> taskValues = new Dictionary<int, int>(); public const int BreakRealmPill = 4501; //破境丹ID public RealmLVUPTaskConfig equipNeedConfig; public Dictionary<int, int> realMissionGuides = new Dictionary<int, int>(); public Dictionary<int, int[]> realMissionGuides = new Dictionary<int, int[]>(); public event Action RealmMissionRefreshEvent; //public uint TaskAwardState; //进阶任务领奖状态;按任务ID二进制位存储是否已领取 @@ -927,19 +947,35 @@ } public void RealMissionGuide(int type) public void RealMissionGuide(int type, int id = 0) { if (type != 6) if (type != 5 && type != 6) WindowCenter.Instance.Close<RealmWin>(); if (type == 5) { realmUpgrateNoEnoughReason = 2; WindowCenter.Instance.Open<RealmRecommandEquipWin>(); WindowCenter.Instance.Open<RealmRecommandEquipWin>(false, id); } else if (realMissionGuides.ContainsKey(type)) { NewBieCenter.Instance.StartNewBieGuideEx(realMissionGuides[type]); NewBieCenter.Instance.StartNewBieGuideEx(realMissionGuides[type][0]); } } public void RequestAllAwards() { var missisons = RealmLVUPTaskConfig.GetMissionIDs(PlayerDatas.Instance.baseData.realmLevel); for (int i = 0; i < missisons.Count; i++) { var state = GetMissionState(PlayerDatas.Instance.baseData.realmLevel, missisons[i]); if (state == 1) { CA504_tagCMPlayerGetReward pak = new CA504_tagCMPlayerGetReward(); pak.RewardType = 68; pak.DataEx = (uint)missisons[i]; GameNetSystem.Instance.SendInfo(pak); } } } System/Realm/RealmPromoteWin.cs
@@ -22,8 +22,10 @@ [SerializeField] Text m_SkillName; [SerializeField] Text m_SkillText; [SerializeField] Image m_RealmIcon; [SerializeField] Image m_beforeRealmIcon; [SerializeField] UIEffect m_Effect; [SerializeField] Button m_Close; [SerializeField] Text unLockEquip; [SerializeField] Transform m_CloseRemind; @@ -121,33 +123,43 @@ m_Propertys[i].DisplayRealm(property, currentConfig.AddAttrNum[i] - propertys[property], currentConfig.AddAttrNum[i]); } } m_ReikiPoint.text = string.Empty; m_ReikiText.text = string.Empty; m_SkillName.text = string.Empty; m_SkillText.text = string.Empty; unLockEquip.SetActive(false); m_SkillText.SetActive(false); m_ReikiText.SetActive(false); if (currentConfig.AddFreePoint != 0) { m_ReikiText.SetActive(true); m_ReikiPoint.text = currentConfig.AddFreePoint.ToString(); m_ReikiText.text = Language.Get("Z2007"); } var config = RealmConfig.Get(realmLevel); if (config.LearnSkillIDInfo.Count > 0) else if (currentConfig.LearnSkillIDInfo.Count > 0) { var array = config.LearnSkillIDInfo[PlayerDatas.Instance.baseData.Job]; m_SkillText.SetActive(true); var array = currentConfig.LearnSkillIDInfo[PlayerDatas.Instance.baseData.Job]; var skillConfig = SkillConfig.Get(array[0]); m_SkillName.text = skillConfig.SkillName; m_SkillText.text = Language.Get("Z2008"); } else if (currentConfig.EquipLV > 0) { unLockEquip.SetActive(true); unLockEquip.text = Language.Get("MountPanel_UnlockBtn_1") + Language.Get("RealmEquipName", currentConfig.NameEx); } m_RealmIcon.SetSprite(currentConfig.Img); m_beforeRealmIcon.SetSprite(lastConfig.Img); var effectId = model.GetRealmCoverEffect(realmLevel); m_Effect.StopImediatly(); m_Effect.effect = effectId; m_Effect.Play(); } } System/Realm/RealmRecommandEquipWin.cs
@@ -14,19 +14,20 @@ public class RealmRecommandEquipWin : Window { [SerializeField] ItemCell[] m_Items; [SerializeField] Text m_InfoText; [SerializeField] TextEx[] m_EquipTexts; [SerializeField] Button m_Goto; [SerializeField] Button m_GetWays; [SerializeField] Button m_Close; [SerializeField] ScrollRect m_Scroller; [SerializeField] HorizontalLayoutGroup m_Layout; [SerializeField] Text m_InfoText; [SerializeField] Text m_WayText; RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } } PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } EquipStarModel equipStarModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } RealmLevelUpEquipCondition equipCondition; List<int> notSatisfyPlaces = new List<int>(); #region Built-in protected override void BindController() @@ -42,11 +43,14 @@ protected override void OnPreOpen() { } var config = RealmLVUPTaskConfig.Get(functionOrder); if (config == null) return; protected override void OnActived() { base.OnActived(); int error; model.SatisfyEquipCondition(config, out error); model.realmUpgrateNoEnoughReason = error; Display(); } @@ -56,7 +60,6 @@ protected override void OnPreClose() { model.realmUpgrateNoEnoughReason = 0; } protected override void OnAfterClose() @@ -66,50 +69,46 @@ void Display() { m_InfoText.text = Language.Get(model.realmUpgrateNoEnoughReason == 2 ? "realmEquipNotEnouth2" : "realmEquipNotEnouth1"); m_WayText.text = Language.Get(model.realmUpgrateNoEnoughReason == 2 ? "gotoEquipStar" : "GetItem_1"); var config = RealmLVUPTaskConfig.Get(functionOrder); var realmLevel = PlayerDatas.Instance.baseData.realmLevel; List<int> notSatisfyPlaces; equipCondition = new RealmLevelUpEquipCondition() { level = config.NeedValueList[0], starLevel = config.NeedValueList[1], isSuit = config.NeedValueList[2] == 1, itemColor = config.NeedValueList[3], }; var equipSet = equipModel.GetEquipSet(equipCondition.level); var realmConfig = RealmConfig.Get(equipSet.realm); if (!equipCondition.isSuit) { var colorName = UIHelper.GetColorNameByItemColor(equipCondition.itemColor); m_InfoText.text = Language.Get("RealmNeedEquipCondition_1", realmConfig.NameEx, colorName, equipCondition.starLevel, 8); } else { m_InfoText.text = Language.Get("RealmNeedEquipCondition_2", realmConfig.NameEx, equipCondition.starLevel, 8); } notSatisfyPlaces = new List<int>(); model.SatisfyEquipCondition(model.equipNeedConfig, out notSatisfyPlaces); // 1. 没有装备引导获得途径 2. 背包中有更好的装备引导穿戴 3.引导升星 m_WayText.text = Language.Get(model.realmUpgrateNoEnoughReason == 2 ? "gotoEquipStar" : "RealmRecommandEquipWin__2"); int[] recommandEquips; if (!model.SatisfyEquipCondition(model.equipNeedConfig, out notSatisfyPlaces) && model.TryGetRecommandEquips(realmLevel, PlayerDatas.Instance.baseData.Job, model.equipNeedConfig.NeedValueList[3], out recommandEquips)) model.TryGetRecommandEquips(equipCondition.level, PlayerDatas.Instance.baseData.Job, model.equipNeedConfig.NeedValueList[3], out recommandEquips); for (int i = 0; i < m_EquipTexts.Length; i++) { for (int i = 0; i < m_Items.Length; i++) { if (i < notSatisfyPlaces.Count && notSatisfyPlaces[i] <= recommandEquips.Length) { m_Items[i].SetActive(true); var place = notSatisfyPlaces[i]; var itemData = new ItemCellModel(recommandEquips[place - 1], true, 1); m_Items[i].Init(itemData); m_Items[i].button.SetListener(() => { ItemTipUtility.Show(recommandEquips[place - 1]); }); } else { m_Items[i].SetActive(false); } } int place = i + 1; var itemConfig = ItemConfig.Get(recommandEquips[i]); string equipName = StringUtility.Contact(itemConfig.ItemName, " ", Language.Get("EquipStarLevel", equipCondition.starLevel)); m_EquipTexts[i].text = UIHelper.AppendColor(notSatisfyPlaces.Contains(place) ? TextColType.Gray : TextColType.Green, equipName, true); } m_Scroller.horizontalNormalizedPosition = 0f; m_Scroller.enabled = notSatisfyPlaces.Count > 4; m_Layout.childAlignment = notSatisfyPlaces.Count > 4 ? TextAnchor.MiddleLeft : TextAnchor.MiddleCenter; if (notSatisfyPlaces.Count < 4) { m_Layout.transform.localPosition = m_Layout.transform.localPosition.SetX(0); } if (model.realmUpgrateNoEnoughReason != 2) { var existBetterEquip = false; RealmLevelUpEquipCondition equipCondition; model.TryGetRealmEquipCondition(realmLevel, out equipCondition); for (int i = 0; i < notSatisfyPlaces.Count; i++) { var place = notSatisfyPlaces[i]; @@ -153,11 +152,6 @@ private void OnGetWay() { var realmLevel = PlayerDatas.Instance.baseData.realmLevel; RealmLevelUpEquipCondition equipCondition; model.TryGetRealmEquipCondition(realmLevel, out equipCondition); List<int> notSatisfyPlaces; model.SatisfyEquipCondition(model.equipNeedConfig, out notSatisfyPlaces); var config = EquipControlConfig.Get(equipCondition.level, notSatisfyPlaces[0]); RealmRecommandEquipGetWayWin.equipGetWays.Clear(); RealmRecommandEquipGetWayWin.equipGetWays.AddRange(config.getWays); @@ -166,9 +160,6 @@ private void Goto() { var realmLevel = PlayerDatas.Instance.baseData.realmLevel; RealmLevelUpEquipCondition equipCondition; model.TryGetRealmEquipCondition(realmLevel, out equipCondition); if (model.realmUpgrateNoEnoughReason != 2) { equipModel.SelectSet(equipCondition.level); @@ -177,12 +168,14 @@ else { equipStarModel.jumpEquipPos = new Int2(equipCondition.level, 1); equipStarModel.jumpEquipPos = new Int2(equipCondition.level, notSatisfyPlaces[0]); WindowCenter.Instance.Open<EquipFrameWin>(false, 1); } CloseImmediately(); WindowCenter.Instance.Close<RealmWin>(); } } } System/Realm/RealmUnlockEffectCell.cs
New file @@ -0,0 +1,61 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Thursday, November 09, 2017 //-------------------------------------------------------- using UnityEngine; using System.Collections; using UnityEngine.UI; namespace vnxbqy.UI { public class RealmUnlockEffectCell : CellView { [SerializeField] TextEx realNameText; [SerializeField] RichText unLockEffect; [SerializeField] Button unLockEffectBtn; public void Display(int realm) { var config = RealmConfig.Get(realm); realNameText.text = PlayerDatas.Instance.baseData.realmLevel >= realm ? UIHelper.GetRealmName(realm) : UIHelper.AppendColor(TextColType.Gray, config.Name); unLockEffect.colorType = PlayerDatas.Instance.baseData.realmLevel >= realm ? RichText.ColorType.Dark : RichText.ColorType.Bright; string showText = ""; if (config.LearnSkillIDInfo.Count > 0) { var skillID = config.LearnSkillIDInfo[PlayerDatas.Instance.baseData.Job][0]; var skillConfig = SkillConfig.Get(skillID); showText = Language.Get("RealmUnLockSkill", skillConfig.SkillName); unLockEffect.text = PlayerDatas.Instance.baseData.realmLevel >= realm ? showText : UIHelper.AppendColor(TextColType.Gray, showText); unLockEffectBtn.SetListener(() => { SkillDetails.ShowSkillDetails(skillID, SkillDetails.SkillSourceType.PlayerSkill, skillConfig.FightPower); }); } else if (config.AddFreePoint > 0) { showText = Language.Get("RealmUnLockLG", config.AddFreePoint); unLockEffect.text = PlayerDatas.Instance.baseData.realmLevel >= realm ? showText : UIHelper.AppendColor(TextColType.Gray, showText); unLockEffectBtn.RemoveAllListeners(); } else if (config.EquipLV > 0) { showText = Language.Get("RealmUnLockEquip", Language.Get("RealmEquipName", config.NameEx)); unLockEffect.text = PlayerDatas.Instance.baseData.realmLevel >= realm ? showText : UIHelper.AppendColor(TextColType.Gray, showText); unLockEffectBtn.SetListener(() => { WindowCenter.Instance.Open<RealmEquipPreviewWin>(false, config.EquipLV); }); } } } } System/Realm/RealmUnlockEffectCell.cs.meta
New file @@ -0,0 +1,11 @@ fileFormatVersion: 2 guid: 8bd77305b77be8e4c8e97cbe4d2da7d8 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/Realm/RealmUnlockEffectWin.cs
New file @@ -0,0 +1,68 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Thursday, March 14, 2019 //-------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace vnxbqy.UI { public class RealmUnlockEffectWin : Window { [SerializeField] Button m_Confirm; [SerializeField] ScrollerController m_Scroller; #region Built-in protected override void BindController() { } protected override void AddListeners() { m_Confirm.AddListener(CloseClick); } protected override void OnPreOpen() { m_Scroller.OnRefreshCell += OnRefreshCell; var count = RealmConfig.GetKeys().Count; m_Scroller.Refresh(); for (int i = 1; i < count; i++) { m_Scroller.AddCell(ScrollerDataType.Header, i); } m_Scroller.Restart(); m_Scroller.JumpIndex(PlayerDatas.Instance.baseData.realmLevel - 5); } protected override void OnAfterOpen() { } protected override void OnPreClose() { m_Scroller.OnRefreshCell -= OnRefreshCell; } protected override void OnAfterClose() { } #endregion private void OnRefreshCell(ScrollerDataType type, CellView cell) { var cellView = cell as RealmUnlockEffectCell; cellView.Display(cell.index); } } } System/Realm/RealmUnlockEffectWin.cs.meta
New file @@ -0,0 +1,11 @@ fileFormatVersion: 2 guid: 511d58b064e99324685651ad60f02163 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: UI/Core/TextEx.cs
@@ -36,10 +36,28 @@ if (m_ColorType != value) { m_ColorType = value; this.color = UIHelper.GetUIColor(value); this.color = UIHelper.GetUIColor(value, bgColorType == BackGroundColorType.Bright); } } } [SerializeField] private BackGroundColorType m_BGColorType = BackGroundColorType.Dark; public BackGroundColorType bgColorType { get { return m_BGColorType; } set { m_BGColorType = value; this.color = UIHelper.GetUIColor(colorType, m_BGColorType == BackGroundColorType.Bright); } } public enum BackGroundColorType { Dark, Bright, } protected override void Awake() { @@ -63,7 +81,7 @@ if (colorType != TextColType.None) { this.color = UIHelper.GetUIColor(colorType); this.color = UIHelper.GetUIColor(colorType, bgColorType == BackGroundColorType.Bright); } } Utility/UIHelper.cs
@@ -592,7 +592,7 @@ { case TextColType.None: case TextColType.White: return bright ? s_BrightWhiteColor : s_DarkWhiteColor; return bright ? s_BrightWhiteColor : s_DarkWhiteColor; // s_BrightWhiteColor 是亮底灰色 case TextColType.Blue: return bright ? s_BrightBlueColor : s_DarkBlueColor; case TextColType.Purple: