| | |
| | | // ------------------------------------------------------------------------------ |
| | | // <autogenerated> |
| | | // This code was generated by a tool. |
| | | // Mono Runtime Version: 2.0.50727.1433 |
| | | // |
| | | // Changes to this file may cause incorrect behavior and will be lost if |
| | | // the code is regenerated. |
| | | // </autogenerated> |
| | | // ------------------------------------------------------------------------------ |
| | | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | namespace TableConfig |
| | | { |
| | | public partial class RandomNameConfig : ConfigBase, IConfigPostProcess |
| | | { |
| | | private static Dictionary<int, List<RandomNameConfig>> m_RandomNameCfgs = new Dictionary<int, List<RandomNameConfig>>(); |
| | | |
| | | public void OnConfigParseCompleted() |
| | | { |
| | | int[] intarray = ConfigParse.GetMultipleStr<int>(Sex); |
| | | if (intarray != null && intarray.Length > 0) |
| | | { |
| | | for (int i = 0; i < intarray.Length; i++) |
| | | { |
| | | List<RandomNameConfig> list = null; |
| | | m_RandomNameCfgs.TryGetValue(intarray[i], out list); |
| | | if (list == null) |
| | | { |
| | | list = new List<RandomNameConfig>(); |
| | | list.Add(this); |
| | | m_RandomNameCfgs.Add(intarray[i], list); |
| | | } |
| | | else |
| | | { |
| | | list.Add(this); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public static string GetFirstName(int occupa) |
| | | { |
| | | List<RandomNameConfig> list = null; |
| | | m_RandomNameCfgs.TryGetValue(occupa, out list); |
| | | int cnt = list.Count; |
| | | string str = list[Random.Range(0, cnt)].RandomName1; |
| | | return str; |
| | | } |
| | | |
| | | public static string GetSecondName(int occupa) |
| | | { |
| | | List<RandomNameConfig> list = null; |
| | | m_RandomNameCfgs.TryGetValue(occupa, out list); |
| | | int cnt = list.Count; |
| | | string str = list[Random.Range(0, cnt)].RandomName2; |
| | | return str; |
| | | } |
| | | } |
| | | } |
| | | // ------------------------------------------------------------------------------
|
| | | // <autogenerated>
|
| | | // This code was generated by a tool.
|
| | | // Mono Runtime Version: 2.0.50727.1433
|
| | | // |
| | | // Changes to this file may cause incorrect behavior and will be lost if |
| | | // the code is regenerated.
|
| | | // </autogenerated>
|
| | | // ------------------------------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | |
|
| | | namespace TableConfig
|
| | | {
|
| | | public partial class RandomNameConfig : ConfigBase, IConfigPostProcess
|
| | | {
|
| | | private static Dictionary<int, List<RandomNameConfig>> m_RandomNameCfgs = new Dictionary<int, List<RandomNameConfig>>();
|
| | |
|
| | | public void OnConfigParseCompleted()
|
| | | {
|
| | | int[] intarray = ConfigParse.GetMultipleStr<int>(Sex);
|
| | | if (intarray != null && intarray.Length > 0)
|
| | | {
|
| | | for (int i = 0; i < intarray.Length; i++)
|
| | | {
|
| | | List<RandomNameConfig> list = null;
|
| | | m_RandomNameCfgs.TryGetValue(intarray[i], out list);
|
| | | if (list == null)
|
| | | {
|
| | | list = new List<RandomNameConfig>();
|
| | | list.Add(this);
|
| | | m_RandomNameCfgs.Add(intarray[i], list);
|
| | | }
|
| | | else
|
| | | {
|
| | | list.Add(this);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public static string GetFirstName(int occupa)
|
| | | {
|
| | | List<RandomNameConfig> list = null;
|
| | | m_RandomNameCfgs.TryGetValue(occupa, out list);
|
| | | int cnt = list.Count;
|
| | | string str = list[Random.Range(0, cnt)].RandomName1;
|
| | | return str;
|
| | | }
|
| | |
|
| | | public static string GetSecondName(int occupa)
|
| | | {
|
| | | List<RandomNameConfig> list = null;
|
| | | m_RandomNameCfgs.TryGetValue(occupa, out list);
|
| | | int cnt = list.Count;
|
| | | string str = list[Random.Range(0, cnt)].RandomName2;
|
| | | return str;
|
| | | }
|
| | | }
|
| | | }
|