Skip to content
Snippets Groups Projects
Commit d352c473 authored by Fatih20's avatar Fatih20
Browse files

fix: initialization of writeTime in GameSaveData

parent 17adf44b
1 merge request!56fix: initialization of writeTime in GameSaveData
......@@ -31,6 +31,7 @@ public class GameSaveData
// Constructor
public GameSaveData()
{
writeTime = DateTime.Now;
id = Guid.NewGuid().ToString();
storyData = new StoryData(StoryConfig.EVENTS);
}
......@@ -64,7 +65,6 @@ public class GameSaveData
writeTime = File.GetLastWriteTime(path);
string json = File.ReadAllText(path);
GameDataWrapper wrapper = JsonUtility.FromJson<GameDataWrapper>(json);
this.difficulty = wrapper.difficulty;
this.events = wrapper.events;
this.currencyData = wrapper.currencyData;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment