LobbyUI 구조 수정

This commit is contained in:
aube.lee
2025-02-14 11:19:02 +09:00
parent d8af30673a
commit 3cf6b5a11b
13 changed files with 1380 additions and 7 deletions

View File

@@ -2,13 +2,13 @@ using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.Assertions;
using UnityEngine.UI;
namespace TON
{
public class LobbyUI : UIBase
{
public SerializableDictionary<string, Sprite> playerImages;
[SerializeField]
private TextMeshProUGUI characterName;
[SerializeField]
@@ -24,9 +24,10 @@ namespace TON
private void Start()
{
Image playerObj = GameObject.Find("TON.Player").GetComponent<Image>();
PlayerData player = PlayerDataManager.Singleton.player;
playerObj.sprite = playerImages.GetValueOrDefault(player.type);
Image playerObj = GameObject.Find("TON.Player").GetComponent<Image>();
playerObj.sprite = AssetManager.Singleton.LoadPlayerIcon(player.type, out Sprite playerImage) ? playerImage : null;
characterName.text = player.name;
characterHp.text = $"{player.hp}";

View File

@@ -0,0 +1,11 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace TON
{
public class LobbyUI_StagePage : MonoBehaviour
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 20a9f61ddd2bf77478b2a76ca955e678
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: