| | |
| | |
|
| | | public static void Init(string[] lines)
|
| | | {
|
| | | dic.Clear();
|
| | | |
| | | Dictionary<string, string> rawDatas = new Dictionary<string, string>();
|
| | |
|
| | | for (int i = 3; i < lines.Length; i++)
|
| | |
| | | T config = new T();
|
| | | U key = config.LoadKey(strKey);
|
| | | config.LoadConfig(line);
|
| | | #if UNITY_EDITOR
|
| | | try
|
| | | {
|
| | | #endif
|
| | | dic.Add(key, config);
|
| | | #if UNITY_EDITOR
|
| | | }
|
| | | catch (ArgumentException exception)
|
| | | {
|
| | | Debug.LogError(typeof(T).Name + " 重复的key " + key + " " + exception.Message);
|
| | | }
|
| | | #endif
|
| | | |
| | | }
|
| | |
|
| | | isInit = true;
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out ID); |
| | | |
| | |
| | | int.TryParse(LegendAttrValueStringArray[i],out LegendAttrValue[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out ID); |
| | | |
| | | Folder = tables[1]; |
| | | |
| | | Audio = tables[2]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out RecordID); |
| | | |
| | |
| | | int.TryParse(tables[14],out PayType); |
| | | |
| | | int.TryParse(tables[15],out Percentage); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out SelectID); |
| | | |
| | | int.TryParse(tables[1],out ItemID); |
| | | |
| | | int.TryParse(tables[2],out ItemCount); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out ID); |
| | | |
| | |
| | | Probability2 = tables[6]; |
| | | |
| | | JobItem = tables[7]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out BoxID); |
| | | |
| | |
| | | int.TryParse(tables[3],out OpenMoney); |
| | | |
| | | int.TryParse(tables[4],out OpenShow); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out ID); |
| | | |
| | |
| | | int.TryParse(tables[11],out missionId); |
| | | |
| | | int.TryParse(tables[12],out order); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out id); |
| | | |
| | | word = tables[1]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out id); |
| | | |
| | |
| | | nodeName = tables[7]; |
| | | |
| | | int.TryParse(tables[8],out notShow); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out EmojiPackID); |
| | | |
| | |
| | | UnlockNeedItemList = JsonMapper.ToObject<int[][]>(tables[7].Replace("(", "[").Replace(")", "]")); |
| | | |
| | | Descriptive = tables[8]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | name = tables[0]; |
| | | |
| | |
| | | int.TryParse(tables[4],out EmojiPackID); |
| | | |
| | | folder = tables[5]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out familyLV); |
| | | |
| | |
| | | int.TryParse(tables[6],out bossFBCnt); |
| | | |
| | | int.TryParse(tables[7],out ZhenbaogeWeights); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | KEY = tables[0]; |
| | | |
| | |
| | | Numerical4 = tables[4]; |
| | | |
| | | Numerical5 = tables[5]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out FuncId); |
| | | |
| | |
| | | int.TryParse(tables[9],out open); |
| | | |
| | | int.TryParse(tables[10],out ContinueTask); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out FuncMapID); |
| | | |
| | |
| | | int.TryParse(tables[6],out SortReverse); |
| | | |
| | | int.TryParse(tables[7],out OPLimitInAct); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out ID); |
| | | |
| | |
| | | int.TryParse(tables[6],out ActiveType); |
| | | |
| | | int.TryParse(tables[7],out customize); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out Id); |
| | | |
| | | Cmd = tables[1]; |
| | | |
| | | ParamSet = tables[2]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out ID); |
| | | |
| | |
| | | } |
| | | |
| | | int.TryParse(tables[11],out AutoCompleteTime); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | id = tables[0]; |
| | | |
| | | folder = tables[1]; |
| | | |
| | | sprite = tables[2]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | KEY = tables[0]; |
| | | |
| | |
| | | Numerical4 = tables[4]; |
| | | |
| | | Numerical5 = tables[5]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out ID); |
| | | |
| | |
| | | } |
| | | |
| | | int.TryParse(tables[72],out BaseEffectID); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out id); |
| | | |
| | | kickout = tables[1]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | id = tables[0]; |
| | | |
| | | content = tables[1]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | MailType = tables[0]; |
| | | |
| | | Title = tables[1]; |
| | | |
| | | Content = tables[2]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out NPCID); |
| | | |
| | |
| | | int.TryParse(tables[57],out NPCSpeakID); |
| | | |
| | | Equips = tables[58]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out NPCID); |
| | | |
| | | long.TryParse(tables[1],out SuppressFightPower); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out id); |
| | | |
| | |
| | | Name = tables[8]; |
| | | |
| | | StoreOrderInfo3 = tables[9]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out FaceID); |
| | | |
| | |
| | | int.TryParse(tables[12],out LightFightPower); |
| | | |
| | | Descriptive = tables[13]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out FacePicID); |
| | | |
| | |
| | | int.TryParse(tables[10],out LightFightPower); |
| | | |
| | | Descriptive = tables[11]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out index); |
| | | |
| | |
| | | int.TryParse(StarAttrValueStringArray[i],out StarAttrValue[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out index); |
| | | |
| | |
| | | int.TryParse(StarAttrValueStringArray[i],out StarAttrValue[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out LV); |
| | | |
| | |
| | | int.TryParse(tables[6],out fightPower); |
| | | |
| | | int.TryParse(tables[7],out IceLodeFightPower); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out Key); |
| | | |
| | | Content = tables[1]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out id); |
| | | |
| | |
| | | int.TryParse(tables[2],out Number); |
| | | |
| | | Content = tables[3]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out ID); |
| | | |
| | | Title = tables[1]; |
| | | |
| | | Description = tables[2]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out SkillID); |
| | | |
| | |
| | | int.TryParse(tables[76],out Skillactmark); |
| | | |
| | | int.TryParse(tables[77],out BuffDisplay); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out ID); |
| | | |
| | |
| | | int.TryParse(tables[21],out RemindSuccess); |
| | | |
| | | int.TryParse(tables[22],out IsHideSellOut); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out ID); |
| | | |
| | |
| | | int.TryParse(tables[18],out ReOrder); |
| | | |
| | | int.TryParse(tables[19],out RealmPracticeID); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | key = tables[0]; |
| | | |
| | |
| | | richText = tables[4]; |
| | | |
| | | int.TryParse(tables[5],out order); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out id); |
| | | |
| | |
| | | int.TryParse(StarAttrValueStringArray[i],out StarAttrValue[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | // [ Date ]: 2025年5月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out id); |
| | | |
| | |
| | | int.TryParse(tables[3],out Prior); |
| | | |
| | | int.TryParse(tables[4],out mapId); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using UnityEngine; |
| | | public class AssetBundleInitTask : LaunchTask |
| | | { |
| | | public override float expectTime |
| | | { |
| | | get { return LocalSave.GetFloat("AssetBundleInitTask_ExpectTime", 1f); } |
| | | protected set { LocalSave.SetFloat("AssetBundleInitTask_ExpectTime", value); } |
| | | } |
| | | |
| | | public override void Begin() |
| | | { |
| | | LaunchInHot.m_CurrentStage = LaunchStage.AssetBundleInit; |
| | | |
| | | duration = Mathf.Max(0.5f, expectTime); |
| | | if (!AssetSource.allFromEditor) |
| | | { |
| | | AssetBundleUtility.Instance.Initialize(); |
| | | done = false; |
| | | progress = 0f; |
| | | } |
| | | else |
| | | { |
| | | done = true; |
| | | } |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | expectTime = timer; |
| | | // TODO YYL |
| | | // UILoader.LoadWindowAsync("LaunchBackGroundWin", null); |
| | | Debug.LogFormat("{0}执行时长:{1};", this.GetType().Name, timer); |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | if (done) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (AssetBundleUtility.Instance.initialized && AssetBundleUtility.Instance.initializedUIAssetBundle) |
| | | { |
| | | done = true; |
| | | } |
| | | else |
| | | { |
| | | done = false; |
| | | progress = timer / duration; |
| | | } |
| | | |
| | | ExceptionReport(); |
| | | } |
| | | } |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 2320cb7f1ed22954582a564a864723a3 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | using UnityEngine; |
| | | using System.IO; |
| | | using System; |
| | | using Cysharp.Threading.Tasks; |
| | | |
| | | |
| | | public class BuiltInAssetCopyTask : LaunchTask |
| | |
| | | |
| | | if (!firstLaunch) |
| | | { |
| | | done = true; |
| | | LoadInitalConfig().Forget(); |
| | | } |
| | | } |
| | | |
| | | protected async UniTask LoadInitalConfig() |
| | | { |
| | | await ConfigManager.Instance.LoadConfigByType(typeof(InitialFunctionConfig)); |
| | | |
| | | done = true; |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | if (!AssetSource.builtInFromEditor) |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using UnityEngine; |
| | | public class ConfigInitTask : LaunchTask |
| | | { |
| | | public override float expectTime |
| | | { |
| | | get { return LocalSave.GetFloat("ConfigInitTask_ExpectTime", 10f); } |
| | | protected set { LocalSave.SetFloat("ConfigInitTask_ExpectTime", value); } |
| | | } |
| | | |
| | | float threshold = 1f; |
| | | |
| | | public override void Begin() |
| | | { |
| | | LaunchInHot.m_CurrentStage = LaunchStage.ConfigInit; |
| | | duration = Mathf.Max(0.5f, expectTime); |
| | | threshold = Application.platform == RuntimePlatform.WindowsEditor ? 1f : 0.9f; |
| | | |
| | | // LaunchPostProcess.Instance.Begin(); |
| | | // InitialFunctionConfig.Init(true); //有更新再初始化一次 |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | expectTime = timer; |
| | | Debug.LogFormat("{0}执行时长:{1};", this.GetType().Name, timer); |
| | | |
| | | // TODO YYL |
| | | // OperationLogCollect.Instance.RecordLauchEvent(3); |
| | | // OperationLogCollect.Instance.RecordEvent(3); |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | if (done) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | timer += Time.deltaTime; |
| | | // if (!ConfigInitiator.IsLoginConfigInited)\ |
| | | // TODO YYL |
| | | // if (!ConfigInitiator.done) |
| | | // { |
| | | // done = false; |
| | | // progress = timer / duration; |
| | | // } |
| | | // else |
| | | { |
| | | done = true; |
| | | } |
| | | |
| | | ExceptionReport(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 925b22a08094adb43919e79f509c15a3 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | |
| | | } |
| | | |
| | | public class AssetBundleInitTask : LaunchTask |
| | | { |
| | | public override float expectTime |
| | | { |
| | | get { return LocalSave.GetFloat("AssetBundleInitTask_ExpectTime", 1f); } |
| | | protected set { LocalSave.SetFloat("AssetBundleInitTask_ExpectTime", value); } |
| | | } |
| | | |
| | | public override void Begin() |
| | | { |
| | | LaunchInHot.m_CurrentStage = LaunchStage.AssetBundleInit; |
| | | |
| | | duration = Mathf.Max(0.5f, expectTime); |
| | | if (!AssetSource.allFromEditor) |
| | | { |
| | | AssetBundleUtility.Instance.Initialize(); |
| | | done = false; |
| | | progress = 0f; |
| | | } |
| | | else |
| | | { |
| | | done = true; |
| | | } |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | expectTime = timer; |
| | | // TODO YYL |
| | | // UILoader.LoadWindowAsync("LaunchBackGroundWin", null); |
| | | Debug.LogFormat("{0}执行时长:{1};", this.GetType().Name, timer); |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | if (done) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (AssetBundleUtility.Instance.initialized && AssetBundleUtility.Instance.initializedUIAssetBundle) |
| | | { |
| | | done = true; |
| | | } |
| | | else |
| | | { |
| | | done = false; |
| | | progress = timer / duration; |
| | | } |
| | | |
| | | ExceptionReport(); |
| | | } |
| | | } |
| | | |
| | | public class ConfigInitTask : LaunchTask |
| | | { |
| | | public override float expectTime |
| | | { |
| | | get { return LocalSave.GetFloat("ConfigInitTask_ExpectTime", 10f); } |
| | | protected set { LocalSave.SetFloat("ConfigInitTask_ExpectTime", value); } |
| | | } |
| | | |
| | | float threshold = 1f; |
| | | |
| | | public override void Begin() |
| | | { |
| | | LaunchInHot.m_CurrentStage = LaunchStage.ConfigInit; |
| | | duration = Mathf.Max(0.5f, expectTime); |
| | | threshold = Application.platform == RuntimePlatform.WindowsEditor ? 1f : 0.9f; |
| | | |
| | | // LaunchPostProcess.Instance.Begin(); |
| | | // InitialFunctionConfig.Init(true); //有更新再初始化一次 |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | expectTime = timer; |
| | | Debug.LogFormat("{0}执行时长:{1};", this.GetType().Name, timer); |
| | | |
| | | // TODO YYL |
| | | // OperationLogCollect.Instance.RecordLauchEvent(3); |
| | | // OperationLogCollect.Instance.RecordEvent(3); |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | if (done) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | timer += Time.deltaTime; |
| | | // if (!ConfigInitiator.IsLoginConfigInited)\ |
| | | // TODO YYL |
| | | // if (!ConfigInitiator.done) |
| | | // { |
| | | // done = false; |
| | | // progress = timer / duration; |
| | | // } |
| | | // else |
| | | { |
| | | done = true; |
| | | } |
| | | |
| | | ExceptionReport(); |
| | | } |
| | | |
| | | } |
| | | |
| | | public class LaunchFadeOutTask : LaunchTask |
| | | { |
| | | public override float expectTime |
| | | { |
| | | get { return LocalSave.GetFloat("LaunchFadeOutTask_ExpectTime", 1f); } |
| | | protected set { LocalSave.SetFloat("LaunchFadeOutTask_ExpectTime", value); } |
| | | } |
| | | |
| | | public override void Begin() |
| | | { |
| | | LaunchInHot.m_CurrentStage = LaunchStage.Complete; |
| | | duration = 0.5f; |
| | | |
| | | ShaderUtility.WarmUpAll(); |
| | | //SpeechTranslate.Instance.RequestGetToken(); |
| | | // TODO CYL |
| | | // WindowCenter.Instance.Open<LaunchBackGroundWin>(true); |
| | | |
| | | // var launchWin = WindowCenter.Instance.Get<LaunchWin>(); |
| | | // if (launchWin != null) |
| | | // { |
| | | // launchWin.FadeOut(); |
| | | // } |
| | | |
| | | // try |
| | | // { |
| | | // LogicLauncher.LaunchStart(); |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // UnityEngine.Debug.LogError(e); |
| | | // } |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | expectTime = timer; |
| | | Debug.LogFormat("{0}执行时长:{1};", this.GetType().Name, timer); |
| | | |
| | | |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | if (done) |
| | | { |
| | | return; |
| | | } |
| | | timer += Time.deltaTime; |
| | | |
| | | if (timer >= 0.5f)//&& ILLauncherProxy.Instance.started) |
| | | { |
| | | done = true; |
| | | } |
| | | else |
| | | { |
| | | done = false; |
| | | progress = Mathf.Clamp01(timer / expectTime); |
| | | } |
| | | |
| | | ExceptionReport(); |
| | | } |
| | | |
| | | } |
| | | |
| | | public class WaitTask : LaunchTask |
| | | { |
| | | public WaitTask(float seconds) |
| | | { |
| | | expectTime = Mathf.Max(0.1f, seconds); |
| | | } |
| | | |
| | | public override void Begin() |
| | | { |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | timer += Time.deltaTime; |
| | | |
| | | if (timer >= expectTime) |
| | | { |
| | | done = true; |
| | | } |
| | | else |
| | | { |
| | | done = false; |
| | | progress = Mathf.Clamp01(timer / expectTime); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | //ExceptionCatcher.Init(); |
| | | //ExceptionCatcher.Catch(); |
| | | |
| | | // TODO YYL 如果没有 GlobalTimeEvent的话需要在场景加载的时候去加一个 |
| | | GlobalTimeEvent.Instance.Begin(); |
| | | PackageRegedit.Init(); |
| | | Clock.Init(); |
| | | |
| | | // TODO YYL |
| | | // if (VersionConfig.Get().appId.Equals("test")) |
| | | // { |
| | | // SnxxzGame.Instance.gameObject.AddComponent<PocoManager>(); |
| | | // } |
| | | done = true; |
| | | } |
| | | |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using UnityEngine; |
| | | public class LaunchFadeOutTask : LaunchTask |
| | | { |
| | | public override float expectTime |
| | | { |
| | | get { return LocalSave.GetFloat("LaunchFadeOutTask_ExpectTime", 1f); } |
| | | protected set { LocalSave.SetFloat("LaunchFadeOutTask_ExpectTime", value); } |
| | | } |
| | | |
| | | public override void Begin() |
| | | { |
| | | LaunchInHot.m_CurrentStage = LaunchStage.Complete; |
| | | duration = 0.5f; |
| | | |
| | | ShaderUtility.WarmUpAll(); |
| | | //SpeechTranslate.Instance.RequestGetToken(); |
| | | // TODO CYL |
| | | // WindowCenter.Instance.Open<LaunchBackGroundWin>(true); |
| | | |
| | | // var launchWin = WindowCenter.Instance.Get<LaunchWin>(); |
| | | // if (launchWin != null) |
| | | // { |
| | | // launchWin.FadeOut(); |
| | | // } |
| | | |
| | | |
| | | // try |
| | | // { |
| | | // Main.Init();//考虑移到launchcomplete (launchinhot)里? |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // UnityEngine.Debug.LogError(e); |
| | | // } |
| | | |
| | | // try |
| | | // { |
| | | // LogicLauncher.LaunchStart(); |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // UnityEngine.Debug.LogError(e); |
| | | // } |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | expectTime = timer; |
| | | Debug.LogFormat("{0}执行时长:{1};", this.GetType().Name, timer); |
| | | |
| | | |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | if (done) |
| | | { |
| | | return; |
| | | } |
| | | timer += Time.deltaTime; |
| | | |
| | | if (timer >= 0.5f)//&& ILLauncherProxy.Instance.started) |
| | | { |
| | | done = true; |
| | | } |
| | | else |
| | | { |
| | | done = false; |
| | | progress = Mathf.Clamp01(timer / expectTime); |
| | | } |
| | | |
| | | ExceptionReport(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a84cde2dff108d745bbe6fd1f5bda081 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | System.Net.ServicePointManager.DefaultConnectionLimit = 100;//设置http最大连接数 |
| | | Application.backgroundLoadingPriority = ThreadPriority.High; |
| | | Screen.sleepTimeout = SleepTimeout.NeverSleep; |
| | | |
| | | InitSystemMgr(); |
| | | SDKUtils.Instance.Init(); //原sdk接口 |
| | | |
| | | var builtInAssetCopyTask = new BuiltInAssetCopyTask(); |
| | |
| | | |
| | | CalculateExpectTotalTime(); |
| | | |
| | | } |
| | | |
| | | protected void InitSystemMgr() |
| | | { |
| | | ResManager.Instance.Init(); |
| | | UIManager.Instance.Init(); |
| | | StageManager.Instance.Init(); |
| | | LoginManager.Instance.Init(); |
| | | } |
| | | |
| | | void Update() |
| | |
| | | } |
| | | } |
| | | |
| | | if (launchComplete) |
| | | { |
| | | UnityEngine.Debug.LogFormat("启动耗时:{0}", timer); |
| | | progressInfo = new LaunchProgressInfo(m_CurrentStage, 1, 1f, 1f); |
| | | this.enabled = false; |
| | | // Debug.LogError("currentTask is null " + (currentTask == null).ToString() + " isLaunchComplete " + launchComplete.ToString()); |
| | | |
| | | // 启动流程结束 要去哪里 TODO YYL |
| | | // if (currentTask != null) |
| | | // { |
| | | |
| | | if (launchComplete) |
| | | { |
| | | UnityEngine.Debug.LogFormat("启动耗时:{0}", timer); |
| | | progressInfo = new LaunchProgressInfo(m_CurrentStage, 1, 1f, 1f); |
| | | this.enabled = false; |
| | | |
| | | // StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand() |
| | | // { |
| | | // toMapId = 1, |
| | | // toLineId = 0, |
| | | // needEmpty = false, |
| | | // needLoadResource = true, |
| | | // serverType = ServerType.Main, |
| | | // isClientLoadMap = true |
| | | // }); |
| | | } |
| | | // 启动流程结束 要去哪里 LoginStage的处理 TODO YYL |
| | | Main.Init(); |
| | | // StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand() |
| | | // { |
| | | // toMapId = 1, |
| | | // toLineId = 0, |
| | | // needEmpty = false, |
| | | // needLoadResource = true, |
| | | // serverType = ServerType.Main, |
| | | // isClientLoadMap = true |
| | | // }); |
| | | } |
| | | // } |
| | | } |
| | | |
| | | public static int GetLaunchStage() |
| | |
| | | else |
| | | { |
| | | //先弹隐私政策,同意之后才可以申请权限 继续游戏 |
| | | // YYL TODO |
| | | // WindowCenter.Instance.OpenFromLocal<RequestSecretWin>(); |
| | | UIManager.Instance.OpenWindow<RequestSecretWin>(); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using UnityEngine; |
| | | |
| | | public class WaitTask : LaunchTask |
| | | { |
| | | public WaitTask(float seconds) |
| | | { |
| | | expectTime = Mathf.Max(0.1f, seconds); |
| | | } |
| | | |
| | | public override void Begin() |
| | | { |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | timer += Time.deltaTime; |
| | | |
| | | if (timer >= expectTime) |
| | | { |
| | | done = true; |
| | | } |
| | | else |
| | | { |
| | | done = false; |
| | | progress = Mathf.Clamp01(timer / expectTime); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 92c398fc849d84941b0c066dfa41ced5 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | public static void Init()
|
| | | {
|
| | | Debug.Log("Main.Init() 被调用");
|
| | | InitSystems();
|
| | |
|
| | | Debug.Log("关闭加载界面");
|
| | | LaunchLoadingWin.Instance.CloseWindow();
|
| | |
|
| | | SwitchToLoginScene();
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化游戏系统
|
| | | /// </summary>
|
| | | private static void InitSystems()
|
| | | {
|
| | | // 这里可以初始化大型系统 贯穿整个游戏的系统
|
| | | ResManager.Instance.Init();
|
| | | UIManager.Instance.Init();
|
| | | StageManager.Instance.Init();
|
| | | LoginManager.Instance.Init();
|
| | |
|
| | | }
|
| | |
|
| | | private static void SwitchToLoginScene()
|
| | |
| | | isLoadFinished = true;
|
| | | }
|
| | |
|
| | | private async UniTask LoadConfigByType(Type configType)
|
| | | public async UniTask LoadConfigByType(Type configType)
|
| | | {
|
| | | string configName = configType.Name;
|
| | | if (configName.EndsWith("Config"))
|
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: b2f946877be206649968d550cbeee480 |
| | | folderAsset: yes |
| | | DefaultImporter: |
| | | externalObjects: {} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | { |
| | | if (debugRoot == null) |
| | | { |
| | | var prefab = BuiltInLoader.LoadPrefab("UIRootDebug"); |
| | | debugRoot = GameObject.Instantiate(prefab); |
| | | MonoBehaviour.DontDestroyOnLoad(debugRoot); |
| | | debugRoot.name = "UIRootDebug"; |
| | | // var prefab = BuiltInLoader.LoadPrefab("UIRootDebug"); |
| | | // debugRoot = GameObject.Instantiate(prefab); |
| | | // MonoBehaviour.DontDestroyOnLoad(debugRoot); |
| | | // debugRoot.name = "UIRootDebug"; |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 91e90d274ca17e84aab980cb88d23de7 |
| | | folderAsset: yes |
| | | DefaultImporter: |
| | | externalObjects: {} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine.UI; |
| | | using DG.Tweening; |
| | | using Cysharp.Threading.Tasks; |
| | | |
| | | public class RequestSecretWin : UIBase |
| | | { |
| | | // 组件引用 |
| | | [SerializeField] Button m_Confirm; |
| | | [SerializeField] Button m_Cannel; |
| | | [SerializeField] Button m_Fuwu; |
| | | [SerializeField] Button m_Yinsi; |
| | | |
| | | protected override void InitComponent() |
| | | { |
| | | |
| | | Debug.LogError("InitComponent"); |
| | | base.InitComponent(); |
| | | // 初始化组件引用 |
| | | m_Confirm.SetListener(Confirm); |
| | | m_Cannel.SetListener(() => { |
| | | Debug.LogError("Cannel"); |
| | | CloseWindow(); |
| | | #if UNITY_EDITOR |
| | | UnityEditor.EditorApplication.isPlaying = false; |
| | | #else |
| | | Application.Quit(); |
| | | #endif |
| | | }); |
| | | m_Fuwu.SetListener(()=> { |
| | | // TODO YYL |
| | | // WindowCenter.Instance.OpenFromLocal<GameAgeWarnWin>(1); |
| | | }); |
| | | m_Yinsi.SetListener(() => { |
| | | // TODO YYL |
| | | // WindowCenter.Instance.OpenFromLocal<GameAgeWarnWin>(2); |
| | | }); |
| | | } |
| | | |
| | | // UI事件 |
| | | protected override void OnOpen() |
| | | { |
| | | base.OnOpen(); |
| | | // 窗口打开时的逻辑 |
| | | } |
| | | |
| | | protected override void OnClose() |
| | | { |
| | | base.OnClose(); |
| | | // 窗口关闭时的逻辑 |
| | | } |
| | | |
| | | public override void Refresh() |
| | | { |
| | | base.Refresh(); |
| | | // 刷新UI显示 |
| | | } |
| | | |
| | | private void Confirm() |
| | | { |
| | | Debug.LogError("Confirm"); |
| | | //同意隐私 并申请权限 |
| | | SDKUtils.Instance.IsAgreeSecret = true; |
| | | LocalSave.SetBool("secretToggleStart5", true); |
| | | SDKUtils.Instance.RequestAndroidPermissionStart(); |
| | | CloseWindow(); |
| | | } |
| | | } |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 57d847f779aa7354fbaa2f799db238e1 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | // uiBase.instanceID = GenerateUIInstanceID(uiName);
|
| | |
|
| | | // 设置父节点为UI根节点
|
| | | uiObject.transform.SetParent(GetTransForLayer(uiBase.uiLayer), false);
|
| | | Transform parentTrans = GetTransForLayer(uiBase.uiLayer);
|
| | |
|
| | | uiObject.transform.SetParent(parentTrans, false);
|
| | |
|
| | | // 设置排序顺序
|
| | | int baseSortingOrder = GetBaseSortingOrderForLayer(uiBase.uiLayer);
|