예제 #1
0
파일: PlayerData.cs 프로젝트: mengtest/pew
		public static void UpdateTimeValue(string name) {
			
			Properties times = new Properties(Application.persistentDataPath + "/" + SAVES_TIMES_VALUES_FILE_NAME);
			DateTime dt = DateTime.UtcNow;
			
			Debug.Log("Updating time for \"" + name + "\" as " + dt.ToString());
			times.Set(name, dt);
			times.Save();
			
		}
예제 #2
0
파일: PlayerData.cs 프로젝트: mengtest/pew
		public static DateTime GetTimeValue(string name) {
			
			Properties times = new Properties(Application.persistentDataPath + "/" + SAVES_TIMES_VALUES_FILE_NAME);
			
			DateTime dt = new DateTime(); // Should be null?
			DateTime.TryParse(times.Get(name, DateTime.MinValue.ToString()), out dt);
			
			Debug.Log("Loading time for \"" + name + "\" as " + dt.ToString());
			
			return dt;
			
		}