コード例 #1
0
        public static TimeData InitData(Config.TimeDataConfig timeConfig)
        {
            TimeData data = new TimeData();

            data.realSecondsPerDay = timeConfig.RealSecondsPerDay;
            data.date = new DateTime(timeConfig.OriginalYear, timeConfig.OriginalMonth, timeConfig.OriginalDay);
            return(data);
        }
コード例 #2
0
ファイル: PlayerData.cs プロジェクト: EpicProj/RPG
        /// <summary>
        /// Game Save
        /// </summary>
        /// <param name="saveData"></param>
        public void LoadPlayerSaveData(PlayerSaveData saveData, AssemblePartGeneralSaveData partSaveData)
        {
            resourceData = PlayerResourceData.LoadSave(saveData.playerSaveData_Resource);

            timeData = TimeData.LoadGameSave(saveData.timeSave);

            materialStorageData = MaterialStorageData.LoadSaveData(saveData.materialSaveData);
            assemblePartData    = PlayerAssemblePartData.LoadSaveData(partSaveData);
        }
コード例 #3
0
        public static TimeDataSave CreateSave()
        {
            TimeDataSave data = new TimeDataSave();
            TimeData     time = PlayerManager.Instance.playerData.timeData;

            data.currentYear  = time.date.Year;
            data.currentMonth = time.date.Month;
            data.currentDay   = time.date.Day;
            data.timer        = time.timer;
            return(data);
        }
コード例 #4
0
 public OrderStatisticsItem(int orderID, TimeData data = null, int overTime = 0)
 {
     this.orderID = orderID;
     if (data != null)
     {
         OrderCompleteItem item = new OrderCompleteItem
         {
             completeID    = 1,
             completeYear  = data.date.Year,
             completeMonth = data.date.Month
         };
         orderCompleteData.Add(item);
     }
     OverTimeCount = overTime;
 }
コード例 #5
0
        public static TimeData LoadGameSave(TimeDataSave save)
        {
            TimeData data = new TimeData();

            data.date  = new DateTime(save.currentYear, save.currentMonth, save.currentDay);
            data.timer = save.timer;

            var config = Config.ConfigData.PlayerConfig.timeConfig;

            if (config == null)
            {
                DebugPlus.LogError("[PlayerTimeData] : Find TimeConfig Error!");
            }
            data.realSecondsPerDay = config.RealSecondsPerDay;
            return(data);
        }
コード例 #6
0
ファイル: PlayerData.cs プロジェクト: EpicProj/RPG
        public bool InitData()
        {
            var config = Config.ConfigData.PlayerConfig;

            if (config == null || config.timeConfig == null)
            {
                DebugPlus.LogError("[PlayerData] : playerConfig is null!");
                return(false);
            }

            timeData = TimeData.InitData(config.timeConfig);

            resourceData = PlayerResourceData.InitData();

            assemblePartData = PlayerAssemblePartData.InitData();

            materialStorageData = new MaterialStorageData();
            //Init BuildPanel
            UnLockBuildingPanelDataList = PlayerModule.GetUnLockBuildData();
            return(true);
        }