Resolve WES-99 "Cc refactor"

This commit is contained in:
Dries Van Schuylenbergh
2023-03-14 10:56:42 +00:00
parent 59d69f7412
commit dfc69ddd76
57 changed files with 733 additions and 1116 deletions

View File

@@ -2,7 +2,6 @@ using System.Collections.Generic;
using System.Text.RegularExpressions;
using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
/// <summary>
@@ -80,12 +79,7 @@ public class UserCreationScreen : MonoBehaviour
// Set background color
background.color = selectedAvatar == i ? Color.blue : Color.gray;
// Find correct component for setting the sprite
foreach (Image img in background.GetComponentsInChildren<Image>())
if (img != background)
{
img.sprite = sprites[i];
break;
}
instance.transform.Find("Image").GetComponent<Image>().sprite = sprites[i];
}
}
@@ -123,8 +117,7 @@ public class UserCreationScreen : MonoBehaviour
{
// Create a new entry in the UserList ScriptableObject
users.ChangeCurrentUser(users.CreateAndAddNewUser(username, sprites[selectedAvatar]));
// TODO: change scene, for now just change to StartScreen
SceneManager.LoadScene("Common/Scenes/StartScreen");
SystemController.GetInstance().BackToPreviousScene();
}
// Warn user that username already exists
else