Skip to content

Commit

Permalink
Add #14
Browse files Browse the repository at this point in the history
  • Loading branch information
ReadieFur committed Sep 18, 2021
1 parent 9c2f7ef commit 1c633c8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ This is sent out every time a level is started, failed or paused.
"Star": 0,
"IsMultiplayer": false,
"PreviousRecord": 2714014,
"PreviousBSR": null
"PreviousBSR": null,
"unixTimestamp": 1631935482036
}
```
**LiveData**:
Expand All @@ -139,6 +140,7 @@ This data is sent out every time the score is updated, health is lost or the tim
14
],
"PlayerHealth": 100,
"TimeElapsed": 77
"TimeElapsed": 77,
"unixTimestamp": 1631935485375
}
```
3 changes: 3 additions & 0 deletions src/Client/LiveData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public static void Send()

//Misc
public static int TimeElapsed { get; internal set; }
public static long unixTimestamp { get; internal set; }

public class JsonData
{
Expand All @@ -48,6 +49,7 @@ public class JsonData

//Misc
public int TimeElapsed = LiveData.TimeElapsed;
public long unixTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
}

public static void Reset()
Expand All @@ -67,6 +69,7 @@ public static void Reset()

//Misc
TimeElapsed = 0;
// unixTimestamp = default;
}
}
}
4 changes: 4 additions & 0 deletions src/Client/MapData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public static void Send()
public static bool IsMultiplayer { get; internal set; }
public static int PreviousRecord { get; internal set; }
public static string PreviousBSR { get; internal set; }
// public static long unixTimestamp { get; internal set; }

public class JsonData
{
Expand Down Expand Up @@ -90,6 +91,7 @@ public class JsonData
public bool IsMultiplayer = MapData.IsMultiplayer;
public int PreviousRecord = MapData.PreviousRecord;
public string PreviousBSR = MapData.PreviousBSR;
public long unixTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
}

public static void Reset()
Expand Down Expand Up @@ -128,6 +130,8 @@ public static void Reset()
//Misc
IsMultiplayer = false;
PreviousRecord = default;
// PreviousBSR = default;
// unixTimestamp = default;
}
}
}

0 comments on commit 1c633c8

Please sign in to comment.