game: tiny edits

This commit is contained in:
kookiekenobi 2025-02-16 04:24:02 +08:00
parent 4f199e4367
commit 58eaaebfe7
3 changed files with 5 additions and 5 deletions

View file

@ -49,7 +49,7 @@ public class Backend : MonoBehaviour
score = score, score = score,
displayName = displayName, displayName = displayName,
daysPlayed = daysPlayed, daysPlayed = daysPlayed,
customersHelped = customersHelpedCorrectly, customersHelpedCorrectly = customersHelpedCorrectly,
customersHelpedWrongly = customersHelpedWrongly, customersHelpedWrongly = customersHelpedWrongly,
}; };
await Client.From<Users>().Insert(user).ContinueWith(SendTask => await Client.From<Users>().Insert(user).ContinueWith(SendTask =>

View file

@ -49,8 +49,8 @@ public class MenuButtons : MonoBehaviour
{ {
if (user != null) if (user != null)
{ {
var totalPeopleHelped = user.customersHelped + user.customersHelpedWrongly; var totalPeopleHelped = user.customersHelpedCorrectly + user.customersHelpedWrongly;
var accuracy = totalPeopleHelped > 0? ((float)user.customersHelped/totalPeopleHelped)*100:0; var accuracy = totalPeopleHelped > 0? ((float)user.customersHelpedCorrectly/totalPeopleHelped)*100:0;
Debug.Log($"Updating UI: {user.displayName}, Days Played: {user.daysPlayed}, Accuracy: {accuracy}%"); Debug.Log($"Updating UI: {user.displayName}, Days Played: {user.daysPlayed}, Accuracy: {accuracy}%");

Binary file not shown.