Resolve WES-117 "Persistent data handling"

This commit is contained in:
Dries Van Schuylenbergh
2023-04-04 17:00:47 +00:00
parent 3499e61bb0
commit 5f4408063f
82 changed files with 1963 additions and 1190 deletions

View File

@@ -7,11 +7,6 @@ using UnityEngine.UI;
/// </summary>
public class UserButton : MonoBehaviour
{
/// <summary>
/// Reference to the user list, so we can extract the current user
/// </summary>
public UserList userList;
/// <summary>
/// UI reference to the avatar object
/// </summary>
@@ -32,10 +27,10 @@ public class UserButton : MonoBehaviour
/// </summary>
void Start()
{
userList.Load();
User user = userList.GetCurrentUser();
avatar.sprite = user.avatar;
username.text = user.username;
PersistentDataController.GetInstance().Load();
User user = UserList.GetCurrentUser();
avatar.sprite = user.GetAvatar();
username.text = user.GetUsername();
dropdownBox.SetActive(false);
}