Esempio n. 1
0
        public static GamePrepareData InitData()
        {
            GamePrepareData data   = new GamePrepareData();
            var             config = Config.ConfigData.PlayerConfig.gamePrepareConfig;

            if (config == null)
            {
                return(null);
            }
            for (int i = 0; i < config.prepareProperty.Count; i++)
            {
                GamePreparePropertyData propertyData = new GamePreparePropertyData
                {
                    configID           = config.prepareProperty[i].configID,
                    configType         = config.prepareProperty[i].configType,
                    currentSelectLevel = config.prepareProperty[i].defaultSelectLevel
                };
                data.preparePropertyDataList.Add(propertyData);
            }

            for (int i = 0; i < config.AIPrepareConfig.Count; i++)
            {
                GamePreparePropertyData propertyData = new GamePreparePropertyData
                {
                    configID           = config.AIPrepareConfig[i].configID,
                    currentSelectLevel = config.AIPrepareConfig[i].defaultSelectLevel
                };
                data.prepareAIDataList.Add(propertyData);
            }
            data.currentLeaderInfoList = new List <LeaderInfo>();
            return(data);
        }
Esempio n. 2
0
 public void InitGameBaseData()
 {
     gamePrepareData = GamePrepareData.InitData();
 }