말풍선 set 오류 수정

This commit is contained in:
NTG 2025-08-29 19:35:52 +09:00
parent 0be6cb6059
commit 909a0382e9

View File

@ -17,13 +17,19 @@ public class SpeechBubble : MonoBehaviour, ISpeechBubble
private void Start() private void Start()
{ {
SetImage((Sprite)null);
HidePanel(); HidePanel();
} }
private void ShowPanel() => _panel.SetActive(true); private void ShowPanel() => _panel.SetActive(true);
private void HidePanel() => _panel.SetActive(false); private void HidePanel() => _panel.SetActive(false);
public void SetImage(Sprite sprite) => _itemImage.sprite = sprite; public void SetImage(Sprite sprite) => _itemImage.sprite = sprite;
public void SetImage(string key) => DataManager.Instance.GetSprite(key);
public void SetImage(string key)
{
var sprite = DataManager.Instance.GetSprite(key);
SetImage(sprite);
}
public void Show(Sprite sprite) public void Show(Sprite sprite)
{ {