예제 #1
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);
        }
예제 #2
0
        public static PlayerSaveData CreateSave()
        {
            PlayerSaveData data = new PlayerSaveData();

            data.playerSaveData_Resource = PlayerSaveData_Resource.CreateSaveData();

            data.materialSaveData = MaterialStorageSaveData.CreateSave();
            ///Save Game Time
            data.timeSave = TimeDataSave.CreateSave();
            return(data);
        }
예제 #3
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);
        }