Exemplo n.º 1
0
		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();
			
		}
Exemplo n.º 2
0
		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;
			
		}