/**本脚本为自动生成,每次生成会覆盖!请勿手动修改**/ using System; using System.Collections.Generic; using System.Reflection; using Newtonsoft.Json.Linq; using UnityEngine; namespace NBF { public partial class ConfigAssets { public List GameBaitsArr; public List GameFeedersArr; public List GameFishAcceptsArr; public List GameFishArr; public List GameFloatsArr; public List GameHooksArr; public List GameLeadersArr; public List GameLinesArr; public List GameLuresArr; public List GameReelsArr; public List GameRingsArr; public List GameRodsArr; public List GameWeightsArr; public void Parse(JToken[] arr, Type type) { var tableNameAttribute = type.GetCustomAttribute(); if (tableNameAttribute == null) return; if (type == typeof(GameBaits)) { GameBaitsArr = ParseLine(arr, tableNameAttribute); } if (type == typeof(GameFeeders)) { GameFeedersArr = ParseLine(arr, tableNameAttribute); } if (type == typeof(GameFishAccepts)) { GameFishAcceptsArr = ParseLine(arr, tableNameAttribute); } if (type == typeof(GameFish)) { GameFishArr = ParseLine(arr, tableNameAttribute); } if (type == typeof(GameFloats)) { GameFloatsArr = ParseLine(arr, tableNameAttribute); } if (type == typeof(GameHooks)) { GameHooksArr = ParseLine(arr, tableNameAttribute); } if (type == typeof(GameLeaders)) { GameLeadersArr = ParseLine(arr, tableNameAttribute); } if (type == typeof(GameLines)) { GameLinesArr = ParseLine(arr, tableNameAttribute); } if (type == typeof(GameLures)) { GameLuresArr = ParseLine(arr, tableNameAttribute); } if (type == typeof(GameReels)) { GameReelsArr = ParseLine(arr, tableNameAttribute); } if (type == typeof(GameRings)) { GameRingsArr = ParseLine(arr, tableNameAttribute); } if (type == typeof(GameRods)) { GameRodsArr = ParseLine(arr, tableNameAttribute); } if (type == typeof(GameWeights)) { GameWeightsArr = ParseLine(arr, tableNameAttribute); } } public void AssociationContexts() { new ConfigContext().Association(GameBaitsArr); new ConfigContext().Association(GameFeedersArr); new ConfigContext().Association(GameFishAcceptsArr); new ConfigContext().Association(GameFishArr); new ConfigContext().Association(GameFloatsArr); new ConfigContext().Association(GameHooksArr); new ConfigContext().Association(GameLeadersArr); new ConfigContext().Association(GameLinesArr); new ConfigContext().Association(GameLuresArr); new ConfigContext().Association(GameReelsArr); new ConfigContext().Association(GameRingsArr); new ConfigContext().Association(GameRodsArr); new ConfigContext().Association(GameWeightsArr); } } }