Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | public static void Init()
|
| | | {
|
| | | // 登记相应的数据体及对应的数据转逻辑类
|
| | | Register(typeof(HB213_tagMCZhuXianTowerInfo), typeof(DTCB213_tagMCZhuXianTowerInfo));
|
| | | Register(typeof(HB413_tagMCPlayerSkills), typeof(DTCB413_tagMCPlayerSkills));
|
| | | Register(typeof(HB212_tagMCZhuXianBossCnt), typeof(DTCB212_tagMCZhuXianBossCnt));
|
| | | Register(typeof(H0208_tagTalkCountry), typeof(DTC0208_tagTalkCountry));
|
| | |
| | | float checkAssetVersionTimer = 0f;
|
| | | private void CheckClientAssets()
|
| | | {
|
| | |
|
| | |
|
| | | if (Time.time > checkAssetVersionTimer)
|
| | | {
|
| | | checkAssetVersionTimer += Time.time + 5f;
|
| | | if (VersionUtility.Instance.NeedDownAsset())
|
| | |
|
| | | var check = true;
|
| | | if (Application.platform == RuntimePlatform.IPhonePlayer && VersionUtility.Instance.InIosAuditTime())
|
| | | {
|
| | | check = false;
|
| | | }
|
| | |
|
| | | if (check && VersionUtility.Instance.NeedDownAsset())
|
| | | {
|
| | | checkAssetVersionTimer += Time.time + 10f;
|
| | | var assetVersionUrl = StringUtility.Contact(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), "/", "AssetsVersion.txt");
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Wednesday, September 26, 2018 |
| | | // [ Date ]: Tuesday, January 22, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | public int AtkSpeedC { get ; private set ; }
|
| | | public int SkillAtkRateReduceC { get ; private set ; }
|
| | | public int HitC { get ; private set ; }
|
| | | public int MissC { get ; private set ; } |
| | | public int MissC { get ; private set ; }
|
| | | public int SkillAddPer1C { get ; private set ; }
|
| | | public int SkillAddPer2C { get ; private set ; }
|
| | | public int SkillAddPer3C { get ; private set ; }
|
| | | public int SkillAddPer4C { get ; private set ; }
|
| | | public int SkillAddPer5C { get ; private set ; }
|
| | | public int SkillAddPer6C { get ; private set ; }
|
| | | public int SkillAddPer7C { get ; private set ; }
|
| | | public int SkillReducePer1C { get ; private set ; }
|
| | | public int SkillReducePer2C { get ; private set ; }
|
| | | public int SkillReducePer3C { get ; private set ; }
|
| | | public int SkillReducePer4C { get ; private set ; }
|
| | | public int SkillReducePer5C { get ; private set ; }
|
| | | public int SkillReducePer6C { get ; private set ; }
|
| | | public int SkillReducePer7C { get ; private set ; } |
| | | |
| | | public override string getKey() |
| | | { |
| | |
| | |
|
| | | HitC=IsNumeric(rawContents[27]) ? int.Parse(rawContents[27]):0;
|
| | |
|
| | | MissC=IsNumeric(rawContents[28]) ? int.Parse(rawContents[28]):0; |
| | | MissC=IsNumeric(rawContents[28]) ? int.Parse(rawContents[28]):0; |
| | | |
| | | SkillAddPer1C=IsNumeric(rawContents[29]) ? int.Parse(rawContents[29]):0; |
| | | |
| | | SkillAddPer2C=IsNumeric(rawContents[30]) ? int.Parse(rawContents[30]):0; |
| | | |
| | | SkillAddPer3C=IsNumeric(rawContents[31]) ? int.Parse(rawContents[31]):0; |
| | | |
| | | SkillAddPer4C=IsNumeric(rawContents[32]) ? int.Parse(rawContents[32]):0; |
| | | |
| | | SkillAddPer5C=IsNumeric(rawContents[33]) ? int.Parse(rawContents[33]):0; |
| | | |
| | | SkillAddPer6C=IsNumeric(rawContents[34]) ? int.Parse(rawContents[34]):0; |
| | | |
| | | SkillAddPer7C=IsNumeric(rawContents[35]) ? int.Parse(rawContents[35]):0; |
| | | |
| | | SkillReducePer1C=IsNumeric(rawContents[36]) ? int.Parse(rawContents[36]):0; |
| | | |
| | | SkillReducePer2C=IsNumeric(rawContents[37]) ? int.Parse(rawContents[37]):0; |
| | | |
| | | SkillReducePer3C=IsNumeric(rawContents[38]) ? int.Parse(rawContents[38]):0; |
| | | |
| | | SkillReducePer4C=IsNumeric(rawContents[39]) ? int.Parse(rawContents[39]):0; |
| | | |
| | | SkillReducePer5C=IsNumeric(rawContents[40]) ? int.Parse(rawContents[40]):0; |
| | | |
| | | SkillReducePer6C=IsNumeric(rawContents[41]) ? int.Parse(rawContents[41]):0; |
| | | |
| | | SkillReducePer7C=IsNumeric(rawContents[42]) ? int.Parse(rawContents[42]):0; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e238f9455d4062c4c867b41cfea2f046 |
| | | timeCreated: 1537960022 |
| | | timeCreated: 1548160973 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, June 01, 2018 |
| | | // [ Date ]: Tuesday, January 22, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | public partial class FightPowerParamConfig : ConfigBase {
|
| | |
|
| | | public partial class FightPowerParamConfig : ConfigBase { |
| | | |
| | | public int LV { get ; private set ; }
|
| | | public int Hit { get ; private set ; }
|
| | | public int Miss { get ; private set ; }
|
| | |
| | | public int FaintDefRate { get ; private set ; }
|
| | | public int AtkSpeedParameter { get ; private set ; }
|
| | | public int LuckyHitParameter { get ; private set ; }
|
| | | public int SpeedPerParameter { get ; private set ; }
|
| | | public int AtkPerParameter { get ; private set ; }
|
| | | public int MaxHPPerParameter { get ; private set ; }
|
| | | public int JobAHurtAddPer { get ; private set ; }
|
| | | public int JobBHurtAddPer { get ; private set ; }
|
| | | public int JobCHurtAddPer { get ; private set ; }
|
| | | public int JobAAtkReducePer { get ; private set ; }
|
| | | public int JobBAtkReducePer { get ; private set ; }
|
| | | public int JobCAtkReducePer { get ; private set ; } |
| | | |
| | | public override string getKey()
|
| | | {
|
| | | return LV.ToString();
|
| | | public override string getKey() |
| | | { |
| | | return LV.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | try
|
| | | {
|
| | | try |
| | | { |
| | | LV=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
|
| | |
|
| | | Hit=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
|
| | |
| | | AtkSpeedParameter=IsNumeric(rawContents[18]) ? int.Parse(rawContents[18]):0;
|
| | |
|
| | | LuckyHitParameter=IsNumeric(rawContents[19]) ? int.Parse(rawContents[19]):0;
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | |
| | | SpeedPerParameter=IsNumeric(rawContents[20]) ? int.Parse(rawContents[20]):0; |
| | | |
| | | AtkPerParameter=IsNumeric(rawContents[21]) ? int.Parse(rawContents[21]):0; |
| | | |
| | | MaxHPPerParameter=IsNumeric(rawContents[22]) ? int.Parse(rawContents[22]):0; |
| | | |
| | | JobAHurtAddPer=IsNumeric(rawContents[23]) ? int.Parse(rawContents[23]):0; |
| | | |
| | | JobBHurtAddPer=IsNumeric(rawContents[24]) ? int.Parse(rawContents[24]):0; |
| | | |
| | | JobCHurtAddPer=IsNumeric(rawContents[25]) ? int.Parse(rawContents[25]):0; |
| | | |
| | | JobAAtkReducePer=IsNumeric(rawContents[26]) ? int.Parse(rawContents[26]):0; |
| | | |
| | | JobBAtkReducePer=IsNumeric(rawContents[27]) ? int.Parse(rawContents[27]):0; |
| | | |
| | | JobCAtkReducePer=IsNumeric(rawContents[28]) ? int.Parse(rawContents[28]):0; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 81c3ee0874f68494d9284a3240009448 |
| | | timeCreated: 1527846597 |
| | | timeCreated: 1548149194 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, January 22, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | public partial class JadeDynastySuitAttrConfig : ConfigBase { |
| | | |
| | | public int id { get ; private set ; }
|
| | | public int suiteType { get ; private set ; }
|
| | | public int suiteLV { get ; private set ; }
|
| | | public int[] attrIDList;
|
| | | public int[] attrValueList; |
| | | |
| | | public override string getKey() |
| | | { |
| | | return id.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | try |
| | | { |
| | | id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | suiteType=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | |
| | | suiteLV=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | |
| | | string[] attrIDListStringArray = rawContents[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | attrIDList = new int[attrIDListStringArray.Length]; |
| | | for (int i=0;i<attrIDListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(attrIDListStringArray[i],out attrIDList[i]); |
| | | }
|
| | | |
| | | string[] attrValueListStringArray = rawContents[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | attrValueList = new int[attrValueListStringArray.Length]; |
| | | for (int i=0;i<attrValueListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(attrValueListStringArray[i],out attrValueList[i]); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: f24aa247ff2e2e24bb6798ab57e55bfb |
| | | timeCreated: 1548124957 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, January 22, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | public partial class JadeDynastyTowerConfig : ConfigBase { |
| | | |
| | | public int floorId { get ; private set ; } |
| | | public int floorIndex { get ; private set ; } |
| | | public string floorName { get ; private set; } |
| | | public int[] rewardIdsLevelS; |
| | | public int[] rewardCountsLevelS; |
| | | public int[] rewardIdsLevelA; |
| | | public int[] rewardCountsLevelA; |
| | | public int[] rewardIdsLevelB; |
| | | public int[] rewardCountsLevelB; |
| | | public int unLockEquipPlace { get ; private set ; } |
| | | public string specialRewardDescription { get ; private set; } |
| | | public int fightPower { get ; private set ; } |
| | | |
| | | public override string getKey() |
| | | { |
| | | return floorId.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | try |
| | | { |
| | | floorId=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | floorIndex=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | |
| | | floorName = rawContents[2].Trim(); |
| | | |
| | | string[] rewardIdsLevelSStringArray = rawContents[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewardIdsLevelS = new int[rewardIdsLevelSStringArray.Length]; |
| | | for (int i=0;i<rewardIdsLevelSStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardIdsLevelSStringArray[i],out rewardIdsLevelS[i]); |
| | | } |
| | | |
| | | string[] rewardCountsLevelSStringArray = rawContents[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewardCountsLevelS = new int[rewardCountsLevelSStringArray.Length]; |
| | | for (int i=0;i<rewardCountsLevelSStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardCountsLevelSStringArray[i],out rewardCountsLevelS[i]); |
| | | } |
| | | |
| | | string[] rewardIdsLevelAStringArray = rawContents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewardIdsLevelA = new int[rewardIdsLevelAStringArray.Length]; |
| | | for (int i=0;i<rewardIdsLevelAStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardIdsLevelAStringArray[i],out rewardIdsLevelA[i]); |
| | | } |
| | | |
| | | string[] rewardCountsLevelAStringArray = rawContents[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewardCountsLevelA = new int[rewardCountsLevelAStringArray.Length]; |
| | | for (int i=0;i<rewardCountsLevelAStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardCountsLevelAStringArray[i],out rewardCountsLevelA[i]); |
| | | } |
| | | |
| | | string[] rewardIdsLevelBStringArray = rawContents[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewardIdsLevelB = new int[rewardIdsLevelBStringArray.Length]; |
| | | for (int i=0;i<rewardIdsLevelBStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardIdsLevelBStringArray[i],out rewardIdsLevelB[i]); |
| | | } |
| | | |
| | | string[] rewardCountsLevelBStringArray = rawContents[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewardCountsLevelB = new int[rewardCountsLevelBStringArray.Length]; |
| | | for (int i=0;i<rewardCountsLevelBStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardCountsLevelBStringArray[i],out rewardCountsLevelB[i]); |
| | | } |
| | | |
| | | unLockEquipPlace=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0; |
| | | |
| | | specialRewardDescription = rawContents[10].Trim(); |
| | | |
| | | fightPower=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: bcb7d8fc32f347441a4024465ce1df51 |
| | | timeCreated: 1548127880 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, January 22, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | public partial class SkillFrameAnimationConfig : ConfigBase { |
| | | |
| | | public int skillTypeId { get ; private set ; }
|
| | | public int totalTime { get ; private set ; }
|
| | | public string[] spriteKeys;
|
| | | public string descriptionIcon { get ; private set; } |
| | | |
| | | public override string getKey() |
| | | { |
| | | return skillTypeId.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | try |
| | | { |
| | | skillTypeId=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | totalTime=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | |
| | | spriteKeys = rawContents[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
| | | |
| | | descriptionIcon = rawContents[3].Trim(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d2052f17dcdee634082ca8f214df0ecd |
| | | timeCreated: 1548156734 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | AddAsyncTask<FashionDressConfig>();
|
| | | AddAsyncTask<WeekPartyPointConfig>();
|
| | | AddAsyncTask<SceneReplaceConfig>();
|
| | | AddAsyncTask<JadeDynastyTowerConfig>();
|
| | | AddAsyncTask<JadeDynastyBossConfig>();
|
| | | AddAsyncTask<JadeDynastySuitAttrConfig>();
|
| | |
|
| | | while (!AllCompleted())
|
| | | {
|
| | |
| | | GameNetSystem.Instance.crossServerConnected_Loigc = false;
|
| | | LoadingWin.targetMapResId = 1;
|
| | | WindowCenter.Instance.Open<LoadingWin>();
|
| | | GameNetSystem.Instance.DisconnectCrossServer();
|
| | |
|
| | | var sendInfo = new CA108_tagCMRefreshMainServerRole();
|
| | | GameNetSystem.Instance.SendInfo(sendInfo);
|
| | |
| | | OpenServerGodWeapon = 20,
|
| | | OpenServerRecharge = 21,
|
| | | OpenServerPet = 22,
|
| | | JadeDynastyTower=23,//诛仙塔排行榜
|
| | | }
|
| | |
|
| | | public class RankData
|
| | |
| | | _tagGsProValueDict.Add(AttrEnum.SkillHurtPrecent, gsModel.SkillAtkRateReduceC);
|
| | | _tagGsProValueDict.Add(AttrEnum.HIT, gsModel.HitC);
|
| | | _tagGsProValueDict.Add(AttrEnum.MISS, gsModel.MissC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPer1, gsModel.SkillAddPer1C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPer2, gsModel.SkillAddPer2C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPer3, gsModel.SkillAddPer3C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPer4, gsModel.SkillAddPer4C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPer5, gsModel.SkillAddPer5C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPer6, gsModel.SkillAddPer6C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePer1, gsModel.SkillReducePer1C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePer2, gsModel.SkillReducePer2C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePer3, gsModel.SkillReducePer3C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePer4, gsModel.SkillReducePer4C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePer5, gsModel.SkillReducePer5C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePer6, gsModel.SkillReducePer6C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePer7, gsModel.SkillReducePer7C);
|
| | | return _tagGsProValueDict;
|
| | | }
|
| | | }
|
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A3 30 装备诛仙装备 #tagCMEquipZhuXianItem
|
| | |
|
| | | public class CA330_tagCMEquipZhuXianItem : GameNetPackBasic {
|
| | | public byte EquipIndex; //装备在诛仙装备背包中的索引
|
| | | public byte ItemIndex; //装备在诛仙物品背包中的索引
|
| | |
|
| | | public CA330_tagCMEquipZhuXianItem () {
|
| | | combineCmd = (ushort)0x03FE;
|
| | | _cmd = (ushort)0xA330;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | WriteBytes (EquipIndex, NetDataType.BYTE);
|
| | | WriteBytes (ItemIndex, NetDataType.BYTE);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: fe3f6d53f831c9342b06158619949c27 |
| | | timeCreated: 1548121806 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A3 31 卸下诛仙装备 #tagCMUnEquipZhuXianItem
|
| | |
|
| | | public class CA331_tagCMUnEquipZhuXianItem : GameNetPackBasic {
|
| | | public byte EquipIndex; //装备在诛仙装备背包中的索引
|
| | |
|
| | | public CA331_tagCMUnEquipZhuXianItem () {
|
| | | combineCmd = (ushort)0x03FE;
|
| | | _cmd = (ushort)0xA331;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | WriteBytes (EquipIndex, NetDataType.BYTE);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: c42dab7b9edaa2743a3c60e26fbeb981 |
| | | timeCreated: 1548121806 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | case RuneTowerModel.RUNETOWER_MAPID:
|
| | | StageManager.Instance.Load<RuneTowerDungeonStage>(_mapConfig.MapID, vNetData.socketType);
|
| | | break;
|
| | | case JadeDynastyTowerModel.DATA_MAPID:
|
| | | StageManager.Instance.Load<JadeDynastyTowerDungeonStage>(_mapConfig.MapID, vNetData.socketType);
|
| | | break;
|
| | | case DemonJarModel.DEMONJAR_SINGLEMAPID:
|
| | | StageManager.Instance.Load<FakeDemonJarDungeonStage>(_mapConfig.MapID, vNetData.socketType);
|
| | | break;
|
| | |
| | |
|
| | | model.UpdateTreasurePotentialInfo(vNetData.OldSkillID, vNetData.NewSkillID);
|
| | | ModelCenter.Instance.GetModel<TalentModel>().UpdateTalentSkill(vNetData.OldSkillID, vNetData.NewSkillID);
|
| | | ModelCenter.Instance.GetModel<JadeDynastySkillModel>().OnReceivePackage(vNetData);
|
| | | if (vNetData != null)
|
| | | {
|
| | | // horsemodel.MountSkill0310(vNetData.NewSkillID);
|
| | |
| | | case RuneTowerModel.RUNETOWER_MAPID: |
| | | StageManager.Instance.Load<RuneTowerDungeonStage>(_mapConfig.MapID, package.socketType); |
| | | break; |
| | | case JadeDynastyTowerModel.DATA_MAPID: |
| | | StageManager.Instance.Load<JadeDynastyTowerDungeonStage>(_mapConfig.MapID, package.socketType); |
| | | break; |
| | | case DemonJarModel.DEMONJAR_SINGLEMAPID: |
| | | StageManager.Instance.Load<FakeDemonJarDungeonStage>(_mapConfig.MapID, package.socketType); |
| | | break; |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 3e05761d690b75440a6be79207d0fb01 |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1d70ccd06161e0443b7a802ad94292f8 |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 71e878ac60c49ad4f964dd2dbc725739 |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: eed34091b0568664b9fb42f0634496c1 |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using Snxxz.UI;
|
| | | // B2 13 诛仙塔通关层数 #tagMCZhuXianTowerInfo
|
| | | public class DTCB213_tagMCZhuXianTowerInfo : DtcBasic {
|
| | | JadeDynastyTowerModel model { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } }
|
| | |
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | var vNetData = vNetPack as HB213_tagMCZhuXianTowerInfo;
model.UpdateHighestPassFloor(vNetData);
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: de61b4ddcb3826a46bedb2c821df0d52 |
| | | timeCreated: 1548062939 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 32ceb8b7faf99f84a8b73ce53c5e3e4d |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 77f69c2b862d1704299a32d0d8eeb71e |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: fa14960fa44b0d1439bab471a764e34f |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d914565b65f8e8145988734c4d915834 |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B2 13 诛仙塔通关层数 #tagMCZhuXianTowerInfo
|
| | |
|
| | | public class HB213_tagMCZhuXianTowerInfo : GameNetPackBasic {
|
| | | public uint Floor; // 已通关层
|
| | |
|
| | | public HB213_tagMCZhuXianTowerInfo () {
|
| | | _cmd = (ushort)0xB213;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out Floor, vBytes, NetDataType.DWORD);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1796d4c1af065814eb764a01e6066e76 |
| | | timeCreated: 1548062938 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using Snxxz.UI; |
| | | using System.Collections; |
| | | using TableConfig; |
| | | using UnityEngine; |
| | | |
| | | public class JadeDynastyTowerDungeonStage : DungeonStage |
| | | { |
| | | Animator m_TowerAnimator; |
| | | Camera m_ShowCamera; |
| | | |
| | | Vector3 defaultShowCameraPosition; |
| | | Quaternion defaultShowCameraRotation; |
| | | float defaultFov; |
| | | |
| | | JadeDynastyTowerModel model { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } } |
| | | |
| | | public override void Initialize() |
| | | { |
| | | base.Initialize(); |
| | | } |
| | | |
| | | public override void UnInitialize() |
| | | { |
| | | StopAllCoroutines(); |
| | | base.UnInitialize(); |
| | | } |
| | | |
| | | protected override void OnStageLoadFinish() |
| | | { |
| | | base.OnStageLoadFinish(); |
| | | WindowCenter.Instance.Open<JadeDynastyTowerHintWin>(); |
| | | } |
| | | |
| | | public void PerformChallengeNextLevel() |
| | | { |
| | | WindowCenter.Instance.Close<DungeonGradeWin>(); |
| | | WindowCenter.Instance.Close<MapNameHintWin>(); |
| | | WindowCenter.Instance.Close<JadeDynastyTowerHintWin>(); |
| | | WindowCenter.Instance.Close<DemonJarBossLifeBarWin>(); |
| | | |
| | | model.RequestRefreshMonster(); |
| | | |
| | | if (PlayerDatas.Instance.hero != null) |
| | | { |
| | | PlayerDatas.Instance.hero.Behaviour.StartHandupAI(); |
| | | } |
| | | |
| | | var mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID); |
| | | var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(); |
| | | SoundPlayer.Instance.PlayBackGroundMusic(mapResConfig.Music); |
| | | |
| | | WindowCenter.Instance.Open<DungeonEndCoolDownWin>(); |
| | | WindowCenter.Instance.Open<MapNameHintWin>(); |
| | | WindowCenter.Instance.Open<JadeDynastyTowerHintWin>(); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: eafd24ea78eb761498952163bd245977 |
| | | timeCreated: 1547780317 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | if (!FuncOpen.Instance.IsFuncOpen(162))
|
| | | {
|
| | | return;
|
| | | }
|
| | | ChatData chatData = new ChatCrossServerData(package.Content, (int)package.PlayerID, package.Name, package.Extras);
|
| | | LocalChatHistory.Save(chatData as ChatUeseData);
|
| | | KeepChatInfo(chatData);
|
| | |
| | | case DailyQuestType.RuneTowerSweep:
|
| | | RuneTowerWin.guideSweep = true;
|
| | | WindowCenter.Instance.CloseImmediately<DailyQuestWin>();
|
| | | WindowCenter.Instance.Open<RuneTowerWin>();
|
| | | WindowCenter.Instance.Open<TowerWin>(false,0);
|
| | | break;
|
| | | case DailyQuestType.BossHome:
|
| | | WindowCenter.Instance.CloseImmediately<DailyQuestWin>();
|
| | |
| | | break;
|
| | | case DailyQuestType.RuneTower:
|
| | | WindowCenter.Instance.CloseImmediately<DailyQuestWin>();
|
| | | WindowCenter.Instance.Open<RuneTowerWin>();
|
| | | WindowCenter.Instance.Open<TowerWin>(false, 0);
|
| | | break;
|
| | | case DailyQuestType.TreasureCollectSoul:
|
| | | GotoTreasureCollectSoul();
|
| | |
| | | WindowCenter.Instance.CloseImmediately<DailyQuestWin>();
|
| | | WindowCenter.Instance.Open<LootPreciousFrameWin>(false, 3);
|
| | | break;
|
| | | case DailyQuestType.JadeDynastyTower:
|
| | | WindowCenter.Instance.CloseImmediately<DailyQuestWin>();
|
| | | WindowCenter.Instance.Open<TowerWin>(false, 1);
|
| | | break;
|
| | | default:
|
| | | CSharpCallLua.GotoLuaDailyQuest(_id);
|
| | | break;
|
| | |
| | | && !CrossServerUtility.IsCrossServerOneVsOne());
|
| | | m_ContainerAncient.gameObject.SetActive(dataMapId == 31160);
|
| | | m_BossInfosContainer.gameObject.SetActive(
|
| | | dataMapId == ElderGodAreaModel.ELDERGODAREA_MAPID |
| | | dataMapId == ElderGodAreaModel.ELDERGODAREA_MAPID
|
| | | || dataMapId == BossHomeModel.BOSSHOME_MAPID);
|
| | |
|
| | | m_GatherSoulDungeonBehaviour.gameObject.SetActive(dataMapId == GatherSoulDungeonModel.DUNGEON_MAPID);
|
| | |
| | | {
|
| | | if (_ok)
|
| | | {
|
| | | if (dataMapId==CrossServerBossModel.DATA_MAPID)
|
| | | if (dataMapId == CrossServerBossModel.DATA_MAPID)
|
| | | {
|
| | | var crossServerBossModel = ModelCenter.Instance.GetModel<CrossServerBossModel>();
|
| | | crossServerBossModel.RequestExit();
|
| | |
| | | model.ExitCurrentDungeon();
|
| | | }
|
| | | break;
|
| | | case JadeDynastyTowerModel.DATA_MAPID:
|
| | | var jadeDynastyTowerModel = ModelCenter.Instance.GetModel<JadeDynastyTowerModel>();
|
| | | jadeDynastyTowerModel.RequestAward();
|
| | | if (model.dungeonResult.grade == 5)
|
| | | {
|
| | | if (!jadeDynastyTowerModel.IsTopFloor(jadeDynastyTowerModel.currentFloor))
|
| | | {
|
| | | var dungeonStage = StageManager.Instance.CurrentStage as JadeDynastyTowerDungeonStage;
|
| | | dungeonStage.PerformChallengeNextLevel();
|
| | | model.UpdateCoolDown(DungeonCoolDownType.LeaveMap, 0);
|
| | | model.UpdateCoolDown(DungeonCoolDownType.TowerTake, 0);
|
| | | }
|
| | | else
|
| | | {
|
| | | model.ExitCurrentDungeon();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | model.ExitCurrentDungeon();
|
| | | }
|
| | |
|
| | | WindowCenter.Instance.Close<JadyDynastyTowerVictoryWin>();
|
| | | break;
|
| | | default:
|
| | | model.ExitCurrentDungeon();
|
| | | break;
|
| | |
| | |
|
| | | var send = new CA505_tagCMBeginFBWipeOut();
|
| | | send.MapID = (ushort)_dungeon.mapId;
|
| | | send.LineID = (ushort)_dungeon.lineId; |
| | | send.LineID = (ushort)_dungeon.lineId;
|
| | | send.Cnt = 1;
|
| | | send.IsFinish = 1;
|
| | |
|
| | |
| | | if (ruinsTranscriptMapId == _dungeon.mapId)
|
| | | {
|
| | | OpenFloorChooseWin();
|
| | | |
| | |
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | var mainModel = ModelCenter.Instance.GetModel<PlayerMainDate>();
|
| | | int WhyjNuber = mainModel.GetWHYJNum();
|
| | | mainModel.LayerNumberNow = WhyjNuber - 1;
|
| | | RequestChallangeDungeon(ruinsTranscriptMapId, WhyjNuber-1);
|
| | | RequestChallangeDungeon(ruinsTranscriptMapId, WhyjNuber - 1);
|
| | | }
|
| | |
|
| | | public void GroupChallenge(int _dungeonId, int _lineId = 0)
|
| | |
| | | break;
|
| | | }
|
| | |
|
| | | switch(_type)
|
| | | switch (_type)
|
| | | {
|
| | | case DungeonCoolDownType.WaitPlayer:
|
| | | if(!WindowCenter.Instance.IsOpen<CrossServerOneVsOneWaitPlayerCoolDownWin>())
|
| | | if (!WindowCenter.Instance.IsOpen<CrossServerOneVsOneWaitPlayerCoolDownWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<CrossServerOneVsOneWaitPlayerCoolDownWin>();
|
| | | }
|
| | |
| | | case GatherSoulDungeonModel.DUNGEON_MAPID:
|
| | | WindowCenter.Instance.Open<DungeonGatherSoulVictoryWin>();
|
| | | break;
|
| | | case JadeDynastyTowerModel.DATA_MAPID:
|
| | | WindowCenter.Instance.Open<JadyDynastyTowerVictoryWin>();
|
| | | break;
|
| | | default:
|
| | | WindowCenter.Instance.Open<DungeonVictoryWin>();
|
| | | break;
|
| | |
| | | [SerializeField] Text m_MagicEssence;
|
| | | [SerializeField, Header("仙缘币")] protected Transform m_ContainerXianyuanCoins;
|
| | | [SerializeField] Text m_XianyuanCoins;
|
| | | [SerializeField, Header("退出按钮")] ButtonEx m_Exit;
|
| | | [SerializeField, Header("退出按钮")] protected ButtonEx m_Exit;
|
| | | [SerializeField] protected Text m_ExitTimer;
|
| | | [SerializeField, Header("评级")] GameObject m_GradeBottom;
|
| | | [SerializeField] Image m_Grade;
|
| | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | var iceCrystalVeinModel = ModelCenter.Instance.GetModel<IceCrystalVeinModel>();
|
| | | |
| | |
|
| | | if (iceCrystalVeinModel.IsIceCrystalVein_Copy)
|
| | | {
|
| | | iceCrystalVeinModel.IsIceCrystalVein_Copy = false;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void ExitDungeon()
|
| | | protected virtual void ExitDungeon()
|
| | | {
|
| | | dungeonModel.ExitCurrentDungeon();
|
| | | }
|
| | |
| | | var fbEndInfo = dungeonModel.dungeonResult;
|
| | | var results = fbEndInfo.xianyuanCoin;
|
| | | bool isShow = true;
|
| | | |
| | |
|
| | | if (fbEndInfo.dataMapID == 51010)
|
| | | {
|
| | | if (m_ContainerXianyuanCoins == null)
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if(m_ContainerXianyuanCoins == null
|
| | | if (m_ContainerXianyuanCoins == null
|
| | | || results == null || results.Length < 1)
|
| | | {
|
| | | isShow = false;
|
| | |
| | |
|
| | | int getCoins = 0;
|
| | | int reason = 0;
|
| | | if(results != null && results.Length > 1)
|
| | | if (results != null && results.Length > 1)
|
| | | {
|
| | | getCoins = results[0];
|
| | | reason = results[1];
|
| | | }
|
| | |
|
| | | if(getCoins > 0 && reason == 0)
|
| | | if (getCoins > 0 && reason == 0)
|
| | | {
|
| | | m_XianyuanCoins.text = UIHelper.ReplaceLargeNum((ulong)getCoins);
|
| | | }
|
| | | else
|
| | | {
|
| | | switch(reason)
|
| | | switch (reason)
|
| | | {
|
| | | case 1:
|
| | | m_XianyuanCoins.text = UIHelper.AppendStringColor(TextColType.Red, Language.Get("DungeonAssist145"));
|
| | |
| | | m_XianyuanCoins.text = UIHelper.AppendStringColor(TextColType.Red, Language.Get("DungeonAssist144"));
|
| | | break;
|
| | | default:
|
| | | if(fbEndInfo.dataMapID == 51010)
|
| | | if (fbEndInfo.dataMapID == 51010)
|
| | | {
|
| | | if(fbEndInfo.startRewardLineID != 0)
|
| | | if (fbEndInfo.startRewardLineID != 0)
|
| | | {
|
| | | m_XianyuanCoins.text = UIHelper.AppendStringColor(TextColType.Red, Language.Get("DungeonAssist146"));
|
| | | }
|
| | |
| | | public class TargetBriefInfo
|
| | | {
|
| | |
|
| | | public static int selectedNpcId { get; private set; }
|
| | |
|
| | | public static void Init()
|
| | | {
|
| | | GA_NpcFightBoss.s_OnSelect += OnShowBossLifeBar;
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (_show)
|
| | | {
|
| | | selectedNpcId = _npcId;
|
| | | }
|
| | | else
|
| | | {
|
| | | selectedNpcId = 0;
|
| | | }
|
| | |
|
| | | var mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | var dataMapId = ModelCenter.Instance.GetModel<DungeonModel>().GetDataMapIdByMapId(mapId);
|
| | | if (dataMapId == DemonJarModel.DEMONJAR_MAPID
|
| | | || dataMapId == JadeDynastyBossModel.JADEDYNASTY_MAP)
|
| | | || dataMapId == JadeDynastyBossModel.JADEDYNASTY_MAP
|
| | | || dataMapId == JadeDynastyTowerModel.DATA_MAPID)
|
| | | {
|
| | | if (_show)
|
| | | {
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | selectedNpcId = _npcId;
|
| | | var mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | var dataMapId = ModelCenter.Instance.GetModel<DungeonModel>().GetDataMapIdByMapId(mapId);
|
| | | if (dataMapId == DemonJarModel.DEMONJAR_MAPID
|
| | | || dataMapId == JadeDynastyBossModel.JADEDYNASTY_MAP)
|
| | | || dataMapId == JadeDynastyBossModel.JADEDYNASTY_MAP
|
| | | || dataMapId == JadeDynastyTowerModel.DATA_MAPID)
|
| | | {
|
| | | DemonJarBossLifeBarWin win;
|
| | | if (!WindowCenter.Instance.IsOpen<DemonJarBossLifeBarWin>())
|
| | |
| | |
|
| | | win.RefreshBossLifeBar(_instanceId, _npcId, _hp, _maxHp);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | public void InitBossLifeBar()
|
| | | {
|
| | | m_BossLifeBar.gameObject.SetActive(true);
|
| | | var bossId = demonJarModel.GetBossIdByLine(model.mission.lineID);
|
| | | var npcConfig = Config.Instance.Get<NPCConfig>(bossId);
|
| | | var npcConfig = Config.Instance.Get<NPCConfig>(TargetBriefInfo.selectedNpcId);
|
| | | currentHp = (long)(model.mission.remainHPPer * 0.01f * BOSSHP_TOTAL);
|
| | | m_BossLifeBar.SetBaseInfo(bossId, (ulong)currentHp, BOSSHP_TOTAL, npcConfig.NPCLV);
|
| | | m_BossLifeBar.SetBaseInfo(TargetBriefInfo.selectedNpcId, (ulong)currentHp, BOSSHP_TOTAL, npcConfig.NPCLV);
|
| | |
|
| | | inited = true;
|
| | | }
|
| | |
| | | {
|
| | | OnClickSendBtn();
|
| | | }
|
| | | if (Input.GetKeyDown(KeyCode.P))
|
| | | {
|
| | | WindowCenter.Instance.Open<JadeDynastyKnapSackWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | private void CreateCmdCell()
|
| | |
| | |
|
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | | JadeDynastyEquipModel equipModel { get { return ModelCenter.Instance.GetModel<JadeDynastyEquipModel>(); } }
|
| | |
|
| | | private void OnEnable()
|
| | | {
|
| | |
| | |
|
| | | public void SetDisplay()
|
| | | {
|
| | | bool islock = false;
|
| | | int towerLayer = 1;
|
| | | lockObj.SetActive(islock);
|
| | | lockText.gameObject.SetActive(islock);
|
| | | bool islock = equipModel.IsLockEquipPlace((int)equipType);
|
| | | nameText.text = string.Empty;
|
| | | lockText.gameObject.SetActive(false);
|
| | | nameText.gameObject.SetActive(false);
|
| | | lockObj.SetActive(islock);
|
| | | equipBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | if(islock)
|
| | | {
|
| | | itemCell.gameObject.SetActive(false);
|
| | | lockText.text = StringUtility.Contact("诛仙塔/n",towerLayer,"层解锁");
|
| | | }
|
| | | else
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptJadeDynastyEquip,(int)equipType);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptJadeDynastyEquip, (int)equipType);
|
| | | itemCell.gameObject.SetActive(itemModel != null);
|
| | | if(itemModel != null)
|
| | | if (itemModel != null)
|
| | | {
|
| | | itemCell.Init(itemModel);
|
| | | itemCell.cellBtn.AddListener(() => { ClickItemCell(itemModel); });
|
| | |
| | |
|
| | | private void PutOffEquip(PackType type, int index, int id)
|
| | | {
|
| | | if (type != PackType.rptJadeDynastyEquip || index != (int)equipType) return;
|
| | | int equipIndex = 0;
|
| | | equipModel.TryGetJadeDynastyEquipIndex((int)equipType, out equipIndex);
|
| | | if (type != PackType.rptJadeDynastyEquip || index != equipIndex) return;
|
| | |
|
| | | SetDisplay();
|
| | | }
|
| | |
|
| | | private void PutOnEquip(PackType type, int index, int id)
|
| | | {
|
| | | if (type != PackType.rptJadeDynastyEquip || index != (int)equipType) return;
|
| | | int equipIndex = 0;
|
| | | equipModel.TryGetJadeDynastyEquipIndex((int)equipType, out equipIndex);
|
| | | if (type != PackType.rptJadeDynastyEquip || index != equipIndex) return;
|
| | |
|
| | | SetDisplay();
|
| | | }
|
| | |
| | | {
|
| | | if (item == null) return;
|
| | |
|
| | | tipsModel.SetItemTipsModel(item.packType,item.itemInfo.ItemGUID);
|
| | | tipsModel.SetItemTipsModel(item.packType,item.itemInfo.ItemGUID,false);
|
| | | tipsModel.SetPutOnTipsBtn(tipsModel.curAttrData);
|
| | | tipsModel.ShowUICtrl();
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Linq;
|
| | | using System.Text;
|
| | | using TableConfig;
|
| | | using LitJson;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class JadeDynastyEquipModel : Model,IBeforePlayerDataInitialize,IAfterPlayerDataInitialize,IPlayerLoginOk
|
| | | {
|
| | | JadeDynastyTowerModel towerModel { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } }
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | |
|
| | | public int UnlockTowerLayer
|
| | | {
|
| | | get { return towerModel.highestPassFloor; }
|
| | | }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | ParseFuncConfig();
|
| | | ParseSuitAttrConfig();
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public void OnAfterPlayerDataInitialize()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | #region 解析表数据
|
| | | public Dictionary<int, int> lockEquipLayerDict { get; private set; }
|
| | | public Dictionary<int, List<int>> suitTypeDict { get; private set;}
|
| | | public void ParseFuncConfig()
|
| | | {
|
| | | lockEquipLayerDict = new Dictionary<int, int>();
|
| | | suitTypeDict = new Dictionary<int, List<int>>();
|
| | | var equipZhuXian = Config.Instance.Get<FuncConfigConfig>("EquipZhuXian");
|
| | | var lockEquipData = JsonMapper.ToObject(equipZhuXian.Numerical1);
|
| | | foreach(var key in lockEquipData.Keys)
|
| | | {
|
| | | int equipPlace = int.Parse(key);
|
| | | int towerLayer = int.Parse(lockEquipData[key].ToString());
|
| | | lockEquipLayerDict.Add(equipPlace,towerLayer);
|
| | | }
|
| | |
|
| | | var suitGroupData = JsonMapper.ToObject(equipZhuXian.Numerical2);
|
| | | foreach(var key in suitGroupData.Keys)
|
| | | {
|
| | | int groupType = int.Parse(key);
|
| | | var equipPlaces = suitGroupData[key];
|
| | | if(equipPlaces.IsArray)
|
| | | {
|
| | | List<int> list = new List<int>();
|
| | | suitTypeDict.Add(groupType,list);
|
| | | for(int i = 0; i < equipPlaces.Count; i++)
|
| | | {
|
| | | var equipPlace = equipPlaces[i];
|
| | | list.Add(int.Parse(equipPlace.ToString()));
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public Dictionary<int, Dictionary<int, JadeDynastySuitAttrData>> suitAttrDict { get; private set; }
|
| | | public void ParseSuitAttrConfig()
|
| | | {
|
| | | suitAttrDict = new Dictionary<int, Dictionary<int, JadeDynastySuitAttrData>>();
|
| | | var suitConfigs = Config.Instance.GetAllValues<JadeDynastySuitAttrConfig>();
|
| | | foreach(var config in suitConfigs)
|
| | | {
|
| | | int suitLv = config.suiteLV;
|
| | | int type = config.suiteType;
|
| | | var suitAttrData = new JadeDynastySuitAttrData(config.id);
|
| | | if (!suitAttrDict.ContainsKey(type))
|
| | | {
|
| | | var dict = new Dictionary<int, JadeDynastySuitAttrData>();
|
| | | dict.Add(suitLv,suitAttrData);
|
| | | suitAttrDict.Add(type,dict);
|
| | | }
|
| | | else
|
| | | {
|
| | | var dict = suitAttrDict[type];
|
| | | if(!dict.ContainsKey(suitLv))
|
| | | {
|
| | | dict.Add(suitLv, suitAttrData);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public class JadeDynastySuitAttrData
|
| | | {
|
| | | public int suitLv { get; private set; }
|
| | | public Dictionary<int, int> attrDict { get; private set; }
|
| | | public JadeDynastySuitAttrConfig suitAttrConfig { get; private set; }
|
| | |
|
| | | public JadeDynastySuitAttrData(int id)
|
| | | {
|
| | | suitLv = 0;
|
| | | attrDict = new Dictionary<int, int>();
|
| | | suitAttrConfig = Config.Instance.Get<JadeDynastySuitAttrConfig>(id);
|
| | | if(suitAttrConfig != null)
|
| | | {
|
| | | suitLv = suitAttrConfig.suiteLV;
|
| | | int[] attrIds = suitAttrConfig.attrIDList;
|
| | | int[] attrValues = suitAttrConfig.attrValueList;
|
| | | if(attrIds != null && attrValues != null)
|
| | | {
|
| | | for(int i = 0; i < attrIds.Length; i++)
|
| | | {
|
| | | int attrId = attrIds[i];
|
| | | int attrValue = attrValues[i];
|
| | | if(!attrDict.ContainsKey(attrId))
|
| | | {
|
| | | attrDict.Add(attrId, attrValue);
|
| | | }
|
| | | else
|
| | | {
|
| | | attrDict[attrId] += attrValue;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 封包
|
| | | #endregion
|
| | |
|
| | | public bool TryGetJadeDynastyEquipIndex(int equipPlace,out int equipIndex)
|
| | | {
|
| | | equipIndex = 0;
|
| | | if(equipPlace >= (int)RoleEquipType.JadeDynasty_Cloak && equipPlace <= (int)RoleEquipType.JadeDynasty_Sword4)
|
| | | {
|
| | | equipIndex = equipPlace - 121;
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetLockTowerLayer(int equipPlace,out int towerLayer)
|
| | | {
|
| | | towerLayer = 0;
|
| | | return lockEquipLayerDict.TryGetValue(equipPlace,out towerLayer);
|
| | | }
|
| | |
|
| | | public bool TryGetSuitType(int equipPlace,out int suitType)
|
| | | {
|
| | | suitType = 0;
|
| | | foreach(var type in suitTypeDict.Keys)
|
| | | {
|
| | | var equipPlaces = suitTypeDict[type];
|
| | | if(equipPlaces.Contains(equipPlace))
|
| | | {
|
| | | suitType = type;
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetEquipPlaces(int equipPlace,out List<int> equipPlaces)
|
| | | {
|
| | | int suitType = 0;
|
| | | equipPlaces = null;
|
| | | bool isSuit = TryGetSuitType(equipPlace,out suitType);
|
| | | if(isSuit)
|
| | | {
|
| | | equipPlaces = suitTypeDict[suitType];
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetSuitAttrData(int equipPlace,int suitLv,out JadeDynastySuitAttrData suitAttrData)
|
| | | {
|
| | | suitAttrData = null;
|
| | | int suitType = 0;
|
| | | TryGetSuitType(equipPlace,out suitType);
|
| | | if(suitAttrDict.ContainsKey(suitType))
|
| | | {
|
| | | var dict = suitAttrDict[suitType];
|
| | | return dict.TryGetValue(suitLv,out suitAttrData);
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool IsWillUnlockEquipPlace(int equipPlace)
|
| | | {
|
| | | int willUnlockPlace = 0;
|
| | | int unlockTowerLayer = UnlockTowerLayer;
|
| | | int minTowerLayer = 0;
|
| | | foreach(var key in lockEquipLayerDict.Keys)
|
| | | {
|
| | | int lockTowerLayer = lockEquipLayerDict[key];
|
| | | if (lockTowerLayer > unlockTowerLayer
|
| | | && (minTowerLayer > lockTowerLayer || minTowerLayer == 0))
|
| | | {
|
| | | willUnlockPlace = key;
|
| | | minTowerLayer = lockTowerLayer;
|
| | | }
|
| | | }
|
| | |
|
| | | return willUnlockPlace == equipPlace && willUnlockPlace != 0;
|
| | | }
|
| | |
|
| | | public bool IsLockEquipPlace(int equipPlace)
|
| | | {
|
| | | int unlockTowerLayer = UnlockTowerLayer;
|
| | | int towerLayer = 0;
|
| | | bool isLock = TryGetLockTowerLayer(equipPlace,out towerLayer);
|
| | | if(isLock && towerLayer > unlockTowerLayer)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetMaxSuitLV(int equipPlace,out int maxSuitLv)
|
| | | {
|
| | | maxSuitLv = 0;
|
| | | var suitLvs = GetSuitLvList(equipPlace);
|
| | | if(suitLvs != null && suitLvs.Count > 0)
|
| | | {
|
| | | maxSuitLv = suitLvs[suitLvs.Count - 1];
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public List<int> GetSuitLvList(int equipPlace)
|
| | | {
|
| | | int suitType = 0;
|
| | | bool isSuit = TryGetSuitType(equipPlace,out suitType);
|
| | | if(suitAttrDict.ContainsKey(suitType))
|
| | | {
|
| | | var dict = suitAttrDict[suitType];
|
| | | return dict.Keys.ToList();
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | public bool TryGetIsActiveSuit(int equipPlace,int suitLV,out List<int> activeEquips)
|
| | | {
|
| | | activeEquips = new List<int>();
|
| | | List<int> equipPlaces = null;
|
| | | bool isSuit = TryGetEquipPlaces(equipPlace, out equipPlaces);
|
| | | var itemModel = playerPack.GetItemModelByIndex(PackType.rptJadeDynastyEquip,equipPlace);
|
| | | if(itemModel != null)
|
| | | {
|
| | | int equipLv = itemModel.chinItemModel.LV;
|
| | | if(equipLv >= suitLV)
|
| | | {
|
| | | activeEquips = equipPlaces;
|
| | | return true;
|
| | | }
|
| | | }
|
| | |
|
| | | if(equipPlaces != null)
|
| | | {
|
| | | foreach(var key in equipPlaces)
|
| | | {
|
| | | var model = playerPack.GetItemModelByIndex(PackType.rptJadeDynastyEquip,key);
|
| | | if(model != null)
|
| | | {
|
| | | int equipLv = model.chinItemModel.LV;
|
| | | if (equipLv >= suitLV)
|
| | | {
|
| | | activeEquips.Add(key);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetSuitLV(int equipPlace,PackType type,out int curSuitLv,out int nextSuitLV)
|
| | | {
|
| | | curSuitLv = 0;
|
| | | nextSuitLV = 0;
|
| | | int maxSuitLv = 0;
|
| | | bool isMax = TryGetMaxSuitLV(equipPlace,out maxSuitLv);
|
| | | switch(type)
|
| | | {
|
| | | case PackType.rptJadeDynastyItem:
|
| | | if(isMax)
|
| | | {
|
| | | curSuitLv = maxSuitLv;
|
| | | return true;
|
| | | }
|
| | | break;
|
| | | case PackType.rptJadeDynastyEquip:
|
| | | int minEquipLv = 0;
|
| | | var suitLvs = GetSuitLvList(equipPlace);
|
| | | List<int> equipPlaces = null;
|
| | | bool isSuit = TryGetEquipPlaces(equipPlace, out equipPlaces);
|
| | | if (isSuit && equipPlaces != null)
|
| | | {
|
| | | foreach (var key in equipPlaces)
|
| | | {
|
| | | var model = playerPack.GetItemModelByIndex(type,key);
|
| | | if(model != null |
| | | && (minEquipLv > model.chinItemModel.LV
|
| | | || minEquipLv == 0))
|
| | | {
|
| | | minEquipLv = model.chinItemModel.LV;
|
| | | }
|
| | | else if(model == null)
|
| | | {
|
| | | minEquipLv = 0;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if(suitLvs != null)
|
| | | {
|
| | | if (minEquipLv != 0)
|
| | | {
|
| | | for (int i = suitLvs.Count - 1; i > -1; i++)
|
| | | {
|
| | | int suitLv = suitLvs[i];
|
| | | if (minEquipLv >= suitLv)
|
| | | {
|
| | | curSuitLv = suitLv;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | foreach (var suitLv in suitLvs)
|
| | | {
|
| | | if (suitLv > minEquipLv)
|
| | | {
|
| | | nextSuitLV = suitLv;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (curSuitLv != 0 || nextSuitLV != 0)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | break;
|
| | | }
|
| | |
|
| | | return false;
|
| | | |
| | | }
|
| | |
|
| | | public bool TryGetSumSuitAttr(int suitType,PackType type,out JadeDynastySuitAttrData activeSuit,out JadeDynastySuitAttrData nextSuit)
|
| | | {
|
| | | activeSuit = null;
|
| | | nextSuit = null;
|
| | | if (!suitTypeDict.ContainsKey(suitType)) return false;
|
| | |
|
| | | int equipPlace = suitTypeDict[suitType][0];
|
| | | int curSuitLv = 0;
|
| | | int nextSuitLv = 0;
|
| | | bool isSuitLv = TryGetSuitLV(equipPlace,type,out curSuitLv,out nextSuitLv);
|
| | |
|
| | | TryGetSuitAttrData(equipPlace,curSuitLv,out activeSuit);
|
| | | TryGetSuitAttrData(equipPlace,nextSuitLv,out nextSuit);
|
| | |
|
| | | return activeSuit != null || nextSuit != null;
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 31f790a2de0a97348bd308662d37e513 |
| | | timeCreated: 1548123671 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.AddListener(()=>
|
| | | {
|
| | | tipsModel.SetItemTipsModel(itemModel.packType,itemModel.itemInfo.ItemGUID);
|
| | | tipsModel.SetItemTipsModel(itemModel.packType,itemModel.itemInfo.ItemGUID,false,true);
|
| | | tipsModel.SetBagTipsBtn(tipsModel.curAttrData);
|
| | | tipsModel.ShowUICtrl();
|
| | | });
|
| | |
|
| | | }
|
| | |
| | | public class JadeDynastyKnapSackWin : Window
|
| | | {
|
| | | [SerializeField] FunctionButton funcEquip;
|
| | | [SerializeField] FunctionButton m_JadeDynastySkill;
|
| | | [SerializeField] FunctionButtonGroup funcGroup;
|
| | | [SerializeField] Button closeBtn;
|
| | | [SerializeField] Button leftBtn;
|
| | |
| | | }
|
| | | protected override void AddListeners()
|
| | | {
|
| | | closeBtn.AddListener(CloseClick);
|
| | | closeBtn.AddListener(ClickClose);
|
| | | leftBtn.AddListener(ClickLeft);
|
| | | rightBtn.AddListener(ClickRight);
|
| | | funcEquip.AddListener(ClickFuncEquip);
|
| | | m_JadeDynastySkill.AddListener(OpenJadeDynastySkill);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | |
|
| | |
| | | CloseSubWindows();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<JadeDynastyKnapSackWin>();
|
| | | WindowCenter.Instance.OpenWithoutAnimation<JadeDynastyEquipWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<JadeDynastyKnapSackWin>();
|
| | | WindowCenter.Instance.Open<JadeDynastyEquipWin>();
|
| | | }
|
| | | functionOrder = funcEquip.order;
|
| | | }
|
| | |
|
| | | private void OpenJadeDynastySkill()
|
| | | {
|
| | | CloseSubWindows();
|
| | | WindowCenter.Instance.Open<JadeDynastySkillWin>();
|
| | | functionOrder = m_JadeDynastySkill.order;
|
| | | }
|
| | |
|
| | | private void ClickClose()
|
| | | {
|
| | | CloseSubWindows();
|
| | | CloseImmediately();
|
| | | if(!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | private void CloseSubWindows()
|
| | | {
|
| | | var children = WindowConfig.Get().FindChildWindows(this.GetType().Name);
|
| | |
| | | using UnityEngine.UI;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using System.Linq;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
| | | [SerializeField] List<SuitAttr> suitAttrs = new List<SuitAttr>();
|
| | | [SerializeField] GameObject noneActive;
|
| | |
|
| | | public void SetDisplay(int suitLv,bool isNext = false)
|
| | | JadeDynastyEquipModel equipModel { get { return ModelCenter.Instance.GetModel<JadeDynastyEquipModel>(); } }
|
| | |
|
| | | public void SetDisplay(PackType type,bool isNext = false)
|
| | | {
|
| | | bool isShowNoneActive = false;
|
| | | if (!isNext)
|
| | | {
|
| | | bool isActive = true;
|
| | | isShowNoneActive = !isActive;
|
| | | titleText.text = StringUtility.Contact("套装总属性");
|
| | | }
|
| | | else
|
| | | {
|
| | | bool isMaxSuitLv = false;
|
| | | isShowNoneActive = isMaxSuitLv;
|
| | | titleText.text = StringUtility.Contact("进阶属性");
|
| | | }
|
| | |
|
| | | List<int> suitTypes = equipModel.suitTypeDict.Keys.ToList();
|
| | | bool isNoneActive = true;
|
| | | bool isMaxSuitLv = true;
|
| | | for(int i = 0; i < suitAttrs.Count; i++)
|
| | | {
|
| | | var suitAttr = suitAttrs[i];
|
| | | if(i < suitTypes.Count)
|
| | | {
|
| | | suitAttr.attrTypeObj.SetActive(true);
|
| | | int suitType = suitTypes[i];
|
| | | JadeDynastyEquipModel.JadeDynastySuitAttrData curAttrData = null;
|
| | | JadeDynastyEquipModel.JadeDynastySuitAttrData nextAttrData = null;
|
| | | equipModel.TryGetSumSuitAttr(suitType,type,out curAttrData, out nextAttrData);
|
| | | if(isNext)
|
| | | {
|
| | | if(nextAttrData != null)
|
| | | {
|
| | | isMaxSuitLv = false;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if(curAttrData != null)
|
| | | {
|
| | | isNoneActive = false;
|
| | | }
|
| | | }
|
| | | suitAttr.SetDisplay(suitType,type,isNext);
|
| | | }
|
| | | else
|
| | | {
|
| | | suitAttr.attrTypeObj.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | if(noneActive != null)
|
| | | {
|
| | | noneActive.SetActive(isShowNoneActive);
|
| | | }
|
| | |
|
| | | for(int i = 0; i < suitAttrs.Count; i++)
|
| | | {
|
| | | var suitAttr = suitAttrs[i];
|
| | | suitAttr.SetDisplay(i,1,null,null);
|
| | | if (isNext && isMaxSuitLv)
|
| | | {
|
| | | noneActive.SetActive(true);
|
| | | }
|
| | | else if (!isNext && isNoneActive)
|
| | | {
|
| | | noneActive.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | noneActive.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | [Serializable]
|
| | | public class SuitAttr
|
| | | {
|
| | | [SerializeField] public GameObject attrTypeObj;
|
| | | [SerializeField] Text suitTypeText;
|
| | | [SerializeField] List<GameObject> attrObjlist = new List<GameObject>();
|
| | | [SerializeField] List<Text> attrTextlist = new List<Text>();
|
| | | [SerializeField] Text activeText;
|
| | | [SerializeField] GameObject activeObj;
|
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | public void SetDisplay(int suitType,int suitLv,List<int> ids,List<int> values)
|
| | | {
|
| | | if (ids == null || values == null) return;
|
| | |
|
| | | bool isActive = true;
|
| | | switch(suitType)
|
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | JadeDynastyEquipModel equipModel { get { return ModelCenter.Instance.GetModel<JadeDynastyEquipModel>(); } }
|
| | |
|
| | | public void SetDisplay(int suitType,PackType type,bool isNext)
|
| | | {
|
| | | JadeDynastyEquipModel.JadeDynastySuitAttrData curAttrData = null;
|
| | | JadeDynastyEquipModel.JadeDynastySuitAttrData nextAttrData = null;
|
| | | JadeDynastyEquipModel.JadeDynastySuitAttrData suitAttrData = null;
|
| | | equipModel.TryGetSumSuitAttr(suitType,type,out curAttrData,out nextAttrData);
|
| | | suitAttrData = isNext ? nextAttrData : curAttrData;
|
| | | if(suitAttrData == null)
|
| | | {
|
| | | case 0:
|
| | | suitTypeText.text = StringUtility.Contact("诛仙守护LV." + suitLv);
|
| | | break;
|
| | | case 1:
|
| | | suitTypeText.text = StringUtility.Contact("诛仙之力LV." + suitLv);
|
| | | break;
|
| | | case 2:
|
| | | suitTypeText.text = StringUtility.Contact("诛仙剑阵LV." + suitLv);
|
| | | break;
|
| | | attrTypeObj.SetActive(false);
|
| | | return;
|
| | | }
|
| | | else
|
| | | {
|
| | | attrTypeObj.SetActive(true);
|
| | | switch (suitType)
|
| | | {
|
| | | case 1:
|
| | | suitTypeText.text = StringUtility.Contact("诛仙守护LV." + suitAttrData.suitLv);
|
| | | break;
|
| | | case 2:
|
| | | suitTypeText.text = StringUtility.Contact("诛仙之力LV." + suitAttrData.suitLv);
|
| | | break;
|
| | | case 3:
|
| | | suitTypeText.text = StringUtility.Contact("诛仙剑阵LV." + suitAttrData.suitLv);
|
| | | break;
|
| | | }
|
| | |
|
| | | }
|
| | | int[] ids = suitAttrData.suitAttrConfig.attrIDList;
|
| | | int[] values = suitAttrData.suitAttrConfig.attrValueList;
|
| | | int equipPlace = equipModel.suitTypeDict[suitType][0];
|
| | | List<int> activeEquips = null;
|
| | | bool isActive = equipModel.TryGetIsActiveSuit(equipPlace,suitAttrData.suitLv,out activeEquips);
|
| | | activeObj.SetActive(!isActive);
|
| | | if(!isActive)
|
| | | {
|
| | | string conditionSB = StringUtility.Contact("达到8阶激活");
|
| | | string conditionSB = StringUtility.Contact("达到",suitAttrData.suitLv,"阶激活");
|
| | | activeText.text = conditionSB;
|
| | | }
|
| | | for (int i = 0; i < attrObjlist.Count; i++)
|
| | | {
|
| | | var attrObj = attrObjlist[i];
|
| | | attrObj.SetActive(i < ids.Count);
|
| | | if(i < ids.Count)
|
| | | attrObj.SetActive(i < ids.Length);
|
| | | if(i < ids.Length)
|
| | | {
|
| | | var attrId = ids[i];
|
| | | var attrValue = values[i];
|
| | |
| | |
|
| | | private void SetDisplay()
|
| | | {
|
| | | int curSuitLv = 0;
|
| | | int nextSuitLv = 1;
|
| | | bool isMaxSuitLv = false;
|
| | | nextSuitAttrBeh.gameObject.SetActive(!isMaxSuitLv);
|
| | | if(isMaxSuitLv)
|
| | | {
|
| | | curSuitAttrBeh.SetDisplay(curSuitLv);
|
| | | }
|
| | | else
|
| | | {
|
| | | curSuitAttrBeh.SetDisplay(curSuitLv);
|
| | | nextSuitAttrBeh.SetDisplay(nextSuitLv,true);
|
| | | }
|
| | | curSuitAttrBeh.SetDisplay(PackType.rptJadeDynastyEquip);
|
| | | nextSuitAttrBeh.SetDisplay(PackType.rptJadeDynastyEquip, true);
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 2f9ea79536d2476479a4288b9329e172 |
| | | folderAsset: yes |
| | | timeCreated: 1548126896 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using TableConfig;
|
| | | using UnityEngine; |
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class JadeDynastySkillCell : CellView
|
| | | {
|
| | | [SerializeField] Transform m_ContainerSelect;
|
| | | [SerializeField] Image m_SkillIcon;
|
| | | [SerializeField] Text m_SkillName;
|
| | | [SerializeField] Transform m_ContainerSkillLock;
|
| | | [SerializeField] Text m_Condition;
|
| | | [SerializeField] Text[] m_EquipPlaceNames;
|
| | | [SerializeField] Transform m_ContainerLock;
|
| | | [SerializeField] Transform m_ContainerUnlockable;
|
| | | [SerializeField] Button m_Unlock;
|
| | | [SerializeField] Transform m_ContainerUnlocked;
|
| | |
|
| | | JadeDynastySkillModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<JadeDynastySkillModel>(); }
|
| | | }
|
| | |
|
| | | public void Display(int skillId)
|
| | | {
|
| | | m_ContainerSelect.gameObject.SetActive(skillId == model.selectSkill);
|
| | |
|
| | | m_Unlock.RemoveAllListeners();
|
| | |
|
| | | var skillConfig = Config.Instance.Get<SkillConfig>(skillId);
|
| | | if (skillConfig != null)
|
| | | {
|
| | | m_SkillIcon.SetSprite(skillConfig.IconName);
|
| | | m_SkillName.text = skillConfig.SkillName;
|
| | | }
|
| | |
|
| | | var skillState = model.GetSkillState(skillId);
|
| | | m_ContainerSkillLock.gameObject.SetActive(skillState != JadeDynastySkillState.Unlocked);
|
| | | JadeDynastySkillCondition condition;
|
| | |
|
| | | var index = 0;
|
| | | if (model.TryGetSkillCondition(skillId, out condition))
|
| | | {
|
| | | m_Condition.text = Language.Get("JadeDynastySkillContition", condition.level);
|
| | | foreach (var equipPlace in condition.equipPlaces)
|
| | | {
|
| | | if (index < m_EquipPlaceNames.Length)
|
| | | {
|
| | | m_EquipPlaceNames[index].gameObject.SetActive(true);
|
| | | m_EquipPlaceNames[index].text = Language.Get(((RoleEquipType)equipPlace).ToString());
|
| | | m_EquipPlaceNames[index].color = skillState == JadeDynastySkillState.Unlocked || model.IsSatisfyEquipLevel(equipPlace, condition.level) ?
|
| | | UIHelper.GetUIColor(TextColType.DarkGreen) : UIHelper.GetUIColor(TextColType.White, true);
|
| | | }
|
| | | index++;
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = index; i < m_EquipPlaceNames.Length; i++)
|
| | | {
|
| | | m_EquipPlaceNames[i].gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | m_ContainerLock.gameObject.SetActive(skillState == JadeDynastySkillState.Lock);
|
| | | m_ContainerUnlockable.gameObject.SetActive(skillState == JadeDynastySkillState.Unlockable);
|
| | | m_ContainerUnlocked.gameObject.SetActive(skillState == JadeDynastySkillState.Unlocked);
|
| | |
|
| | | if (skillState == JadeDynastySkillState.Unlockable)
|
| | | {
|
| | | m_Unlock.AddListener(() =>
|
| | | {
|
| | | C0304_tagCAddSkillPoint pak = new C0304_tagCAddSkillPoint();
|
| | | pak.SkillID = (ushort)skillId;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 173092759a751964e8bce56c5d62f138 |
| | | timeCreated: 1548143731 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Linq;
|
| | | using TableConfig;
|
| | | using UnityEngine; |
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class JadeDynastySkillModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | Dictionary<int, List<int>> jadeDynastySkills = new Dictionary<int, List<int>>();
|
| | | Dictionary<int, JadeDynastySkillCondition> skillConditions = new Dictionary<int, JadeDynastySkillCondition>();
|
| | | Dictionary<int, Sprite[]> skillFrames = new Dictionary<int, Sprite[]>();
|
| | | List<int> alreadyUnlockSkills = new List<int>();
|
| | |
|
| | | bool serverInited = false;
|
| | |
|
| | | public List<int> mySkills
|
| | | {
|
| | | get
|
| | | {
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | var key = (int)Mathf.Pow(2, job);
|
| | | if (jadeDynastySkills.ContainsKey(key))
|
| | | {
|
| | | return jadeDynastySkills[key];
|
| | | }
|
| | | else
|
| | | {
|
| | | jadeDynastySkills[key] = new List<int>();
|
| | | }
|
| | | return jadeDynastySkills[key];
|
| | | }
|
| | | }
|
| | |
|
| | | public readonly Redpoint redpoint = new Redpoint(117, 11702);
|
| | |
|
| | | int m_SelectSkill;
|
| | | public int selectSkill
|
| | | {
|
| | | get { return m_SelectSkill; }
|
| | | set
|
| | | {
|
| | | if (m_SelectSkill != value)
|
| | | {
|
| | | m_SelectSkill = value;
|
| | | if (selectSkillRefresh != null)
|
| | | {
|
| | | selectSkillRefresh(value);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public event Action<int> skillRefresh;
|
| | | public event Action<int> selectSkillRefresh;
|
| | |
|
| | | PlayerPackModel packModel { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | ParseConfig();
|
| | | packModel.RefreshItemCountAct += RefreshItemCountAct;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | alreadyUnlockSkills.Clear();
|
| | | serverInited = false;
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | serverInited = true;
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | packModel.RefreshItemCountAct -= RefreshItemCountAct;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
|
| | | }
|
| | |
|
| | | void ParseConfig()
|
| | | {
|
| | | {
|
| | | var config = Config.Instance.Get<FuncConfigConfig>("EquipZhuXian");
|
| | | var json = LitJson.JsonMapper.ToObject(config.Numerical3);
|
| | | foreach (var skillIdKey in json.Keys)
|
| | | {
|
| | | var skillTypeId = int.Parse(skillIdKey);
|
| | | var skillConfig = Config.Instance.Get<SkillConfig>(skillTypeId);
|
| | | if (skillConfig == null)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | List<int> list;
|
| | | if (!jadeDynastySkills.TryGetValue(skillConfig.UseType, out list))
|
| | | {
|
| | | list = new List<int>();
|
| | | jadeDynastySkills.Add(skillConfig.UseType, list);
|
| | | }
|
| | | list.Add(skillTypeId);
|
| | | var levelKey = json[skillIdKey].Keys.First();
|
| | | var level = int.Parse(levelKey);
|
| | | skillConditions.Add(skillTypeId, new JadeDynastySkillCondition()
|
| | | {
|
| | | level = level,
|
| | | equipPlaces = new List<int>(LitJson.JsonMapper.ToObject<int[]>(json[skillIdKey][levelKey].ToJson())),
|
| | | });
|
| | | }
|
| | | }
|
| | |
|
| | | foreach (var skills in jadeDynastySkills.Values)
|
| | | {
|
| | | skills.Sort(Compare);
|
| | | }
|
| | | }
|
| | |
|
| | | public bool IsSatisfyEquipLevel(int equipPlace, int level)
|
| | | {
|
| | | var itemModel = packModel.GetItemModelByIndex(PackType.rptJadeDynastyEquip, equipPlace);
|
| | | if (itemModel != null)
|
| | | {
|
| | | return itemModel.chinItemModel.LV >= level;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public JadeDynastySkillState GetSkillState(int skillId)
|
| | | {
|
| | | if (alreadyUnlockSkills.Contains(skillId))
|
| | | {
|
| | | return JadeDynastySkillState.Unlocked;
|
| | | }
|
| | | JadeDynastySkillCondition condition;
|
| | | if (TryGetSkillCondition(skillId, out condition))
|
| | | {
|
| | | foreach (var equipPlace in condition.equipPlaces)
|
| | | {
|
| | | if (!IsSatisfyEquipLevel(equipPlace, condition.level))
|
| | | {
|
| | | return JadeDynastySkillState.Lock;
|
| | | }
|
| | | }
|
| | | }
|
| | | return JadeDynastySkillState.Unlockable;
|
| | | }
|
| | |
|
| | | public bool TryGetSkillCondition(int skillId, out JadeDynastySkillCondition condition)
|
| | | {
|
| | | return skillConditions.TryGetValue(skillId, out condition);
|
| | | }
|
| | |
|
| | | public bool TryGetSkillFrames(int skillId, out Sprite[] _sprites)
|
| | | {
|
| | | if (!skillFrames.ContainsKey(skillId))
|
| | | {
|
| | | var config = Config.Instance.Get<SkillFrameAnimationConfig>(skillId);
|
| | | if (config != null)
|
| | | {
|
| | | Sprite[] sprites = new Sprite[config.spriteKeys.Length];
|
| | | for (int i = 0; i < config.spriteKeys.Length; i++)
|
| | | {
|
| | | var sprite = UILoader.LoadSprite(config.spriteKeys[i]);
|
| | | sprites[i] = sprite;
|
| | | }
|
| | | skillFrames.Add(skillId, sprites);
|
| | | }
|
| | | }
|
| | | return skillFrames.TryGetValue(skillId, out _sprites);
|
| | | }
|
| | |
|
| | | public void OnReceivePackage(H0310_tagRoleSkillChange package)
|
| | | {
|
| | | var skillConfig = Config.Instance.Get<SkillConfig>(package.NewSkillID);
|
| | | if (skillConfig != null &&
|
| | | mySkills.Contains(skillConfig.SkillTypeID))
|
| | | {
|
| | | if (!alreadyUnlockSkills.Contains(skillConfig.SkillTypeID))
|
| | | {
|
| | | alreadyUnlockSkills.Add(skillConfig.SkillTypeID);
|
| | | if (skillRefresh != null)
|
| | | {
|
| | | skillRefresh(skillConfig.SkillTypeID);
|
| | | }
|
| | |
|
| | | if (serverInited)
|
| | | {
|
| | | if (!NewBieCenter.Instance.inGuiding
|
| | | && !WindowCenter.Instance.IsOpen<RealmPropertyUpWin>())
|
| | | {
|
| | | ActivateShow.JadeDynastySkillUnlock(skillConfig.SkillTypeID);
|
| | | }
|
| | | }
|
| | | }
|
| | | UpdateRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | private int Compare(int lhs, int rhs)
|
| | | {
|
| | | if (skillConditions.ContainsKey(lhs)
|
| | | && skillConditions.ContainsKey(rhs))
|
| | | {
|
| | | return skillConditions[lhs].level.CompareTo(skillConditions[rhs].level);
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | private void RefreshItemCountAct(PackType packType, int arg2, int arg3)
|
| | | {
|
| | | if (packType == PackType.rptJadeDynastyEquip)
|
| | | {
|
| | | UpdateRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnFuncStateChangeEvent(int id)
|
| | | {
|
| | | if (id == 167)
|
| | | {
|
| | | UpdateRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | void UpdateRedpoint()
|
| | | {
|
| | | var unlockable = false;
|
| | | if (FuncOpen.Instance.IsFuncOpen(167))
|
| | | {
|
| | | foreach (var skill in mySkills)
|
| | | {
|
| | | var state = GetSkillState(skill);
|
| | | if (state == JadeDynastySkillState.Unlockable)
|
| | | {
|
| | | unlockable = true;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | redpoint.state = unlockable ? RedPointState.Simple : RedPointState.None;
|
| | | }
|
| | | }
|
| | |
|
| | | public struct JadeDynastySkillCondition
|
| | | {
|
| | | public int level;
|
| | | public List<int> equipPlaces;
|
| | | }
|
| | |
|
| | | public enum JadeDynastySkillState
|
| | | {
|
| | | Lock,
|
| | | Unlockable,
|
| | | Unlocked,
|
| | | }
|
| | | } |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 54964ff87641376429f6b467cf990d8e |
| | | timeCreated: 1548127288 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Tuesday, January 22, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI {
|
| | |
|
| | | public class JadeDynastySkillWin : Window
|
| | | {
|
| | | [SerializeField] Text m_SkillDescription;
|
| | | [SerializeField] Text m_SkillFightPower;
|
| | | [SerializeField] Image m_SkillDescriptionIcon;
|
| | | [SerializeField] FrameEffect m_SkillFrame;
|
| | |
|
| | | [SerializeField] ScrollerController m_ScrollerControl;
|
| | |
|
| | | JadeDynastySkillModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<JadeDynastySkillModel>(); }
|
| | | }
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_ScrollerControl.OnRefreshCell += OnRefreshCell;
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | SetDefaultSelect();
|
| | | Display();
|
| | |
|
| | | model.selectSkillRefresh += SelectSkillRefresh;
|
| | | model.skillRefresh += SkillRefresh;
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | model.selectSkillRefresh -= SelectSkillRefresh;
|
| | | model.skillRefresh -= SkillRefresh;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | |
|
| | | void SetDefaultSelect()
|
| | | {
|
| | | foreach (var skill in model.mySkills)
|
| | | {
|
| | | if (model.GetSkillState(skill) == JadeDynastySkillState.Unlockable)
|
| | | {
|
| | | model.selectSkill = skill;
|
| | | return;
|
| | | }
|
| | | }
|
| | | model.selectSkill = model.mySkills[0];
|
| | | }
|
| | |
|
| | | void Display()
|
| | | {
|
| | | DisplaySkills();
|
| | | DisplaySkillDetail();
|
| | | }
|
| | |
|
| | | void DisplaySkills()
|
| | | {
|
| | | m_ScrollerControl.Refresh();
|
| | | foreach (var skill in model.mySkills)
|
| | | {
|
| | | m_ScrollerControl.AddCell(ScrollerDataType.Header, skill,OnSelectSkill);
|
| | | }
|
| | | m_ScrollerControl.Restart();
|
| | |
|
| | | var index = model.mySkills.IndexOf(model.selectSkill);
|
| | | if (index != -1)
|
| | | {
|
| | | m_ScrollerControl.JumpIndex(index);
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplaySkillDetail()
|
| | | {
|
| | | var skillConfig = Config.Instance.Get<SkillConfig>(model.selectSkill);
|
| | | if (skillConfig != null)
|
| | | {
|
| | | m_SkillDescription.text = skillConfig.Description;
|
| | | m_SkillFightPower.text = StringUtility.Contact("+", skillConfig.FightPower);
|
| | |
|
| | | Sprite[] sprites;
|
| | | if (model.TryGetSkillFrames(model.selectSkill, out sprites))
|
| | | {
|
| | | var config = Config.Instance.Get<SkillFrameAnimationConfig>(model.selectSkill);
|
| | | m_SkillFrame.SetSprites(sprites, (float)config.totalTime / 1000);
|
| | | m_SkillDescriptionIcon.SetSprite(config.descriptionIcon);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void SelectSkillRefresh(int skillId)
|
| | | {
|
| | | DisplaySkillDetail();
|
| | | m_ScrollerControl.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | |
|
| | | private void OnSelectSkill(CellView cell)
|
| | | {
|
| | | model.selectSkill = cell.index;
|
| | | }
|
| | |
|
| | | private void SkillRefresh(int id)
|
| | | {
|
| | | m_ScrollerControl.RefreshSingleCellView(id);
|
| | | }
|
| | |
|
| | | private void OnRefreshCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | var skillCell = cell as JadeDynastySkillCell;
|
| | | skillCell.Display(cell.index);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 6ed84d1a53f9ac844be81ad82535b43e |
| | | timeCreated: 1548139898 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 8f2922f78b99e304fb72e1cabe552f93 |
| | | folderAsset: yes |
| | | timeCreated: 1547780194 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, January 21, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine.UI; |
| | | using System; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class JadeDynastyTowerBehaviour : MonoBehaviour |
| | | { |
| | | [SerializeField] ScrollRect m_Tower; |
| | | |
| | | RectTransform m_RectTransform; |
| | | RectTransform rectTransform { get { return m_RectTransform ?? (this.transform as RectTransform); } } |
| | | |
| | | float topHeight = 0f; |
| | | float floorHeight = 0f; |
| | | float bottomHeight = 0f; |
| | | |
| | | GameObject towerTop = null; |
| | | GameObject towerBottom = null; |
| | | JadeDynastyTowerFloorBehaviour towerTopBehaviour; |
| | | |
| | | bool hasCreateTowerResources = false; |
| | | List<JadeDynastyTowerFloorBehaviour> floorBehaviours = new List<JadeDynastyTowerFloorBehaviour>(); |
| | | JadeDynastyTowerModel model { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } } |
| | | |
| | | public void Display() |
| | | { |
| | | var scrollRectTransform = m_Tower.transform as RectTransform; |
| | | scrollRectTransform.localScale = Vector3.one; |
| | | scrollRectTransform.anchoredPosition = Vector2.zero; |
| | | DisplayTowerBaseInfo(); |
| | | MoveToTargetFloor(model.currentFloor); |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | m_Tower.scrollSensitivity = 1f; |
| | | } |
| | | |
| | | void MoveToTargetFloor(int floor) |
| | | { |
| | | var floors = model.GetShowFloors(); |
| | | var floorConfig = Config.Instance.Get<JadeDynastyTowerConfig>(floor); |
| | | |
| | | var floorIndex = floors.IndexOf(floor); |
| | | if (floorIndex < 2) |
| | | { |
| | | m_Tower.verticalNormalizedPosition = 0f; |
| | | } |
| | | else if (floorIndex >= floors.Count - 2) |
| | | { |
| | | var hasTop = model.IsTopFloor(floors[floors.Count - 1]); |
| | | if (hasTop) |
| | | { |
| | | if (floorIndex >= floors.Count - 1) |
| | | { |
| | | m_Tower.verticalNormalizedPosition = 1f; |
| | | } |
| | | else |
| | | { |
| | | m_Tower.verticalNormalizedPosition = 0.5f; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | m_Tower.verticalNormalizedPosition = 1f; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | m_Tower.verticalNormalizedPosition = 0.5f; |
| | | } |
| | | } |
| | | |
| | | private void DisplayTowerBaseInfo() |
| | | { |
| | | CreateTowerResources(); |
| | | |
| | | var floors = model.GetShowFloors(); |
| | | |
| | | var hasTop = model.IsTopFloor(floors[floors.Count - 1]); |
| | | var normalCount = hasTop ? floors.Count - 1 : floors.Count; |
| | | if (hasTop) |
| | | { |
| | | towerTopBehaviour.gameObject.SetActive(true); |
| | | towerTopBehaviour.Display(floors[floors.Count - 1]); |
| | | } |
| | | else |
| | | { |
| | | towerTopBehaviour.gameObject.SetActive(false); |
| | | } |
| | | |
| | | for (var i = 0; i < floorBehaviours.Count; i++) |
| | | { |
| | | var behaviour = floorBehaviours[i]; |
| | | if (i < normalCount) |
| | | { |
| | | behaviour.gameObject.SetActive(true); |
| | | behaviour.Display(floors[floors.Count - (i + (hasTop ? 2 : 1))]); |
| | | } |
| | | else |
| | | { |
| | | behaviour.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | var hasBottom = model.IsBottomFloor(floors[0]); |
| | | towerBottom.gameObject.SetActive(hasBottom); |
| | | } |
| | | |
| | | private void CreateTowerResources() |
| | | { |
| | | if (hasCreateTowerResources) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | towerTop = UIUtility.CreateWidget("JadeDynastyTower_Top", "Top"); |
| | | towerTop.transform.SetParentEx(m_Tower.content, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | towerTop.transform.SetAsFirstSibling(); |
| | | topHeight = ((RectTransform)towerTop.transform).rect.height; |
| | | towerTopBehaviour = towerTop.AddMissingComponent<JadeDynastyTowerFloorBehaviour>(); |
| | | |
| | | var floorPrefab = UILoader.LoadPrefab("JadeDynastyTower_Floor"); |
| | | floorHeight = ((RectTransform)floorPrefab.transform).rect.height; |
| | | |
| | | for (int i = 0; i < 5; i++) |
| | | { |
| | | var instance = Instantiate<GameObject>(floorPrefab); |
| | | var floorBehaviour = instance.AddMissingComponent<JadeDynastyTowerFloorBehaviour>(); |
| | | instance.transform.SetParentEx(m_Tower.content, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | floorBehaviours.Add(floorBehaviour); |
| | | } |
| | | |
| | | towerBottom = UIUtility.CreateWidget("JadeDynastyTower_Bottom", "Bottom"); |
| | | towerBottom.transform.SetParentEx(m_Tower.content, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | towerBottom.transform.SetAsLastSibling(); |
| | | bottomHeight = ((RectTransform)towerBottom.transform).rect.height; |
| | | |
| | | hasCreateTowerResources = true; |
| | | } |
| | | |
| | | private void OnDisable() |
| | | { |
| | | StopAllCoroutines(); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: c138ff352bc67574abd362aee0fc583d |
| | | timeCreated: 1548050025 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, January 21, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class JadeDynastyTowerFloorBehaviour : MonoBehaviour |
| | | { |
| | | [SerializeField] Image m_Floor; |
| | | [SerializeField] Button m_Selected; |
| | | [SerializeField] TextEx m_FloorName; |
| | | [SerializeField] Image m_Challenge; |
| | | [SerializeField] Image m_Cover; |
| | | [SerializeField] RectTransform m_ContainerSelected; |
| | | [SerializeField] UIEffect m_GateEffect; |
| | | |
| | | RectTransform m_RectTransform; |
| | | RectTransform rectTransform { get { return m_RectTransform ?? (this.transform as RectTransform); } } |
| | | |
| | | JadeDynastyTowerModel model { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } } |
| | | |
| | | int floorId = 0; |
| | | public void Display(int _floorId) |
| | | { |
| | | this.floorId = _floorId; |
| | | |
| | | var isOpened = this.model.currentFloor >= this.floorId; |
| | | var config = Config.Instance.Get<JadeDynastyTowerConfig>(floorId); |
| | | m_FloorName.text = config.floorName; |
| | | m_Cover.gameObject.SetActive(this.model.currentFloor > this.floorId); |
| | | |
| | | if (this.model.currentFloor == this.floorId) |
| | | { |
| | | m_GateEffect.Play(); |
| | | m_Challenge.gameObject.SetActive(true); |
| | | m_ContainerSelected.gameObject.SetActive(true); |
| | | m_FloorName.color = UIHelper.GetUIColor(TextColType.NavyYellow); |
| | | } |
| | | else |
| | | { |
| | | m_GateEffect.Stop(); |
| | | m_Challenge.gameObject.SetActive(false); |
| | | m_ContainerSelected.gameObject.SetActive(false); |
| | | m_FloorName.color = UIHelper.s_LightYellow; |
| | | } |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1e7ee76654016d1448b8fd5f9f680822 |
| | | timeCreated: 1548051421 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, January 21, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class JadeDynastyTowerHintWin : Window |
| | | { |
| | | [SerializeField] Text m_Floor; |
| | | [SerializeField] ItemBehaviour m_Reward; |
| | | [SerializeField] RectTransform m_UnLockEquipPlace; |
| | | [SerializeField] Text m_Description; |
| | | |
| | | JadeDynastyTowerModel model { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } } |
| | | |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | Display(); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | } |
| | | #endregion |
| | | |
| | | private void Display() |
| | | { |
| | | var config = Config.Instance.Get<JadeDynastyTowerConfig>(model.currentFloor); |
| | | m_Floor.text = config.floorName; |
| | | var isLastFloor = model.IsTopFloor(model.currentFloor); |
| | | |
| | | if (isLastFloor && model.currentFloor == model.highestPassFloor) |
| | | { |
| | | m_Reward.gameObject.SetActive(true); |
| | | m_UnLockEquipPlace.gameObject.SetActive(false); |
| | | |
| | | m_Reward.SetItem(config.rewardIdsLevelS[0], config.rewardCountsLevelS[0]); |
| | | } |
| | | else |
| | | { |
| | | var isSpecialFloor = config.unLockEquipPlace > 0; |
| | | if (isSpecialFloor) |
| | | { |
| | | m_UnLockEquipPlace.gameObject.SetActive(true); |
| | | m_Reward.gameObject.SetActive(false); |
| | | } |
| | | else |
| | | { |
| | | m_UnLockEquipPlace.gameObject.SetActive(false); |
| | | m_Reward.gameObject.SetActive(true); |
| | | m_Reward.SetItem(config.rewardIdsLevelS[0], config.rewardCountsLevelS[0]); |
| | | } |
| | | } |
| | | |
| | | m_Description.text = config.specialRewardDescription; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: b81f1f23b9a4ed14aadd6d8281558a6b |
| | | timeCreated: 1548076363 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | public class JadeDynastyTowerModel : Model, IPlayerLoginOk, IMapInitOk, IBeforePlayerDataInitialize |
| | | { |
| | | public const int DATA_MAPID = 31370; |
| | | const int REDPOINTID = 1; |
| | | const int FUNCTIONID = 164; |
| | | |
| | | public int highestPassFloor { get; private set; } |
| | | public int currentFloor { |
| | | get { |
| | | if (IsTopFloor(highestPassFloor)) |
| | | { |
| | | return highestPassFloor; |
| | | } |
| | | else |
| | | { |
| | | return highestPassFloor + 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public int specialUnLockFloor { |
| | | get { return LocalSave.GetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "_JadeDynastyTowerUnLockFloor")); } |
| | | set { LocalSave.SetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "_JadeDynastyTowerUnLockFloor"), value); } |
| | | } |
| | | |
| | | public bool openJadeDynastyTower { get; set; } |
| | | |
| | | bool serverInited = false; |
| | | Redpoint redpoint = new Redpoint(REDPOINTID); |
| | | List<int> sortedFloors = new List<int>(); |
| | | |
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } } |
| | | |
| | | public override void Init() |
| | | { |
| | | ParseConfig(); |
| | | } |
| | | |
| | | public override void UnInit() |
| | | { |
| | | } |
| | | |
| | | public void RequestChallenge() |
| | | { |
| | | var error = GetErrorOfChallenge(); |
| | | if (error == 0) |
| | | { |
| | | dungeonModel.RequestChallangeDungeon(DATA_MAPID, 0); |
| | | } |
| | | else |
| | | { |
| | | switch (error) |
| | | { |
| | | case 1: |
| | | break; |
| | | case 2: |
| | | break; |
| | | case 3: |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public bool IsChallengable() |
| | | { |
| | | return GetErrorOfChallenge() == 0; |
| | | } |
| | | |
| | | private int GetErrorOfChallenge() |
| | | { |
| | | if (!FuncOpen.Instance.IsFuncOpen(FUNCTIONID)) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | var coolDown = dungeonModel.GetEnterCoolDown(JadeDynastyTowerModel.DATA_MAPID); |
| | | if (coolDown != null && coolDown.suplursSeconds > 0) |
| | | { |
| | | return 2; |
| | | } |
| | | |
| | | var enterTimes = dungeonModel.GetEnterTimes(DATA_MAPID); |
| | | var totalTimes = dungeonModel.GetTotalTimes(DATA_MAPID); |
| | | if (enterTimes >= totalTimes) |
| | | { |
| | | return 3; |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | public void RequestAward() |
| | | { |
| | | var sendInfo = new CA508_tagCMDoFBAction(); |
| | | sendInfo.ActionType = 1; |
| | | sendInfo.ActionInfo = (uint)currentFloor; |
| | | GameNetSystem.Instance.SendInfo(sendInfo); |
| | | } |
| | | |
| | | public void RequestRefreshMonster() |
| | | { |
| | | var sendInfo = new CA508_tagCMDoFBAction(); |
| | | sendInfo.ActionType = 0; |
| | | sendInfo.ActionInfo = (uint)currentFloor; |
| | | GameNetSystem.Instance.SendInfo(sendInfo); |
| | | } |
| | | |
| | | public void SetOpenJadeDynastyTowerWinDirty() |
| | | { |
| | | openJadeDynastyTower = true; |
| | | } |
| | | |
| | | public List<int> GetShowFloors() |
| | | { |
| | | var currentIndex = sortedFloors.IndexOf(currentFloor); |
| | | var floors = new List<int>(); |
| | | |
| | | if (currentIndex < 2) |
| | | { |
| | | for (var i = 0; i <= 4; i++) |
| | | { |
| | | floors.Add(sortedFloors[i]); |
| | | } |
| | | } |
| | | else if (currentIndex >= sortedFloors.Count - 2) |
| | | { |
| | | for (var i = sortedFloors.Count - 3; i <= sortedFloors.Count - 1; i++) |
| | | { |
| | | floors.Add(sortedFloors[i]); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | for (var i = currentIndex - 2; i <= currentIndex + 2; i++) |
| | | { |
| | | floors.Add(sortedFloors[i]); |
| | | } |
| | | } |
| | | |
| | | return floors; |
| | | } |
| | | |
| | | public bool IsTopFloor(int floor) |
| | | { |
| | | return floor == sortedFloors[sortedFloors.Count - 1]; |
| | | } |
| | | |
| | | public bool IsBottomFloor(int floor) |
| | | { |
| | | return floor == sortedFloors[0]; |
| | | } |
| | | |
| | | public void UpdateHighestPassFloor(HB213_tagMCZhuXianTowerInfo info) |
| | | { |
| | | var oldRecorder = highestPassFloor; |
| | | highestPassFloor = (int)info.Floor; |
| | | if (serverInited && highestPassFloor > oldRecorder) |
| | | { |
| | | var config = Config.Instance.Get<JadeDynastyTowerConfig>(highestPassFloor); |
| | | if (config.unLockEquipPlace > 0) |
| | | { |
| | | specialUnLockFloor = highestPassFloor; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void OnPlayerLoginOk() |
| | | { |
| | | serverInited = true; |
| | | } |
| | | |
| | | public void OnMapInitOk() |
| | | { |
| | | switch (PlayerDatas.Instance.baseData.MapID) |
| | | { |
| | | case DATA_MAPID: |
| | | RequestRefreshMonster(); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void ParseConfig() |
| | | { |
| | | var configs = Config.Instance.GetAllKeys<JadeDynastyTowerConfig>(); |
| | | foreach (var item in configs) |
| | | { |
| | | sortedFloors.Add(int.Parse(item)); |
| | | } |
| | | } |
| | | |
| | | public void OnBeforePlayerDataInitialize() |
| | | { |
| | | serverInited = false; |
| | | } |
| | | } |
| | | } |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 16f4d5f3b87a83c428ab29e4ce24d4c1 |
| | | timeCreated: 1547780261 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, January 21, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class JadeDynastyTowerRankBehaviour : MonoBehaviour |
| | | { |
| | | [SerializeField] RankCell[] m_RankCells; |
| | | [SerializeField] Text m_MyRank; |
| | | [SerializeField] Button m_ViewRank; |
| | | |
| | | public void Display(RankInfo[] rankInfos, int myRank) |
| | | { |
| | | for (var i = 0; i < m_RankCells.Length; i++) |
| | | { |
| | | var cell = m_RankCells[i]; |
| | | if (i < rankInfos.Length) |
| | | { |
| | | var rankInfo = rankInfos[i]; |
| | | cell.container.SetActive(true); |
| | | cell.name.text = string.IsNullOrEmpty(rankInfo.name) ? Language.Get("L1046") : rankInfo.name; |
| | | cell.floor.text = rankInfo.floor == 0 ? "" : Language.Get("JadeDynastyLayer", rankInfo.floor); |
| | | cell.time.text = rankInfo.time == 0 ? "" : Language.Get("JadeDynastyTime", 10000 - rankInfo.time); |
| | | } |
| | | else |
| | | { |
| | | m_RankCells[i].container.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | if (myRank == -1) |
| | | { |
| | | m_MyRank.text = Language.Get("L1045"); |
| | | } |
| | | else |
| | | { |
| | | m_MyRank.text = Language.Get("L1092", myRank); |
| | | } |
| | | } |
| | | |
| | | private void Start() |
| | | { |
| | | m_ViewRank.SetListener(ViewRank); |
| | | } |
| | | |
| | | private void ViewRank() |
| | | { |
| | | |
| | | } |
| | | |
| | | public struct RankInfo |
| | | { |
| | | public string name; |
| | | public int floor; |
| | | public int time; |
| | | } |
| | | |
| | | [System.Serializable] |
| | | public struct RankCell |
| | | { |
| | | public GameObject container; |
| | | public Text name; |
| | | public Text floor; |
| | | public Text time; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: f17f9c2e8f2d51b4696795c4088005e0 |
| | | timeCreated: 1548056029 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, January 21, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class JadeDynastyTowerRewardBehaviour : MonoBehaviour |
| | | { |
| | | [SerializeField] ItemBehaviour[] m_RewardsLevelS; |
| | | [SerializeField] ItemBehaviour[] m_RewardsLevelA; |
| | | [SerializeField] ItemBehaviour[] m_RewardsLevelB; |
| | | |
| | | [SerializeField] RectTransform m_ExtraRewardContainer; |
| | | [SerializeField] Text m_ExtraRewardFloor; |
| | | [SerializeField] Text m_ExtraRewardDescription; |
| | | |
| | | public void Display(int floor) |
| | | { |
| | | var config = Config.Instance.Get<JadeDynastyTowerConfig>(floor); |
| | | |
| | | for (var i = 0; i < m_RewardsLevelS.Length; i++) |
| | | { |
| | | var behaviour = m_RewardsLevelS[i]; |
| | | if (i < config.rewardIdsLevelS.Length) |
| | | { |
| | | var id = config.rewardIdsLevelS[i]; |
| | | var count = config.rewardCountsLevelS[i]; |
| | | behaviour.gameObject.SetActive(true); |
| | | behaviour.SetItem(id, count); |
| | | } |
| | | else |
| | | { |
| | | behaviour.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | for (var i = 0; i < m_RewardsLevelA.Length; i++) |
| | | { |
| | | var behaviour = m_RewardsLevelA[i]; |
| | | if (i < config.rewardIdsLevelA.Length) |
| | | { |
| | | var id = config.rewardIdsLevelA[i]; |
| | | var count = config.rewardIdsLevelS[i]; |
| | | behaviour.gameObject.SetActive(true); |
| | | behaviour.SetItem(id, count); |
| | | } |
| | | else |
| | | { |
| | | behaviour.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | for (var i = 0; i < m_RewardsLevelB.Length; i++) |
| | | { |
| | | var behaviour = m_RewardsLevelB[i]; |
| | | if (i < config.rewardIdsLevelB.Length) |
| | | { |
| | | var id = config.rewardIdsLevelB[i]; |
| | | var count = config.rewardCountsLevelB[i]; |
| | | behaviour.gameObject.SetActive(true); |
| | | behaviour.SetItem(id, count); |
| | | } |
| | | else |
| | | { |
| | | behaviour.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | if (config.unLockEquipPlace != 0) |
| | | { |
| | | m_ExtraRewardContainer.gameObject.SetActive(true); |
| | | m_ExtraRewardFloor.text = Language.Get("JadeDynastyExtraReward", config.floorIndex); |
| | | m_ExtraRewardDescription.text = config.specialRewardDescription; |
| | | } |
| | | else |
| | | { |
| | | m_ExtraRewardContainer.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e88c84b0168d5e04797b1964fd51f8db |
| | | timeCreated: 1548056741 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, January 21, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | public class JadeDynastyTowerUnLockWin : Window |
| | | { |
| | | [SerializeField] Text m_UnLockDescription; |
| | | [SerializeField] Button m_Close; |
| | | [SerializeField] Text m_CoolDown; |
| | | |
| | | float timer = 0f; |
| | | float autoCloseTime = 0f; |
| | | JadeDynastyTowerModel model { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } } |
| | | |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_Close.AddListener(Ensure); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | var config = Config.Instance.Get<JadeDynastyTowerConfig>(model.specialUnLockFloor); |
| | | m_UnLockDescription.text = config.specialRewardDescription; |
| | | |
| | | autoCloseTime = Time.time + 10; |
| | | m_CoolDown.text = Language.Get("RuneTower9", 10); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | model.specialUnLockFloor = 0; |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | protected override void LateUpdate() |
| | | { |
| | | base.LateUpdate(); |
| | | timer += Time.deltaTime; |
| | | |
| | | if (timer > 1f) |
| | | { |
| | | timer = 0f; |
| | | m_CoolDown.text = Language.Get("RuneTower9", Mathf.RoundToInt(autoCloseTime - Time.time)); |
| | | } |
| | | |
| | | if (Time.time > autoCloseTime) |
| | | { |
| | | Ensure(); |
| | | } |
| | | } |
| | | |
| | | private void Ensure() |
| | | { |
| | | CloseClick(); |
| | | |
| | | WindowCenter.Instance.Close<MainInterfaceWin>(); |
| | | WindowCenter.Instance.Open<TowerWin>(false, 1); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 2eb5042a4c4698048a3548f4dfd13f85 |
| | | timeCreated: 1548060437 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, January 18, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class JadeDynastyTowerWin : Window |
| | | { |
| | | [SerializeField] JadeDynastyTowerBehaviour m_TowerBehaviour; |
| | | [SerializeField] JadeDynastyTowerRankBehaviour m_RankBehaviour; |
| | | [SerializeField] JadeDynastyTowerRewardBehaviour m_RewardBehaviour; |
| | | [SerializeField] TextEx m_FightPower; |
| | | [SerializeField] TextEx m_ChallengeTimes; |
| | | [SerializeField] Button m_Challenge; |
| | | [SerializeField] TextEx m_ChallengeTitle; |
| | | [SerializeField] ImageEx m_ChallengeImage; |
| | | |
| | | JadeDynastyTowerModel model { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } } |
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } } |
| | | |
| | | ChallengeButtonShowState challengeButtonShowState = ChallengeButtonShowState.Normal; |
| | | float timer = 0f; |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_Challenge.SetListener(Challenge); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | ModelCenter.Instance.GetModel<RankModel>().SendBegRank(PlayerRankData.RankType.JadeDynastyTower); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | PlayerDatas.Instance.rank.OnRefreshRank += DisplayRankInfo; |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | PlayerDatas.Instance.rank.OnRefreshRank -= DisplayRankInfo; |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnActived() |
| | | { |
| | | base.OnActived(); |
| | | DisplayBaseInfo(); |
| | | DisplayChallengeTimes(); |
| | | DisplayChallengeButton(); |
| | | DisplayFightPower(); |
| | | DisplayRankInfo(23); |
| | | } |
| | | |
| | | protected override void LateUpdate() |
| | | { |
| | | base.LateUpdate(); |
| | | timer += Time.deltaTime; |
| | | if (timer > 1f) |
| | | { |
| | | timer = 0f; |
| | | DisplayChallengeButton(); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | private void DisplayBaseInfo() |
| | | { |
| | | m_TowerBehaviour.Display(); |
| | | m_RewardBehaviour.Display(model.currentFloor); |
| | | } |
| | | |
| | | private void DisplayChallengeTimes() |
| | | { |
| | | var enterTimes = dungeonModel.GetEnterTimes(JadeDynastyTowerModel.DATA_MAPID); |
| | | var totalTimes = dungeonModel.GetTotalTimes(JadeDynastyTowerModel.DATA_MAPID); |
| | | m_ChallengeTimes.text = StringUtility.Contact(totalTimes - enterTimes, "/", totalTimes); |
| | | m_ChallengeTimes.colorType = enterTimes >= totalTimes ? TextColType.Red : TextColType.DarkGreen; |
| | | } |
| | | |
| | | private void DisplayChallengeButton() |
| | | { |
| | | var suplursSeconds = 0f; |
| | | var coolDown = dungeonModel.GetEnterCoolDown(JadeDynastyTowerModel.DATA_MAPID); |
| | | suplursSeconds = coolDown != null ? coolDown.suplursSeconds : 0f; |
| | | |
| | | if (suplursSeconds > 0) |
| | | { |
| | | m_ChallengeTitle.text = Language.Get("JadeDynastyCD", Mathf.RoundToInt(suplursSeconds)); |
| | | challengeButtonShowState = ChallengeButtonShowState.CoolDown; |
| | | } |
| | | else |
| | | { |
| | | m_ChallengeTitle.text = Language.Get("Multiple_Challenge"); |
| | | challengeButtonShowState = ChallengeButtonShowState.Normal; |
| | | } |
| | | |
| | | m_ChallengeImage.gray = !model.IsChallengable(); |
| | | } |
| | | |
| | | private void DisplayFightPower() |
| | | { |
| | | var config = Config.Instance.Get<JadeDynastyTowerConfig>(model.currentFloor); |
| | | m_FightPower.text = config.fightPower.ToString(); |
| | | var reached = PlayerDatas.Instance.baseData.FightPoint >= config.fightPower; |
| | | m_FightPower.colorType = reached ? TextColType.Green : TextColType.Red; |
| | | } |
| | | |
| | | private void DisplayRankInfo(int type) |
| | | { |
| | | var rankInfos = new JadeDynastyTowerRankBehaviour.RankInfo[3]; |
| | | var rankDatas = PlayerDatas.Instance.rank.GetRankList(23); |
| | | if (rankDatas != null) |
| | | { |
| | | for (var i = 0; i < Mathf.Min(3, rankDatas.Count); i++) |
| | | { |
| | | var data = rankDatas[i]; |
| | | rankInfos[i] = new JadeDynastyTowerRankBehaviour.RankInfo() |
| | | { |
| | | name = data.Name1, |
| | | floor = (int)data.cmpValue, |
| | | time = (int)data.cmpValue2 |
| | | }; |
| | | } |
| | | } |
| | | |
| | | var myRank = PlayerDatas.Instance.rank.GetSelfRank(23); |
| | | m_RankBehaviour.Display(rankInfos, myRank); |
| | | } |
| | | |
| | | private void Challenge() |
| | | { |
| | | model.RequestChallenge(); |
| | | } |
| | | |
| | | enum ChallengeButtonShowState |
| | | { |
| | | Normal, |
| | | CoolDown, |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: bae03e23d1b1dca4b95782067bbf6855 |
| | | timeCreated: 1547780514 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, January 22, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class JadyDynastyTowerVictoryWin : DungeonVictoryWin |
| | | { |
| | | |
| | | [SerializeField] RectTransform m_AwardContainer; |
| | | [SerializeField] Button m_Award; |
| | | [SerializeField] Text m_AwardTimer; |
| | | |
| | | JadeDynastyTowerModel model { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } } |
| | | |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_Award.SetListener(Award); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | m_ContainerPoivt.gameObject.SetActive(false); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | } |
| | | #endregion |
| | | |
| | | protected override void Display() |
| | | { |
| | | base.RequireDungeonExit(); |
| | | m_ContainerPoivt.gameObject.SetActive(true); |
| | | base.DrawPassTime(); |
| | | base.DrawGetExp(); |
| | | base.DrawItemRewards(); |
| | | base.DrawPassGrade(); |
| | | |
| | | DisplayAwardAndExitButton(); |
| | | } |
| | | |
| | | protected override void ExitDungeon() |
| | | { |
| | | base.ExitDungeon(); |
| | | model.SetOpenJadeDynastyTowerWinDirty(); |
| | | } |
| | | |
| | | protected override void DrawExitTimer(int seconds) |
| | | { |
| | | if (m_ExitTimer.gameObject.activeInHierarchy) |
| | | { |
| | | m_AwardTimer.text = Language.Get("CoinTaskWin_Btn_Receive"); |
| | | m_ExitTimer.text = Language.Get("DungeonVictoryWin_Btn_Exit_1", Mathf.Clamp(seconds, 0, int.MaxValue)); |
| | | } |
| | | else |
| | | { |
| | | m_AwardTimer.text = Language.Get("JadeDynastyRewardTime", Mathf.Clamp(seconds, 0, int.MaxValue)); |
| | | m_ExitTimer.text = Language.Get("DemonDungeonExit"); |
| | | } |
| | | } |
| | | |
| | | private void ChallengeNextRuneTower() |
| | | { |
| | | var dungeonStage = StageManager.Instance.CurrentStage as JadeDynastyTowerDungeonStage; |
| | | dungeonStage.PerformChallengeNextLevel(); |
| | | dungeonModel.UpdateCoolDown(DungeonCoolDownType.LeaveMap, 0); |
| | | dungeonModel.UpdateCoolDown(DungeonCoolDownType.TowerTake, 0); |
| | | CloseClick(); |
| | | } |
| | | |
| | | private void DisplayAwardAndExitButton() |
| | | { |
| | | if (dungeonModel.dungeonResult.grade == 5) |
| | | { |
| | | m_Exit.gameObject.SetActive(false); |
| | | } |
| | | else |
| | | { |
| | | m_Exit.gameObject.SetActive(true); |
| | | } |
| | | } |
| | | |
| | | private void Award() |
| | | { |
| | | model.RequestAward(); |
| | | |
| | | if (model.IsTopFloor(model.currentFloor)) |
| | | { |
| | | dungeonModel.ExitCurrentDungeon(); |
| | | } |
| | | else |
| | | { |
| | | ChallengeNextRuneTower(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 89e8fcf205119574cba510641f9efe0f |
| | | timeCreated: 1548121676 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, January 21, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class TowerWin : Window |
| | | { |
| | | [SerializeField] FunctionButtonGroup m_FunctionGroup; |
| | | [SerializeField] FunctionButton m_RuneTower; |
| | | [SerializeField] FunctionButton m_JadeDynastyTower; |
| | | [SerializeField] Button m_Close; |
| | | |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_RuneTower.SetListener(OpenRuneTower); |
| | | m_JadeDynastyTower.SetListener(OpenJadeDynastyTower); |
| | | m_Close.SetListener(CloseClick); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | CloseSubWindows(); |
| | | |
| | | if (!WindowJumpMgr.Instance.IsJumpState) |
| | | { |
| | | WindowCenter.Instance.Open<MainInterfaceWin>(); |
| | | } |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnActived() |
| | | { |
| | | base.OnActived(); |
| | | m_FunctionGroup.TriggerByOrder(functionOrder); |
| | | } |
| | | #endregion |
| | | |
| | | private void OpenRuneTower() |
| | | { |
| | | CloseSubWindows(); |
| | | WindowCenter.Instance.Open<RuneTowerWin>(true); |
| | | functionOrder = m_RuneTower.order; |
| | | } |
| | | |
| | | private void OpenJadeDynastyTower() |
| | | { |
| | | CloseSubWindows(); |
| | | WindowCenter.Instance.Open<JadeDynastyTowerWin>(true); |
| | | functionOrder = m_JadeDynastyTower.order; |
| | | } |
| | | |
| | | private void CloseSubWindows() |
| | | { |
| | | var windows = WindowConfig.Get().FindChildWindows("TowerWin"); |
| | | foreach (var item in windows) |
| | | { |
| | | WindowCenter.Instance.Close(item); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 8cc7d59e2c390fc45b2f054b45bdc4c7 |
| | | timeCreated: 1548042171 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | }
|
| | |
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | | JadeDynastyEquipModel equipModel { get { return ModelCenter.Instance.GetModel<JadeDynastyEquipModel>(); } }
|
| | |
|
| | | ItemAttrData itemAttrData;
|
| | |
|
| | |
| | | jadeDynastySuitObj.SetActive(false);
|
| | | return;
|
| | | }
|
| | |
|
| | | bool isMaxSuitLv = false;
|
| | | int maxSuitLv = 1;
|
| | | int curSuitLv = itemAttrData.packType == PackType.rptJadeDynastyItem ? maxSuitLv : 0;
|
| | | bool isShowNext = !isMaxSuitLv && itemAttrData.packType == PackType.rptJadeDynastyItem;
|
| | | nextJadeDynastySuitAttr.gameObject.SetActive(isShowNext);
|
| | | if(isShowNext)
|
| | | {
|
| | | curJadeDynastySuitAttr.SetDisplay(curSuitLv);
|
| | | nextJadeDynastySuitAttr.SetDisplay(curSuitLv + 1);
|
| | | }
|
| | | else
|
| | | {
|
| | | curJadeDynastySuitAttr.SetDisplay(curSuitLv);
|
| | | }
|
| | | curJadeDynastySuitAttr.SetDisplay(itemAttrData.packType);
|
| | | nextJadeDynastySuitAttr.SetDisplay(itemAttrData.packType, true);
|
| | | }
|
| | |
|
| | | private void SetMidUIHeight(float midHeight)
|
| | |
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | if(config.EquipPlace >= (int)RoleEquipType.JadeDynasty_Cloak
|
| | | && config.EquipPlace <= (int)RoleEquipType.JadeDynasty_Sword4)
|
| | | {
|
| | | var jadeDynastyModel = ModelCenter.Instance.GetModel<JadeDynastyEquipModel>();
|
| | | bool islock = jadeDynastyModel.IsLockEquipPlace(config.EquipPlace);
|
| | | isCanPut = !islock;
|
| | | if(islock)
|
| | | {
|
| | | MessageWin.Inst.ShowFixedTip("请解锁诛仙塔");
|
| | | }
|
| | | }
|
| | |
|
| | | if(isCanPut)
|
| | | {
|
| | | CheckPutOnPlace();
|
| | |
| | | /// </summary>
|
| | | private void CheckPutOnPlace()
|
| | | {
|
| | | if ((RoleEquipType)sendItemConfig.EquipPlace == RoleEquipType.retFairyCan)
|
| | | ItemModel putOnModel1 = null;
|
| | | ItemModel putOnModel2 = null;
|
| | | bool isSameEquip = false;
|
| | | switch ((RoleEquipType)sendItemConfig.EquipPlace)
|
| | | {
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptEquip);
|
| | | case RoleEquipType.retFairyCan:
|
| | | isSameEquip = true;
|
| | | putOnModel1 = playerPack.GetItemModelByIndex(PackType.rptEquip,sendItemConfig.EquipPlace);
|
| | | putOnModel2 = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFairyCan2);
|
| | | break;
|
| | | case RoleEquipType.JadeDynasty_Glove1:
|
| | | isSameEquip = true;
|
| | | putOnModel1 = playerPack.GetItemModelByIndex(PackType.rptJadeDynastyEquip, sendItemConfig.EquipPlace);
|
| | | putOnModel2 = playerPack.GetItemModelByIndex(PackType.rptJadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Glove2);
|
| | | break;
|
| | | case RoleEquipType.JadeDynasty_Ring1:
|
| | | isSameEquip = true;
|
| | | putOnModel1 = playerPack.GetItemModelByIndex(PackType.rptJadeDynastyEquip, sendItemConfig.EquipPlace);
|
| | | putOnModel2 = playerPack.GetItemModelByIndex(PackType.rptJadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Ring2);
|
| | | break;
|
| | | }
|
| | |
|
| | | ItemModel putOnModel1 = singlePack.GetItemModelByIndex(sendItemConfig.EquipPlace);
|
| | | ItemModel putOnModel2 = singlePack.GetItemModelByIndex((int)RoleEquipType.retFairyCan2);
|
| | | if(isSameEquip)
|
| | | {
|
| | | if (putOnModel1 != null || putOnModel2 != null)
|
| | | {
|
| | | WindowCenter.Instance.Open<FairyWearWin>();
|
| | |
| | | public void SendPutOnQuest(int equipPlace, int itemIndex)
|
| | | {
|
| | | EquipAttrShift(equipPlace);
|
| | | switch((RoleEquipType)equipPlace)
|
| | | {
|
| | | case RoleEquipType.JadeDynasty_Cloak:
|
| | | case RoleEquipType.JadeDynasty_FaceMask:
|
| | | case RoleEquipType.JadeDynasty_Glove1:
|
| | | case RoleEquipType.JadeDynasty_Glove2:
|
| | | case RoleEquipType.JadeDynasty_Pendant:
|
| | | case RoleEquipType.JadeDynasty_Ring1:
|
| | | case RoleEquipType.JadeDynasty_Ring2:
|
| | | case RoleEquipType.JadeDynasty_Ruyi:
|
| | | case RoleEquipType.JadeDynasty_Sword1:
|
| | | case RoleEquipType.JadeDynasty_Sword2:
|
| | | case RoleEquipType.JadeDynasty_Sword3:
|
| | | case RoleEquipType.JadeDynasty_Sword4:
|
| | | SendPutOnJadeDynastyEquip(equipPlace,itemIndex);
|
| | | break;
|
| | | default:
|
| | | SendPutOnNormalEquip(equipPlace,itemIndex);
|
| | | break;
|
| | | }
|
| | | SoundPlayer.Instance.PlayUIAudio(24);
|
| | | }
|
| | |
|
| | | private void SendPutOnNormalEquip(int equipPlace, int itemIndex)
|
| | | {
|
| | | C0703_tagCEquipItem putOnEquip = new C0703_tagCEquipItem();
|
| | | putOnEquip.RoleEquipType = (byte)equipPlace;
|
| | | putOnEquip.ItemIndex = (byte)itemIndex;
|
| | | GameNetSystem.Instance.SendInfo(putOnEquip);
|
| | |
|
| | | SoundPlayer.Instance.PlayUIAudio(24);
|
| | | }
|
| | |
|
| | | private void SendPutOnJadeDynastyEquip(int equipPlace, int itemIndex)
|
| | | {
|
| | | CA330_tagCMEquipZhuXianItem equipZhuXianItem = new CA330_tagCMEquipZhuXianItem();
|
| | | equipZhuXianItem.EquipIndex = (byte)(equipPlace - 121);
|
| | | equipZhuXianItem.ItemIndex = (byte)itemIndex;
|
| | | GameNetSystem.Instance.SendInfo(equipZhuXianItem);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 替换装备时属性转移提示
|
| | |
| | | public void SendPutOffQuest(ItemWinBtnType btnType,string guid)
|
| | | {
|
| | | ItemModel putOnModel = playerPack.GetItemModelByGUID(guid);
|
| | | if (putOnModel == null || putOnModel.packType != PackType.rptEquip) return;
|
| | | if (putOnModel == null) return;
|
| | |
|
| | | SinglePackModel rptItemPack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | if (rptItemPack == null) return;
|
| | |
|
| | | if (rptItemPack.GetRemainGridCount() < 1)
|
| | | SinglePackModel singlePack = null;
|
| | | int remainGrid = 0;
|
| | | int equipPlace = putOnModel.itemInfo.ItemPlace;
|
| | | equipPlace = putOnModel.packType == PackType.rptJadeDynastyEquip ? equipPlace + 121 : equipPlace;
|
| | | switch ((RoleEquipType)equipPlace)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GeRen_chenxin_998371");
|
| | | }
|
| | | else
|
| | | {
|
| | | C0704_tagCUnEquipItem putOffEquip = new C0704_tagCUnEquipItem();
|
| | | putOffEquip.EquipIndex = (byte)putOnModel.itemInfo.ItemPlace;
|
| | | putOffEquip.PackIndex = (byte)rptItemPack.GetNullGridIndex();
|
| | | GameNetSystem.Instance.SendInfo(putOffEquip);
|
| | | SoundPlayer.Instance.PlayUIAudio(25);
|
| | | case RoleEquipType.JadeDynasty_Cloak:
|
| | | case RoleEquipType.JadeDynasty_FaceMask:
|
| | | case RoleEquipType.JadeDynasty_Glove1:
|
| | | case RoleEquipType.JadeDynasty_Glove2:
|
| | | case RoleEquipType.JadeDynasty_Pendant:
|
| | | case RoleEquipType.JadeDynasty_Ring1:
|
| | | case RoleEquipType.JadeDynasty_Ring2:
|
| | | case RoleEquipType.JadeDynasty_Ruyi:
|
| | | case RoleEquipType.JadeDynasty_Sword1:
|
| | | case RoleEquipType.JadeDynasty_Sword2:
|
| | | case RoleEquipType.JadeDynasty_Sword3:
|
| | | case RoleEquipType.JadeDynasty_Sword4:
|
| | | remainGrid = playerPack.GetReaminGridCount(PackType.rptJadeDynastyItem);
|
| | | if(remainGrid < 1)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GeRen_chenxin_998371");
|
| | | }
|
| | | else
|
| | | {
|
| | | SendPutOffJadeDynastyEquip(equipPlace);
|
| | | SoundPlayer.Instance.PlayUIAudio(25);
|
| | | }
|
| | | break;
|
| | | default:
|
| | | singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | remainGrid = playerPack.GetReaminGridCount(PackType.rptItem);
|
| | | if (remainGrid < 1)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GeRen_chenxin_998371");
|
| | | }
|
| | | else
|
| | | {
|
| | | if(singlePack != null)
|
| | | {
|
| | | int gridIndex = singlePack.GetNullGridIndex();
|
| | | SendPutOffNormalEquip(equipPlace,gridIndex);
|
| | | SoundPlayer.Instance.PlayUIAudio(25);
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | private void SendPutOffNormalEquip(int equipPlace,int itemIndex)
|
| | | {
|
| | | C0704_tagCUnEquipItem putOffEquip = new C0704_tagCUnEquipItem();
|
| | | putOffEquip.EquipIndex = (byte)equipPlace;
|
| | | putOffEquip.PackIndex = (byte)itemIndex;
|
| | | GameNetSystem.Instance.SendInfo(putOffEquip);
|
| | | }
|
| | |
|
| | | private void SendPutOffJadeDynastyEquip(int equipPlace)
|
| | | {
|
| | | CA331_tagCMUnEquipZhuXianItem unEquipZhuXianItem = new CA331_tagCMUnEquipZhuXianItem();
|
| | | unEquipZhuXianItem.EquipIndex = (byte)(equipPlace - 121);
|
| | | GameNetSystem.Instance.SendInfo(unEquipZhuXianItem);
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region 发送放入仓库请求
|
| | |
| | |
|
| | | public ItemModel GetItemModelByIndex(PackType type, int index)
|
| | | {
|
| | | switch(type)
|
| | | {
|
| | | case PackType.rptJadeDynastyEquip:
|
| | | if(index >= 121)
|
| | | {
|
| | | index = index - 121;
|
| | | }
|
| | | break;
|
| | | }
|
| | |
|
| | | ItemModel itemModel = null;
|
| | | if (playerPackDict.ContainsKey(type))
|
| | | {
|
| | |
| | | |
| | | |
| | | public ItemModel GetItemModelByIndex(int index) |
| | | { |
| | | {
|
| | | switch (packType)
|
| | | {
|
| | | case PackType.rptJadeDynastyEquip:
|
| | | if (index >= 121)
|
| | | {
|
| | | index = index - 121;
|
| | | }
|
| | | break;
|
| | | } |
| | | ItemModel itemModel = null; |
| | | packModelIndexDict.TryGetValue(index, out itemModel); |
| | | return itemModel; |
| | |
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
|
| | | }
|
| | |
|
| | | ItemModel curItemModel;
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptEquip);
|
| | | if (singlePack == null)
|
| | | return;
|
| | |
|
| | | _itemModel01 = singlePack.GetItemModelByIndex((int)RoleEquipType.retFairyCan);
|
| | | _itemModel02 = singlePack.GetItemModelByIndex((int)RoleEquipType.retFairyCan2);
|
| | | curItemModel = PackSendQuestMgr.Instance.sendItemModel;
|
| | | if(curItemModel != null)
|
| | | {
|
| | | switch(curItemModel.packType)
|
| | | {
|
| | | case PackType.rptItem:
|
| | | _itemModel01 = playerPack.GetItemModelByIndex(PackType.rptEquip,(int)RoleEquipType.retFairyCan);
|
| | | _itemModel02 = playerPack.GetItemModelByIndex(PackType.rptEquip,(int)RoleEquipType.retFairyCan2);
|
| | | break;
|
| | | case PackType.rptJadeDynastyItem:
|
| | | if(curItemModel.chinItemModel.EquipPlace == (int)RoleEquipType.JadeDynasty_Glove1)
|
| | | {
|
| | | _itemModel01 = playerPack.GetItemModelByIndex(PackType.rptJadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Glove1);
|
| | | _itemModel02 = playerPack.GetItemModelByIndex(PackType.rptJadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Glove2);
|
| | | }
|
| | | else if(curItemModel.chinItemModel.EquipPlace == (int)RoleEquipType.JadeDynasty_Ring1)
|
| | | {
|
| | | _itemModel01 = playerPack.GetItemModelByIndex(PackType.rptJadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Ring1);
|
| | | _itemModel02 = playerPack.GetItemModelByIndex(PackType.rptJadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Ring2);
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | |
|
| | | public void OnClickWear01Btn()
|
| | | {
|
| | | if (curItemModel == null) return;
|
| | |
|
| | | PackSendQuestMgr.Instance.CheckSuitReplaceInfo((int)RoleEquipType.retFairyCan);
|
| | | int equipType = curItemModel.chinItemModel.EquipPlace;
|
| | | PackSendQuestMgr.Instance.CheckSuitReplaceInfo(equipType);
|
| | | Close();
|
| | | }
|
| | |
|
| | | public void OnClickWear02Btn()
|
| | | {
|
| | | PackSendQuestMgr.Instance.CheckSuitReplaceInfo((int)RoleEquipType.retFairyCan2);
|
| | | if (curItemModel == null) return;
|
| | |
|
| | | switch ((RoleEquipType)curItemModel.chinItemModel.EquipPlace)
|
| | | {
|
| | | case RoleEquipType.retFairyCan:
|
| | | PackSendQuestMgr.Instance.CheckSuitReplaceInfo((int)RoleEquipType.retFairyCan2);
|
| | | break;
|
| | | case RoleEquipType.JadeDynasty_Glove1:
|
| | | PackSendQuestMgr.Instance.CheckSuitReplaceInfo((int)RoleEquipType.JadeDynasty_Glove2);
|
| | | break;
|
| | | case RoleEquipType.JadeDynasty_Ring1:
|
| | | PackSendQuestMgr.Instance.CheckSuitReplaceInfo((int)RoleEquipType.JadeDynasty_Ring2);
|
| | | break;
|
| | | }
|
| | | Close();
|
| | | }
|
| | |
|
| | |
| | | void RuneTaButton()//符印塔
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<RuneTowerWin>();
|
| | | WindowCenter.Instance.Open<TowerWin>(false, 0);
|
| | | }
|
| | | void OpenTreasure()
|
| | | {
|
| | |
| | |
|
| | | [SerializeField] Button m_TreasureSoulBtn;//觉醒按钮
|
| | | [SerializeField] Button m_GodBeastBtn;//神兽按钮
|
| | |
|
| | | [SerializeField] Button m_JadeDynastyBtn;//诛仙装备按钮
|
| | | FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } }
|
| | | public void Init()
|
| | | {
|
| | |
| | | m_BagualuBtn.AddListener(OnClickBagualuBtn);
|
| | | m_TreasureSoulBtn.AddListener(OnClickTreasureSoul);
|
| | | m_GodBeastBtn.AddListener(GodBeastBtn);
|
| | | m_JadeDynastyBtn.AddListener(JadeDynastyButton);
|
| | | }
|
| | |
|
| | | public void UnInit()
|
| | |
| | | _RankingListBtn.onClick.RemoveAllListeners();
|
| | | m_BagualuBtn.RemoveAllListeners();
|
| | | m_GodBeastBtn.RemoveAllListeners();
|
| | | m_JadeDynastyBtn.RemoveAllListeners();
|
| | | }
|
| | |
|
| | | void Role1Button()
|
| | |
| | | WindowCenter.Instance.Open<EquipReinforceWin>();
|
| | | //DesignDebug.Log("强化按钮");
|
| | | }
|
| | |
|
| | | void JadeDynastyButton()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<JadeDynastyKnapSackWin>();
|
| | | //DesignDebug.Log("诛仙装备");
|
| | | }
|
| | |
|
| | |
|
| | | void Asuram1Button()
|
| | |
| | | DungeonAssistModel assistModel { get { return ModelCenter.Instance.GetModel<DungeonAssistModel>(); } }
|
| | | IceCrystalVeinModel m_IceCrystalVeinModel;
|
| | | IceCrystalVeinModel iceCrystalVeinModel { get { return m_IceCrystalVeinModel ?? (m_IceCrystalVeinModel = ModelCenter.Instance.GetModel<IceCrystalVeinModel>()); } }
|
| | | JadeDynastyTowerModel jadeDynastyTowerModel { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } }
|
| | | #region Built-in
|
| | | private bool IsUpdateBool=true;
|
| | | private bool IsUpdateBool = true;
|
| | | protected override void BindController()
|
| | | {
|
| | | m_MapSwitchingBehaviour.InitAwake();
|
| | |
| | | ChatTip.OnChatUpEvent += RefreshAdaptiveChat;
|
| | | GlobalTimeEvent.Instance.secondEvent += secondEvent;
|
| | | IsCrossServerOneVsOne();
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | private void CompletionOfTaskEvent(int obj)
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (jadeDynastyTowerModel.specialUnLockFloor > 0 && !IsDungeon())
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen("NewBieWin") && !WindowCenter.Instance.IsOpen("TreasureNewGotWin"))
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen("JadeDynastyTowerUnLockWin"))
|
| | | {
|
| | | WindowCenter.Instance.Open<JadeDynastyTowerUnLockWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (jadeDynastyTowerModel.specialUnLockFloor > 0 && !IsDungeon())
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen("NewBieWin") && !WindowCenter.Instance.IsOpen("TreasureNewGotWin"))
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen("JadeDynastyTowerUnLockWin"))
|
| | | {
|
| | | WindowCenter.Instance.Open<JadeDynastyTowerUnLockWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (jadeDynastyTowerModel.openJadeDynastyTower && !IsDungeon())
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen("NewBieWin") && !WindowCenter.Instance.IsOpen("TreasureNewGotWin"))
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen("TowerWin"))
|
| | | {
|
| | | WindowCenter.Instance.Open<TowerWin>(false, 1);
|
| | | jadeDynastyTowerModel.openJadeDynastyTower = false;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (iceCrystalVeinModel.IsIceCrystalVeinCopy && !IsDungeon())//是否再次打开冰晶矿脉面板
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen("NewBieWin") && !WindowCenter.Instance.IsOpen("TreasureNewGotWin"))
|
| | |
| | | ArticleExperience();//关于经验条
|
| | | if (_tCDBPlayerRefresh == PlayerDataRefresh.LV)
|
| | | {
|
| | | IsUpdateBool = true; |
| | | IsUpdateBool = true;
|
| | | }
|
| | | if (_tCDBPlayerRefresh == PlayerDataRefresh.ExAttr5)//判断是否再跨服
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | | break;
|
| | | case "jadedynastytower":
|
| | | {
|
| | | var _id = 0;
|
| | | if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
|
| | | {
|
| | | var config = Config.Instance.Get<JadeDynastyTowerConfig>(_id);
|
| | | if (config != null)
|
| | | {
|
| | | return config.floorName;
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | private const int Redpoint_key = 214;//周狂欢红点
|
| | | public Redpoint redPointStre = new Redpoint(2, Redpoint_key);
|
| | | private const int Redpoint_key1 = 21401;//周狂欢红点
|
| | | public Redpoint redPointStre1 = new Redpoint(214, Redpoint_key1);
|
| | | public Redpoint redPointStre1 = new Redpoint(Redpoint_key, Redpoint_key1);
|
| | | private int _SelectedNow = 0;
|
| | | private int ResetType = 0;// 重置类型,0-0点重置;1-5点重置
|
| | | private int AdvanceMinutes = 0;//提前显示分钟
|
| | |
| | |
|
| | | private RedPointState SetRedPointState(int day)//红点状态设置
|
| | | {
|
| | | if (!WeekPartyDayDic.ContainsKey(day) || !WeekPartyDayInfoDic.ContainsKey(day))
|
| | | if (!WeekPartyDayDic.ContainsKey(day) || !WeekPartyDayInfoDic.ContainsKey(day)|| day>DayNow)
|
| | | {
|
| | | return RedPointState.None;
|
| | | }
|
| | |
| | | {
|
| | | TaypeNumber = (carryOutNum - rewardNum) / WeekPartyAction.SingleTimes;
|
| | | }
|
| | | if (TaypeNumber > 0 && rewardNum< number)
|
| | | if (TaypeNumber > 0 && carryOutNum <= WeekPartyAction.TotalTimes)
|
| | | {
|
| | | return RedPointState.GetReward;
|
| | | }
|
| | |
| | | {
|
| | | m_One.SetActive(false);
|
| | | m_Two.SetActive(true);
|
| | | m_OpenServiceItemA1.SetReward(model.SelectedNow, ItemDayList[0], 0, 2);
|
| | | m_OpenServiceItemB1.SetReward(model.SelectedNow, ItemDayList[1], 1, 2);
|
| | | if (ItemDayList[0].NeedPoint > ItemDayList[1].NeedPoint)
|
| | | {
|
| | | m_OpenServiceItemA1.SetReward(model.SelectedNow, ItemDayList[1], 1, 2);
|
| | | m_OpenServiceItemB1.SetReward(model.SelectedNow, ItemDayList[0], 0, 2); |
| | | }
|
| | | else
|
| | | {
|
| | | m_OpenServiceItemA1.SetReward(model.SelectedNow, ItemDayList[0], 0, 2);
|
| | | m_OpenServiceItemB1.SetReward(model.SelectedNow, ItemDayList[1], 1, 2);
|
| | | } |
| | | }
|
| | | else
|
| | | {
|
| | |
| | | //rankWhat.text = data.cmpValue2.ToString();
|
| | | realmLv = (int)data.cmpValue;
|
| | | break;
|
| | | case PlayerRankData.RankType.JadeDynastyTower:
|
| | | jobText.text = data.cmpValue +Language.Get("JadeDynastyBossDungeon_Floor") ;
|
| | | rankWhat.text =(10000-data.cmpValue2) +Language.Get("RealmWin_Bewrite_35") ;
|
| | | break;
|
| | | default:
|
| | | rankWhat.text = data.cmpValue.ToString();
|
| | | realmLv = (int)data.value1;
|
| | |
| | | using System.Collections; |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | namespace Snxxz.UI |
| | | { |
| | | [XLua.LuaCallCSharp] |
| | | public class RankModel : Model |
| | | public class RankModel : Model,IPlayerLoginOk |
| | | { |
| | | private int m_RankType = 0; |
| | | public int rankType { |
| | |
| | | |
| | | public override void Init() |
| | | { |
| | | } |
| | | |
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | SendBegRank(PlayerRankData.RankType.JadeDynastyTower);
|
| | | }
|
| | |
|
| | | public override void UnInit() |
| | | { |
| | | }
|
| | |
|
| | | public void SendBegRank(PlayerRankData.RankType rankType)
|
| | | {
|
| | | C1001_tagCWatchBillboard rankPack = new C1001_tagCWatchBillboard();
|
| | | rankPack.Type = (byte)rankType;
|
| | | GameNetSystem.Instance.SendInfo(rankPack);
|
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | }
|
| | | }
|
| | |
|
| | | public static void JadeDynastySkillUnlock(int skillId)
|
| | | {
|
| | | activateType = ActivateFunc.JadeDynastySkill;
|
| | | skills.Clear();
|
| | | fightPower = 0;
|
| | | skills.Add(skillId);
|
| | | titleIconKey = "UI_JH_6";
|
| | |
|
| | | var config = Config.Instance.Get<SkillConfig>(skillId);
|
| | | if (config != null)
|
| | | {
|
| | | fightPower = config.FightPower;
|
| | | }
|
| | |
|
| | | if (!WindowCenter.Instance.IsOpen<RealmPropertyUpWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmPropertyUpWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | public static void PrepareSkillFly()
|
| | | {
|
| | | if (prepareFlySkillEvent != null)
|
| | |
| | | Stove, //炼丹炉升级
|
| | | TreasureSoul,//法宝魂领取属性
|
| | | GodWeaponEffect,
|
| | | JadeDynastySkill,
|
| | | }
|
| | |
|
| | | public struct PropertyCompare
|
| | |
| | | [SerializeField] SkillBehaviour[] m_Skills;
|
| | | [SerializeField] RectTransform m_ContainerNewGotSkill;
|
| | | [SerializeField] SkillBehaviour m_NewGotSkill;
|
| | | [SerializeField] FrameEffect m_NewGotSkillFrame;
|
| | | [SerializeField] RectTransform m_NewGotSkillPoint;
|
| | | [SerializeField] RectTransform m_ContainerRealm;
|
| | | [SerializeField] RectTransform m_ContainerRealmUp;
|
| | |
| | | m_ContainerRealm.gameObject.SetActive(false);
|
| | | m_ContainerTreasureSoul.gameObject.SetActive(false);
|
| | | m_ContainerGodWeaponEffect.gameObject.SetActive(false);
|
| | | m_NewGotSkillFrame.gameObject.SetActive(false);
|
| | | m_DisplayAlphaTween.SetStartState();
|
| | | flying = false;
|
| | | startFly = false;
|
| | |
| | | DisplayFightPower();
|
| | | DisplayLv();
|
| | | DisplayGodWeaponEffect();
|
| | | DisplayNewGotSkill();
|
| | | break;
|
| | | case ActivateShow.ActivateFunc.JadeDynastySkill:
|
| | | DisplayFightPower();
|
| | | DisplayNewGotSkill();
|
| | | break;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | break;
|
| | | case ActivateShow.ActivateFunc.JadeDynastySkill:
|
| | | m_ContainerNewGotSkill.gameObject.SetActive(ActivateShow.skills.Count > 0);
|
| | | if (ActivateShow.skills.Count == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | m_NewGotSkill.DisplayNewGot(ActivateShow.skills[0]);
|
| | | DisplaySkillFrame(ActivateShow.skills[0]);
|
| | | break;
|
| | | default:
|
| | | {
|
| | | m_ContainerNewGotSkill.gameObject.SetActive(ActivateShow.skills.Count > 0);
|
| | |
| | | m_GodWeaponStage.text = Language.Get("MagicWin_9", config.Name, stage);
|
| | | }
|
| | |
|
| | | void DisplaySkillFrame(int skillId)
|
| | | {
|
| | | m_NewGotSkillFrame.gameObject.SetActive(true);
|
| | | var model = ModelCenter.Instance.GetModel<JadeDynastySkillModel>();
|
| | | Sprite[] sprites;
|
| | | if (model.TryGetSkillFrames(skillId, out sprites))
|
| | | {
|
| | | var config = Config.Instance.Get<SkillFrameAnimationConfig>(skillId);
|
| | | m_NewGotSkillFrame.SetSprites(sprites, (float)config.totalTime / 1000);
|
| | | }
|
| | | }
|
| | |
|
| | | void PrepareFly(int _skillId)
|
| | | {
|
| | | ActivateShow.PrepareSkillFly();
|
| | |
| | | CloseClick();
|
| | |
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<RuneTowerWin>();
|
| | | WindowCenter.Instance.Open<TowerWin>(false, 0);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | [SerializeField] Button m_Sweep;
|
| | | [SerializeField] Text m_SweepButtonDescription;
|
| | | [SerializeField] Text m_SweepTip;
|
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | ShowType showType = ShowType.RewardInfo;
|
| | | int runeSweepActionId = 0;
|
| | |
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_Close.AddListener(CloseClick);
|
| | | m_ViewBoss.AddListener(PopupBossInfo);
|
| | | m_ViewReward.AddListener(PopupRewardInfo);
|
| | | m_ViewPassedInfo.AddListener(PopupTowerPassInfo);
|
| | |
| | | RegisterModel<OpenServiceAchievementModel>();
|
| | | RegisterModel<FashionDressModel>();
|
| | | RegisterModel<JadeDynastyBossModel>();
|
| | | RegisterModel<JadeDynastyDecomposeModel>();
|
| | | RegisterModel<JadeDynastyTowerModel>();
|
| | | RegisterModel<JadeDynastyEquipModel>();
|
| | | inited = true;
|
| | | }
|
| | |
|
| | |
| | | SetJumpLogic<VipExperienceWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.RuneTower:
|
| | | SetJumpLogic<RuneTowerWin>(_tagWinSearchModel.TABID);
|
| | | SetJumpLogic<TowerWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.RuneTowerSpec:
|
| | | RuneTowerWin.guideChallenge = true;
|
| | | SetJumpLogic<RuneTowerWin>(_tagWinSearchModel.TABID);
|
| | | SetJumpLogic<TowerWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.WelfareFunc1:
|
| | | case JumpUIType.WelfareFunc2:
|
| | |
| | | timer += Time.deltaTime; |
| | | tempSumTime -= Time.deltaTime; |
| | | |
| | | if (m_Sprites == null || m_Sprites.Length == 0)
|
| | | {
|
| | | return;
|
| | | } |
| | | |
| | | if(tempSumTime > 0) |
| | | { |
| | | if (timer > interval) |
| | |
| | | } |
| | | } |
| | | |
| | | public void SetSprites(Sprite[] sprites,float _totalTime)
|
| | | {
|
| | | m_Sprites = sprites;
|
| | | onceTime = _totalTime;
|
| | | sumTime = _totalTime;
|
| | | if (m_Sprites != null && m_Sprites.Length > 0) |
| | | { |
| | | interval = onceTime / m_Sprites.Length; |
| | | index = 0; |
| | | timer = 0f; |
| | | tempSumTime = sumTime; |
| | | |
| | | m_Behaviour.overrideSprite = m_Sprites[index]; |
| | | m_Behaviour.SetNativeSize(); |
| | | }
|
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | PetZhanSha = 35, //宠物斩杀
|
| | | EnemyZhanSha = 36, //敌人斩杀
|
| | |
|
| | | PlayerZhuXian = 37, //玩家诛仙
|
| | | PetZhuXian = 38, //宠物诛仙 |
| | | EnemyZhuXian = 39, //敌人诛仙
|
| | |
|
| | | BuffAddDefense = 101,//+防御buff
|
| | | BuffAddAttack = 102,//+攻击buff
|
| | | BuffAddAttackSpeed = 103,//+攻速buff
|
| | |
| | | BuffReduceDodge = 205,//-闪避Buff
|
| | | BuffReduceMaxHp = 206,//-血量上限buff
|
| | | BuffReduceMoveSpeed = 207,//-移动速度buff
|
| | |
|
| | | }
|
| | |
|
| | | public enum AttackObject
|
| | |
| | | GatherSoulDungeon = 30,
|
| | | CrossServerPk = 31,
|
| | | JadeDynastyBoss = 32,
|
| | | JadeDynastyTower=33,
|
| | | }
|
| | |
|
| | | public enum ActivityPrepareType
|
| | |
| | | SuiteBasePer = 87, //套装基础属性
|
| | | PlusBaseAtkPer = 88, //强化攻击
|
| | | NpcHurtAddPer = 89,//对怪物伤害加成
|
| | | JobAHurtAddPer = 90,//对龙魂伤害增加百分比
|
| | | JobBHurtAddPer = 91,//对灵瑶伤害增加百分比
|
| | | JobCHurtAddPer = 92,//对弓箭手伤害增加百分比
|
| | | JobAAtkReducePer = 93,//承受龙魂伤害减少百分比
|
| | | JobBAtkReducePer = 94,//承受灵瑶伤害减少百分比
|
| | | JobCAtkReducePer = 95, //承受弓箭手伤害减少百分比
|
| | | ZXCloakAttrPer = 96, //诛仙·披风属性百分比
|
| | | ZXMaskAttrPer = 97, //诛仙·面罩属性百分比
|
| | | ZXGloveAttrPer = 98,//诛仙·手套属性百分比
|
| | | ZXRuyiAttrPer = 99,//诛仙·如意属性百分比
|
| | | ZXPendantAttrPer = 100, //诛仙·吊坠属性百分比
|
| | | ZXRingAttrPer = 101, //诛仙·戒指属性百分比
|
| | | SkillAddPer1 = 102,//定海神针技能伤害百分比
|
| | | SkillAddPer2 = 103, //皓月枪技能伤害百分比
|
| | | SkillAddPer3 = 104, //鬼牙刃技能伤害百分比
|
| | | SkillAddPer4 = 105, //磐龙印技能伤害百分比
|
| | | SkillAddPer5 = 106, //杏黄旗技能伤害百分比
|
| | | SkillAddPer6 = 107,//嗜天斧技能伤害百分比
|
| | | SkillAddPer7 = 108, //射日神弓技能伤害百分比
|
| | | SkillReducePer1 = 109, //定海神针技能减伤百分比
|
| | | SkillReducePer2 = 110, //皓月枪技能减伤百分比
|
| | | SkillReducePer3 = 111, //鬼牙刃技能减伤百分比
|
| | | SkillReducePer4 = 112, //磐龙印技能减伤百分比
|
| | | SkillReducePer5 = 113, //杏黄旗技能减伤百分比
|
| | | SkillReducePer6 = 114, //嗜天斧技能减伤百分比
|
| | | SkillReducePer7 = 115, //射日神弓技能减伤百分比
|
| | | }
|
| | | //UI图标类型
|
| | | public enum SpriteFileType
|
| | |
| | | return paramConfig.AtkSpeedParameter;
|
| | | case "LuckyHitParameter":
|
| | | return paramConfig.LuckyHitParameter;
|
| | |
|
| | | case "SpeedPerParameter":
|
| | | return paramConfig.SpeedPerParameter;
|
| | | case "AtkPerParameter":
|
| | | return paramConfig.AtkPerParameter;
|
| | | case "MaxHPPerParameter":
|
| | | return paramConfig.MaxHPPerParameter;
|
| | | case "JobAHurtAddPer":
|
| | | return paramConfig.JobAHurtAddPer;
|
| | | case "JobBHurtAddPer":
|
| | | return paramConfig.JobBHurtAddPer;
|
| | | case "JobCHurtAddPer":
|
| | | return paramConfig.JobCHurtAddPer;
|
| | | case "JobAAtkReducePer":
|
| | | return paramConfig.JobAAtkReducePer;
|
| | | case "JobBAtkReducePer":
|
| | | return paramConfig.JobBAtkReducePer;
|
| | | case "JobCAtkReducePer":
|
| | | return paramConfig.JobCAtkReducePer;
|
| | | }
|
| | |
|
| | | return 0;
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | var eventData = new PointerEventData(EventSystem.current);
|
| | | eventData.pressPosition = Input.mousePosition;
|
| | | eventData.position = Input.mousePosition;
|
| | | if (Application.platform == RuntimePlatform.IPhonePlayer)
|
| | | {
|
| | | var eventData = new PointerEventData(EventSystem.current);
|
| | | eventData.pressPosition = Input.mousePosition;
|
| | | eventData.position = Input.mousePosition;
|
| | |
|
| | | var list = new List<RaycastResult>();
|
| | | EventSystem.current.RaycastAll(eventData, list);
|
| | | var list = new List<RaycastResult>();
|
| | | EventSystem.current.RaycastAll(eventData, list);
|
| | |
|
| | | return list.Count > 0;
|
| | | return list.Count > 0;
|
| | | }
|
| | | else
|
| | | {
|
| | | return EventSystem.current.IsPointerOverGameObject();
|
| | | }
|
| | | }
|
| | |
|
| | | struct Quadrangle
|