diff --git a/Assets/Scripts/DatabaseClasses/Proposition.cs b/Assets/Scripts/DatabaseClasses/Proposition.cs index 2fe170c..b63278b 100644 --- a/Assets/Scripts/DatabaseClasses/Proposition.cs +++ b/Assets/Scripts/DatabaseClasses/Proposition.cs @@ -8,4 +8,5 @@ public class Proposition public string photoUrl; public Player owner; public string[] voters; + public double creationDate; } diff --git a/Assets/Scripts/RoomManager.cs b/Assets/Scripts/RoomManager.cs index e8b3204..4742796 100644 --- a/Assets/Scripts/RoomManager.cs +++ b/Assets/Scripts/RoomManager.cs @@ -244,7 +244,12 @@ public void GeneratePrompts() { Dictionary propositions = new(); Player basePlayer = fullPlayers[0]; - propositions.Add(Guid.NewGuid().ToString(), new Proposition() { owner = basePlayer }); + + propositions.Add(Guid.NewGuid().ToString(), new Proposition() + { + owner = basePlayer, + creationDate = DateTime.Now.ToOADate() + }); for (int i = 1; i < fullPlayers.Count(); i++) { @@ -252,7 +257,12 @@ public void GeneratePrompts() if (basePlayer.id != secondPlayer.id) { - propositions.Add(Guid.NewGuid().ToString(), new Proposition() { owner = secondPlayer }); + propositions.Add(Guid.NewGuid().ToString(), new Proposition() + { + owner = secondPlayer, + creationDate = DateTime.Now.ToOADate() + }); + fullPlayers.RemoveAt(0); break; }