Resolve WES-99 "Cc refactor"
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user