| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年10月9日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class ADAwardConfig : ConfigBase<int, ADAwardConfig> |
| | | { |
| | | static ADAwardConfig() |
| | | { |
| | | // 访问过静态构造函数 |
| | | visit = true; |
| | | } |
| | | |
| | | public int ADID; |
| | | public int ADCntMax; |
| | | public int[][] ADAwardItemList; |
| | | public int ADMapID; |
| | | |
| | | 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 ADID); |
| | | |
| | | int.TryParse(tables[1],out ADCntMax); |
| | | |
| | | ADAwardItemList = JsonMapper.ToObject<int[][]>(tables[2].Replace("(", "[").Replace(")", "]")); |
| | | |
| | | int.TryParse(tables[3],out ADMapID); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Wednesday, November 19, 2025
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class ADAwardConfig : ConfigBase<int, ADAwardConfig>
|
| | | {
|
| | | static ADAwardConfig()
|
| | | {
|
| | | // 访问过静态构造函数
|
| | | visit = true; |
| | | }
|
| | |
|
| | | public int ADID;
|
| | | public int ADCntMax;
|
| | | public int[][] ADAwardItemList;
|
| | | public int ADAwardType;
|
| | | public int ADAwardValue;
|
| | |
|
| | | 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 ADID); |
| | |
|
| | | int.TryParse(tables[1],out ADCntMax); |
| | |
|
| | | ADAwardItemList = JsonMapper.ToObject<int[][]>(tables[2].Replace("(", "[").Replace(")", "]")); |
| | |
|
| | | int.TryParse(tables[3],out ADAwardType); |
| | |
|
| | | int.TryParse(tables[4],out ADAwardValue); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|