scripts(backend): use a PlayData struct for SubmitPlay
This commit is contained in:
parent
28973bbd31
commit
61dd1b5f88
1 changed files with 15 additions and 2 deletions
|
@ -227,10 +227,10 @@ public class Backend : MonoBehaviour
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// abstraction function to submit a play to the database
|
/// abstraction function to submit a play to the database
|
||||||
/// </summary>
|
/// </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>
|
/// <param name="callback">callback function that takes in one DatabaseTransactionResult argument</param>
|
||||||
private void SubmitPlay(
|
private void SubmitPlay(
|
||||||
float averageMatchAccuracy,
|
PlayData playData,
|
||||||
Action<DatabaseTransactionResult> callback)
|
Action<DatabaseTransactionResult> callback)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
@ -280,4 +280,17 @@ public class Backend : MonoBehaviour
|
||||||
public float Rating;
|
public float Rating;
|
||||||
public int PlayCount;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
Reference in a new issue