scripts(backend): use a PlayData struct for SubmitPlay

This commit is contained in:
Mark Joshwel 2024-11-15 05:13:18 +08:00
parent 28973bbd31
commit 61dd1b5f88

View file

@ -227,10 +227,10 @@ public class Backend : MonoBehaviour
/// <summary>
/// abstraction function to submit a play to the database
/// </summary>
/// <param name="averageMatchAccuracy">the float percentage (0-100) of how accurate the user was when colour matching</param>
/// <param name="playData">play data</param>
/// <param name="callback">callback function that takes in one DatabaseTransactionResult argument</param>
private void SubmitPlay(
float averageMatchAccuracy,
PlayData playData,
Action<DatabaseTransactionResult> callback)
{
throw new NotImplementedException();
@ -280,4 +280,17 @@ public class Backend : MonoBehaviour
public float Rating;
public int PlayCount;
}
/// <summary>
/// struct for play data
/// </summary>
// ReSharper disable once MemberCanBePrivate.Global
public struct PlayData
{
public int RoundsPlayed;
public float AverageOverallAccuracy;
public float AverageLuminanceAccuracy;
public float AverageRedGreenAccuracy;
public float AverageBlueYellowAccuracy;
}
}