117 【武将】武将系统 卡牌信息&Manager初始化前移
9个文件已修改
4 文件已重命名
9个文件已删除
14 文件已复制
13个文件已添加
| | |
| | | isLoadFinished = false; |
| | | |
| | | // 加载配置文件 |
| | | int totalConfigs = 41; |
| | | int totalConfigs = 48; |
| | | Type[] configTypes = new Type[] { |
| | | typeof(AppointItemConfig), |
| | | typeof(AudioConfig), |
| | |
| | | typeof(GetItemWaysConfig), |
| | | typeof(GmCmdConfig), |
| | | typeof(GuideConfig), |
| | | typeof(HeroAwakeConfig), |
| | | typeof(HeroBreakConfig), |
| | | typeof(HeroConfig), |
| | | typeof(HeroFetterConfig), |
| | | typeof(HeroQualityAwakeConfig), |
| | | typeof(HeroQualityBreakConfig), |
| | | typeof(HeroQualityConfig), |
| | | typeof(HeroSkinConfig), |
| | | typeof(HeroTalentConfig), |
| | | typeof(IconConfig), |
| | | //typeof(InitialFunctionConfig), |
| | | typeof(ItemConfig), |
| | | typeof(KickOutReasonConfig), |
| | | typeof(LanguageConfig), |
| | |
| | | typeof(PlayerFaceStarConfig), |
| | | typeof(PlayerLVConfig), |
| | | typeof(priorbundleConfig), |
| | | //typeof(PriorLanguageConfig), |
| | | typeof(RichTextMsgReplaceConfig), |
| | | typeof(RuleConfig), |
| | | typeof(SkillConfig), |
| | |
| | | ClearConfigDictionary<GmCmdConfig>(); |
| | | // 清空 GuideConfig 字典 |
| | | ClearConfigDictionary<GuideConfig>(); |
| | | // 清空 HeroAwakeConfig 字典 |
| | | ClearConfigDictionary<HeroAwakeConfig>(); |
| | | // 清空 HeroBreakConfig 字典 |
| | | ClearConfigDictionary<HeroBreakConfig>(); |
| | | // 清空 HeroConfig 字典 |
| | | ClearConfigDictionary<HeroConfig>(); |
| | | // 清空 HeroFetterConfig 字典 |
| | | ClearConfigDictionary<HeroFetterConfig>(); |
| | | // 清空 HeroQualityAwakeConfig 字典 |
| | | ClearConfigDictionary<HeroQualityAwakeConfig>(); |
| | | // 清空 HeroQualityBreakConfig 字典 |
| | | ClearConfigDictionary<HeroQualityBreakConfig>(); |
| | | // 清空 HeroQualityConfig 字典 |
| | | ClearConfigDictionary<HeroQualityConfig>(); |
| | | // 清空 HeroSkinConfig 字典 |
| | | ClearConfigDictionary<HeroSkinConfig>(); |
| | | // 清空 HeroTalentConfig 字典 |
| | | ClearConfigDictionary<HeroTalentConfig>(); |
| | | // 清空 IconConfig 字典 |
| | | ClearConfigDictionary<IconConfig>(); |
| | | // 清空 InitialFunctionConfig 字典 |
| | | ClearConfigDictionary<InitialFunctionConfig>(); |
| | | // 清空 ItemConfig 字典 |
| | | ClearConfigDictionary<ItemConfig>(); |
| | | // 清空 KickOutReasonConfig 字典 |
| | |
| | | ClearConfigDictionary<PlayerLVConfig>(); |
| | | // 清空 priorbundleConfig 字典 |
| | | ClearConfigDictionary<priorbundleConfig>(); |
| | | // 清空 PriorLanguageConfig 字典 |
| | | ClearConfigDictionary<PriorLanguageConfig>(); |
| | | // 清空 RichTextMsgReplaceConfig 字典 |
| | | ClearConfigDictionary<RichTextMsgReplaceConfig>(); |
| | | // 清空 RuleConfig 字典 |
New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年6月13日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class HeroAwakeConfig : ConfigBase<int, HeroAwakeConfig> |
| | | { |
| | | |
| | | public int TalentAwakeID; |
| | | public int HeroID; |
| | | public int AwakeLV; |
| | | public int[] AttrIDList; |
| | | public int[] AttrValueList; |
| | | public int SkillID; |
| | | public int UnlockTalentSlot; |
| | | public int AddStarUpper; |
| | | |
| | | public override int LoadKey(string _key) |
| | | { |
| | | int key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out TalentAwakeID); |
| | | |
| | | int.TryParse(tables[1],out HeroID); |
| | | |
| | | int.TryParse(tables[2],out AwakeLV); |
| | | |
| | | if (tables[3].Contains("[")) |
| | | { |
| | | AttrIDList = JsonMapper.ToObject<int[]>(tables[3]); |
| | | } |
| | | else |
| | | { |
| | | string[] AttrIDListStringArray = tables[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]); |
| | | } |
| | | } |
| | | |
| | | if (tables[4].Contains("[")) |
| | | { |
| | | AttrValueList = JsonMapper.ToObject<int[]>(tables[4]); |
| | | } |
| | | else |
| | | { |
| | | string[] AttrValueListStringArray = tables[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]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[5],out SkillID); |
| | | |
| | | int.TryParse(tables[6],out UnlockTalentSlot); |
| | | |
| | | int.TryParse(tables[7],out AddStarUpper); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
copy from Main/System/Team/TeamCard.cs.meta
copy to Main/Config/Configs/HeroAwakeConfig.cs.meta
File was copied from Main/System/Team/TeamCard.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87558c063506d4345a5d8b2e4496f85c |
| | | guid: bc64cd434972f2148975822e7f4c4333 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年6月13日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class HeroBreakConfig : ConfigBase<int, HeroBreakConfig> |
| | | { |
| | | |
| | | public int BreakID; |
| | | public int HeroID; |
| | | public int BreakLV; |
| | | public int[] AttrIDList; |
| | | public int[] AttrValueList; |
| | | public int SkillID; |
| | | |
| | | public override int LoadKey(string _key) |
| | | { |
| | | int key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out BreakID); |
| | | |
| | | int.TryParse(tables[1],out HeroID); |
| | | |
| | | int.TryParse(tables[2],out BreakLV); |
| | | |
| | | if (tables[3].Contains("[")) |
| | | { |
| | | AttrIDList = JsonMapper.ToObject<int[]>(tables[3]); |
| | | } |
| | | else |
| | | { |
| | | string[] AttrIDListStringArray = tables[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]); |
| | | } |
| | | } |
| | | |
| | | if (tables[4].Contains("[")) |
| | | { |
| | | AttrValueList = JsonMapper.ToObject<int[]>(tables[4]); |
| | | } |
| | | else |
| | | { |
| | | string[] AttrValueListStringArray = tables[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]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[5],out SkillID); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
File was renamed from Main/System/Team/TeamCard.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87558c063506d4345a5d8b2e4496f85c |
| | | guid: 2151f3fe44abab34684659bcd4b5e5c7 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年6月13日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class HeroConfig : ConfigBase<int, HeroConfig> |
| | | { |
| | | |
| | | public int HeroID; |
| | | public int Country; |
| | | public int Quality; |
| | | public int[] SkinNPCIDList; |
| | | public int AtkSkillID; |
| | | public int AngerSkillID; |
| | | public int AtkInheritPer; |
| | | public int DefInheritPer; |
| | | public int HPInheritPer; |
| | | public string BatAttrDict; |
| | | |
| | | public override int LoadKey(string _key) |
| | | { |
| | | int key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out HeroID); |
| | | |
| | | int.TryParse(tables[1],out Country); |
| | | |
| | | int.TryParse(tables[2],out Quality); |
| | | |
| | | if (tables[3].Contains("[")) |
| | | { |
| | | SkinNPCIDList = JsonMapper.ToObject<int[]>(tables[3]); |
| | | } |
| | | else |
| | | { |
| | | string[] SkinNPCIDListStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | SkinNPCIDList = new int[SkinNPCIDListStringArray.Length]; |
| | | for (int i=0;i<SkinNPCIDListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(SkinNPCIDListStringArray[i],out SkinNPCIDList[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[4],out AtkSkillID); |
| | | |
| | | int.TryParse(tables[5],out AngerSkillID); |
| | | |
| | | int.TryParse(tables[6],out AtkInheritPer); |
| | | |
| | | int.TryParse(tables[7],out DefInheritPer); |
| | | |
| | | int.TryParse(tables[8],out HPInheritPer); |
| | | |
| | | BatAttrDict = tables[9]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
copy from Main/System/Team/TeamCard.cs.meta
copy to Main/Config/Configs/HeroConfig.cs.meta
File was copied from Main/System/Team/TeamCard.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87558c063506d4345a5d8b2e4496f85c |
| | | guid: d7f792a1d203864478e6e74c59928218 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年6月13日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class HeroFetterConfig : ConfigBase<int, HeroFetterConfig> |
| | | { |
| | | |
| | | public int FetterID; |
| | | public string FetterName; |
| | | public int[] HeroIDList; |
| | | public int[] AttrIDList; |
| | | public int[] AttrValueList; |
| | | |
| | | public override int LoadKey(string _key) |
| | | { |
| | | int key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out FetterID); |
| | | |
| | | FetterName = tables[1]; |
| | | |
| | | if (tables[2].Contains("[")) |
| | | { |
| | | HeroIDList = JsonMapper.ToObject<int[]>(tables[2]); |
| | | } |
| | | else |
| | | { |
| | | string[] HeroIDListStringArray = tables[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | HeroIDList = new int[HeroIDListStringArray.Length]; |
| | | for (int i=0;i<HeroIDListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(HeroIDListStringArray[i],out HeroIDList[i]); |
| | | } |
| | | } |
| | | |
| | | if (tables[3].Contains("[")) |
| | | { |
| | | AttrIDList = JsonMapper.ToObject<int[]>(tables[3]); |
| | | } |
| | | else |
| | | { |
| | | string[] AttrIDListStringArray = tables[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]); |
| | | } |
| | | } |
| | | |
| | | if (tables[4].Contains("[")) |
| | | { |
| | | AttrValueList = JsonMapper.ToObject<int[]>(tables[4]); |
| | | } |
| | | else |
| | | { |
| | | string[] AttrValueListStringArray = tables[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 exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
copy from Main/System/Team/TeamCard.cs.meta
copy to Main/Config/Configs/HeroFetterConfig.cs.meta
File was copied from Main/System/Team/TeamCard.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87558c063506d4345a5d8b2e4496f85c |
| | | guid: b12955637f261264681bda765be07614 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年6月13日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class HeroQualityAwakeConfig : ConfigBase<int, HeroQualityAwakeConfig> |
| | | { |
| | | |
| | | public int QualityAwakeID; |
| | | public int Quality; |
| | | public int AwakeLV; |
| | | public int[] UPCostItem; |
| | | |
| | | public override int LoadKey(string _key) |
| | | { |
| | | int key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out QualityAwakeID); |
| | | |
| | | int.TryParse(tables[1],out Quality); |
| | | |
| | | int.TryParse(tables[2],out AwakeLV); |
| | | |
| | | if (tables[3].Contains("[")) |
| | | { |
| | | UPCostItem = JsonMapper.ToObject<int[]>(tables[3]); |
| | | } |
| | | else |
| | | { |
| | | string[] UPCostItemStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | UPCostItem = new int[UPCostItemStringArray.Length]; |
| | | for (int i=0;i<UPCostItemStringArray.Length;i++) |
| | | { |
| | | int.TryParse(UPCostItemStringArray[i],out UPCostItem[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
copy from Main/System/Team/TeamCard.cs.meta
copy to Main/Config/Configs/HeroQualityAwakeConfig.cs.meta
File was copied from Main/System/Team/TeamCard.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87558c063506d4345a5d8b2e4496f85c |
| | | guid: f9b036d86edda5d4888a79b7c6d30994 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年6月13日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class HeroQualityBreakConfig : ConfigBase<int, HeroQualityBreakConfig> |
| | | { |
| | | |
| | | public int QualityBreankID; |
| | | public int Quality; |
| | | public int BreakLV; |
| | | public int LVMax; |
| | | public int[] UPCostItem; |
| | | |
| | | public override int LoadKey(string _key) |
| | | { |
| | | int key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out QualityBreankID); |
| | | |
| | | int.TryParse(tables[1],out Quality); |
| | | |
| | | int.TryParse(tables[2],out BreakLV); |
| | | |
| | | int.TryParse(tables[3],out LVMax); |
| | | |
| | | if (tables[4].Contains("[")) |
| | | { |
| | | UPCostItem = JsonMapper.ToObject<int[]>(tables[4]); |
| | | } |
| | | else |
| | | { |
| | | string[] UPCostItemStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | UPCostItem = new int[UPCostItemStringArray.Length]; |
| | | for (int i=0;i<UPCostItemStringArray.Length;i++) |
| | | { |
| | | int.TryParse(UPCostItemStringArray[i],out UPCostItem[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
copy from Main/System/Team/TeamCard.cs.meta
copy to Main/Config/Configs/HeroQualityBreakConfig.cs.meta
File was copied from Main/System/Team/TeamCard.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87558c063506d4345a5d8b2e4496f85c |
| | | guid: 39b234a3a9cfa634baba0b30ed80b493 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年6月13日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class HeroQualityConfig : ConfigBase<int, HeroQualityConfig> |
| | | { |
| | | |
| | | public int Quality; |
| | | public int[] UPCostItem; |
| | | public int InitStarUpper; |
| | | public int InitAddPer; |
| | | public int LVAddPer; |
| | | public int BreakLVAddPer; |
| | | public int StarAddPer; |
| | | public int[] BookActAwardMoney; |
| | | public int BookInitAddPer; |
| | | public int BookStarAddPer; |
| | | public int BookBreakLVAddPer; |
| | | |
| | | public override int LoadKey(string _key) |
| | | { |
| | | int key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out Quality); |
| | | |
| | | if (tables[1].Contains("[")) |
| | | { |
| | | UPCostItem = JsonMapper.ToObject<int[]>(tables[1]); |
| | | } |
| | | else |
| | | { |
| | | string[] UPCostItemStringArray = tables[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | UPCostItem = new int[UPCostItemStringArray.Length]; |
| | | for (int i=0;i<UPCostItemStringArray.Length;i++) |
| | | { |
| | | int.TryParse(UPCostItemStringArray[i],out UPCostItem[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[2],out InitStarUpper); |
| | | |
| | | int.TryParse(tables[3],out InitAddPer); |
| | | |
| | | int.TryParse(tables[4],out LVAddPer); |
| | | |
| | | int.TryParse(tables[5],out BreakLVAddPer); |
| | | |
| | | int.TryParse(tables[6],out StarAddPer); |
| | | |
| | | if (tables[7].Contains("[")) |
| | | { |
| | | BookActAwardMoney = JsonMapper.ToObject<int[]>(tables[7]); |
| | | } |
| | | else |
| | | { |
| | | string[] BookActAwardMoneyStringArray = tables[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | BookActAwardMoney = new int[BookActAwardMoneyStringArray.Length]; |
| | | for (int i=0;i<BookActAwardMoneyStringArray.Length;i++) |
| | | { |
| | | int.TryParse(BookActAwardMoneyStringArray[i],out BookActAwardMoney[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[8],out BookInitAddPer); |
| | | |
| | | int.TryParse(tables[9],out BookStarAddPer); |
| | | |
| | | int.TryParse(tables[10],out BookBreakLVAddPer); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
copy from Main/System/Team/TeamCard.cs.meta
copy to Main/Config/Configs/HeroQualityConfig.cs.meta
File was copied from Main/System/Team/TeamCard.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87558c063506d4345a5d8b2e4496f85c |
| | | guid: 41b0601ec2100e54ba0e78956032bca5 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年6月13日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class HeroSkinConfig : ConfigBase<int, HeroSkinConfig> |
| | | { |
| | | |
| | | public int SkinNPCID; |
| | | public int[] WearAttrIDList; |
| | | public int[] WearAttrValueList; |
| | | public int[] AllBatAttrIDList; |
| | | public int[] AllBatAttrValueList; |
| | | |
| | | public override int LoadKey(string _key) |
| | | { |
| | | int key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out SkinNPCID); |
| | | |
| | | if (tables[1].Contains("[")) |
| | | { |
| | | WearAttrIDList = JsonMapper.ToObject<int[]>(tables[1]); |
| | | } |
| | | else |
| | | { |
| | | string[] WearAttrIDListStringArray = tables[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | WearAttrIDList = new int[WearAttrIDListStringArray.Length]; |
| | | for (int i=0;i<WearAttrIDListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(WearAttrIDListStringArray[i],out WearAttrIDList[i]); |
| | | } |
| | | } |
| | | |
| | | if (tables[2].Contains("[")) |
| | | { |
| | | WearAttrValueList = JsonMapper.ToObject<int[]>(tables[2]); |
| | | } |
| | | else |
| | | { |
| | | string[] WearAttrValueListStringArray = tables[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | WearAttrValueList = new int[WearAttrValueListStringArray.Length]; |
| | | for (int i=0;i<WearAttrValueListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(WearAttrValueListStringArray[i],out WearAttrValueList[i]); |
| | | } |
| | | } |
| | | |
| | | if (tables[3].Contains("[")) |
| | | { |
| | | AllBatAttrIDList = JsonMapper.ToObject<int[]>(tables[3]); |
| | | } |
| | | else |
| | | { |
| | | string[] AllBatAttrIDListStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | AllBatAttrIDList = new int[AllBatAttrIDListStringArray.Length]; |
| | | for (int i=0;i<AllBatAttrIDListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(AllBatAttrIDListStringArray[i],out AllBatAttrIDList[i]); |
| | | } |
| | | } |
| | | |
| | | if (tables[4].Contains("[")) |
| | | { |
| | | AllBatAttrValueList = JsonMapper.ToObject<int[]>(tables[4]); |
| | | } |
| | | else |
| | | { |
| | | string[] AllBatAttrValueListStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | AllBatAttrValueList = new int[AllBatAttrValueListStringArray.Length]; |
| | | for (int i=0;i<AllBatAttrValueListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(AllBatAttrValueListStringArray[i],out AllBatAttrValueList[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
copy from Main/System/Team/TeamCard.cs.meta
copy to Main/Config/Configs/HeroSkinConfig.cs.meta
File was copied from Main/System/Team/TeamCard.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87558c063506d4345a5d8b2e4496f85c |
| | | guid: f5658b3c824309e4993dbbb27974dc36 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年6月13日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class HeroTalentConfig : ConfigBase<int, HeroTalentConfig> |
| | | { |
| | | |
| | | public int TalentID; |
| | | public int Quality; |
| | | public int AttrID; |
| | | public int AttrValue; |
| | | |
| | | public override int LoadKey(string _key) |
| | | { |
| | | int key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out TalentID); |
| | | |
| | | int.TryParse(tables[1],out Quality); |
| | | |
| | | int.TryParse(tables[2],out AttrID); |
| | | |
| | | int.TryParse(tables[3],out AttrValue); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
copy from Main/System/Team/TeamCard.cs.meta
copy to Main/Config/Configs/HeroTalentConfig.cs.meta
File was copied from Main/System/Team/TeamCard.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87558c063506d4345a5d8b2e4496f85c |
| | | guid: 1e6be2f5d60890c489a9c8f3e9ada5cc |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | |
| | | using UnityEngine;
|
| | | using Cysharp.Threading;
|
| | | using Cysharp.Threading.Tasks;
|
| | | using System.Threading.Tasks;
|
| | |
|
| | | /// <summary>
|
| | | /// Main类,作为热更新程序集的入口点
|
| | |
| | | StageManager.Instance.ToLoginScene();
|
| | | }
|
| | |
|
| | | public static void OnEnterGameScene()
|
| | | public static async UniTask InitManagers()
|
| | | {
|
| | | // 初始化游戏场景
|
| | | Debug.Log("初始化游戏场景");
|
| | |
|
| | | ReleaseMgrs();
|
| | |
|
| | | // 初始化游戏系统
|
| | |
| | | manager.Init();
|
| | | }
|
| | |
|
| | | await UniTask.Yield();
|
| | | }
|
| | |
|
| | | public static void OnEnterGameScene()
|
| | | {
|
| | | // 初始化游戏场景
|
| | | Debug.Log("初始化游戏场景");
|
| | |
|
| | | foreach (var manager in managers)
|
| | | {
|
| | | manager.RequestNessaryData();
|
| | |
| | |
|
| | | AsyncOperation asyncOperation = SceneManager.LoadSceneAsync("Login");
|
| | |
|
| | | await OnLoading(asyncOperation, ConfigManager.Instance.GetLoadingProgress);
|
| | | await OnLoading(asyncOperation, ConfigManager.Instance.GetLoadingProgress, Main.InitManagers);
|
| | |
|
| | | Main.OnSwitchToLoginScene();
|
| | |
|
| | |
| | | protected void CreateTeam(Dictionary<int, BattleObject> campDict, TeamBase teamBase) |
| | | { |
| | | DestroyTeam(campDict); |
| | | for (int i = 0; i < teamBase.teamCards.Length; i++) |
| | | for (int i = 0; i < teamBase.teamHeros.Length; i++) |
| | | { |
| | | TeamCard teamCard = teamBase.teamCards[i]; |
| | | if (teamCard != null) |
| | | TeamHero teamHero = teamBase.teamHeros[i]; |
| | | if (teamHero != null) |
| | | { |
| | | BattleObject battleObj = BattleObjectFactory.CreateBattleObject(teamCard); |
| | | battleObj.Init(teamCard); |
| | | campDict.Add(teamCard.cardIndex, battleObj); |
| | | BattleObject battleObj = BattleObjectFactory.CreateBattleObject(teamHero); |
| | | battleObj.Init(teamHero); |
| | | campDict.Add(teamHero.heroIndex, battleObj); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | public BattleCamp Camp { get; protected set; } = BattleCamp.Friendly; |
| | | |
| | | public TeamCard teamCard { get; protected set; } |
| | | public TeamHero teamHero { get; protected set; } |
| | | |
| | | protected MotionBase motionBase; |
| | | |
| | | protected GameObject cardGO; |
| | | |
| | | public virtual void Init(TeamCard _teamCard) |
| | | public virtual void Init(TeamHero _teamHero) |
| | | { |
| | | this.teamCard = _teamCard; |
| | | this.teamHero = _teamHero; |
| | | motionBase = new MotionBase(); |
| | | } |
| | | |
| | | protected void LoadCard() |
| | | protected void LoadHero() |
| | | { |
| | | |
| | | } |
| | |
| | | |
| | | public class BattleObjectFactory |
| | | { |
| | | public static BattleObject CreateBattleObject(TeamCard teamCard) |
| | | public static BattleObject CreateBattleObject(TeamHero teamHero) |
| | | { |
| | | BattleObject battleObject = null; |
| | | // switch (teamCard.cardInfo.cardConfig.) |
File was renamed from Main/System/Card.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ec4bdc5ff35cf96419554a0e46696eb6 |
| | | guid: 53979a5e5ad50a047a6f681cde2d8abf |
| | | folderAsset: yes |
| | | DefaultImporter: |
| | | externalObjects: {} |
File was renamed from Main/System/Card/CardInfo.Properties.cs |
| | |
| | | |
| | | |
| | | public partial class CardInfo |
| | | public partial class HeroInfo |
| | | { |
| | | // 战斗属性的触发几率计算是1对1的,可同时触发多个属性且多次触发,触发几率不会随着目标数量多少而改变,只会根据同一目标的触发次数增多而降低。 |
| | | // 即在一回合内,同一个目标反击、连击、击晕、暴击、闪避可以同时并多次触发,触发几率随机触发次数的增加而降低,每个属性开公式来(参数:触发几率、抵抗几率、已触发次数) |
copy from Main/System/Team/TeamCard.cs.meta
copy to Main/System/Hero/HeroInfo.Properties.cs.meta
File was copied from Main/System/Team/TeamCard.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87558c063506d4345a5d8b2e4496f85c |
| | | guid: 9b206aa81fca9064d86da672dec316c1 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
New file |
| | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | public partial class HeroInfo |
| | | { |
| | | public long sid; |
| | | |
| | | public int heroId; |
| | | |
| | | public int heroLevel; |
| | | |
| | | public int heroStar; |
| | | |
| | | public int breakLevel; |
| | | |
| | | // public List<int> heroEquipList; |
| | | |
| | | // public List<int> heroRuneList; |
| | | |
| | | // public List<int> heroMedalList; |
| | | |
| | | // public HeroConfig heroConfig; |
| | | |
| | | public HeroSkillMgr heroSkillMgr; |
| | | |
| | | public HeroInfo(/*TODO 等待服务器数据*/) |
| | | { |
| | | heroSkillMgr = new HeroSkillMgr(this); |
| | | } |
| | | |
| | | |
| | | } |
copy from Main/System/Team/TeamCard.cs.meta
copy to Main/System/Hero/HeroInfo.cs.meta
File was copied from Main/System/Team/TeamCard.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87558c063506d4345a5d8b2e4496f85c |
| | | guid: fa0693c6508612c4ea7685eb5edf313a |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
New file |
| | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | public class HeroManager : GameSystemManager<HeroManager> |
| | | { |
| | | protected Dictionary<long, HeroInfo> heroInfoDict = new Dictionary<long, HeroInfo>(); |
| | | |
| | | public override void Init() |
| | | { |
| | | base.Init(); |
| | | |
| | | // 注册一点事件 |
| | | } |
| | | |
| | | public override void Release() |
| | | { |
| | | base.Release(); |
| | | } |
| | | |
| | | public override void RequestNessaryData() |
| | | { |
| | | base.RequestNessaryData(); |
| | | } |
| | | |
| | | // public override bool IsNessaryDataReady() |
| | | // { |
| | | // return true; |
| | | // } |
| | | |
| | | } |
copy from Main/System/Team/TeamCard.cs.meta
copy to Main/System/Hero/HeroManager.cs.meta
File was copied from Main/System/Team/TeamCard.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87558c063506d4345a5d8b2e4496f85c |
| | | guid: 801aeaaefd9cc4a47a18e52c98031833 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
File was renamed from Main/System/Card/CardSkillMgr.cs |
| | |
| | | /// <summary> |
| | | /// 角色技能管理器,处理所有与技能相关的功能 |
| | | /// </summary> |
| | | public class CardSkillMgr |
| | | public class HeroSkillMgr |
| | | { |
| | | public CardInfo cardInfo; |
| | | public HeroInfo heroInfo; |
| | | |
| | | public CardSkillMgr(CardInfo _cardInfo) |
| | | public HeroSkillMgr(HeroInfo _heroInfo) |
| | | { |
| | | this.cardInfo = _cardInfo; |
| | | this.heroInfo = _heroInfo; |
| | | |
| | | Init(); |
| | | } |
copy from Main/System/Team/TeamCard.cs.meta
copy to Main/System/Hero/HeroSkillMgr.cs.meta
File was copied from Main/System/Team/TeamCard.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87558c063506d4345a5d8b2e4496f85c |
| | | guid: 7e7e728c294f964489fae50298e21cc3 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
New file |
| | |
| | | |
| | | public enum HeroCountry |
| | | { |
| | | Wei, // 魏 |
| | | Shu, // 蜀 |
| | | Wu, // 吴 |
| | | Qun, // 群 |
| | | } |
| | | |
| | | // 分为4个阵营:魏、蜀、吴、群 |
copy from Main/System/Team/TeamCard.cs.meta
copy to Main/System/Hero/HeroType.cs.meta
File was copied from Main/System/Team/TeamCard.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87558c063506d4345a5d8b2e4496f85c |
| | | guid: 787ce54e710b3fa4da8583fc60ce85f1 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | |
| | | |
| | | // 阵型内卡牌的羁绊增益 |
| | | |
| | | public void CalculateProperties(CardInfo cardInfo) |
| | | public void CalculateProperties(HeroInfo heroInfo) |
| | | { |
| | | |
| | | } |
| | |
| | | |
| | | public partial class TeamBase |
| | | { |
| | | public TeamCard[] teamCards = new TeamCard[TeamConst.MaxTeamCardCount]; |
| | | public TeamHero[] teamHeros = new TeamHero[TeamConst.MaxTeamHeroCount]; |
| | | |
| | | public int GetTeamCardCount() |
| | | public int GetTeamHeroCount() |
| | | { |
| | | int count = 0; |
| | | for (int i = 0; i < teamCards.Length; i++) |
| | | for (int i = 0; i < teamHeros.Length; i++) |
| | | { |
| | | if (teamCards[i] != null) |
| | | if (teamHeros[i] != null) |
| | | { |
| | | count++; |
| | | } |
| | |
| | | return count; |
| | | } |
| | | |
| | | public bool SwapTeamCard(int index1, int index2) |
| | | public bool SwapTeamHero(int index1, int index2) |
| | | { |
| | | if (index1 < 0 || index1 >= teamCards.Length || index2 < 0 || index2 >= teamCards.Length) |
| | | if (index1 < 0 || index1 >= teamHeros.Length || index2 < 0 || index2 >= teamHeros.Length) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | TeamCard temp = teamCards[index1]; |
| | | teamCards[index1] = teamCards[index2]; |
| | | teamCards[index2] = temp; |
| | | temp.cardIndex = index2; |
| | | teamCards[index1].cardIndex = index1; |
| | | TeamHero temp = teamHeros[index1]; |
| | | teamHeros[index1] = teamHeros[index2]; |
| | | teamHeros[index2] = temp; |
| | | temp.heroIndex = index2; |
| | | teamHeros[index1].heroIndex = index1; |
| | | |
| | | return true; |
| | | } |
| | | |
| | | public bool AddTeamCard(CardInfo cardInfo) |
| | | public bool AddTeamHero(HeroInfo heroInfo) |
| | | { |
| | | if (cardInfo == null) |
| | | if (heroInfo == null) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | for (int i = 0; i < teamCards.Length; i++) |
| | | for (int i = 0; i < teamHeros.Length; i++) |
| | | { |
| | | if (teamCards[i] == null) |
| | | if (teamHeros[i] == null) |
| | | { |
| | | teamCards[i] = new TeamCard(); |
| | | teamCards[i].cardInfo = cardInfo; |
| | | teamCards[i].cardIndex = i; |
| | | teamHeros[i] = new TeamHero(); |
| | | teamHeros[i].heroInfo = heroInfo; |
| | | teamHeros[i].heroIndex = i; |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public bool RemoveTeamCard(int index) |
| | | public bool RemoveTeamHero(int index) |
| | | { |
| | | if (index < 0 || index >= teamCards.Length) |
| | | if (index < 0 || index >= teamHeros.Length) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | teamCards[index] = null; |
| | | teamHeros[index] = null; |
| | | return true; |
| | | } |
| | | |
| | | public bool IsFull() |
| | | { |
| | | return GetTeamCardCount() >= teamCards.Length; |
| | | return GetTeamHeroCount() >= teamHeros.Length; |
| | | } |
| | | |
| | | public bool IsEmpty() |
| | | { |
| | | return GetTeamCardCount() == 0; |
| | | return GetTeamHeroCount() == 0; |
| | | } |
| | | |
| | | public void InitByLevelId(int levelId) |
| | |
| | | |
| | | public class TeamConst |
| | | { |
| | | public const int MaxTeamCardCount = 6; |
| | | public const int MaxTeamHeroCount = 6; |
| | | } |
New file |
| | |
| | | |
| | | |
| | | public class TeamHero |
| | | { |
| | | public HeroInfo heroInfo; |
| | | public TeamBase teamBase; |
| | | public int heroIndex; |
| | | |
| | | public void MergeProperties() |
| | | { |
| | | if (heroInfo == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | } |
| | | } |
copy from Main/System/Team/TeamCard.cs.meta
copy to Main/System/Team/TeamHero.cs.meta
File was copied from Main/System/Team/TeamCard.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87558c063506d4345a5d8b2e4496f85c |
| | | guid: 11b9ad3c2e2945145b0dd88e0e58b1a1 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |