using UnityEngine;
using TMPro;
using System.Collections.Generic;
public class UIManager : MonoBehaviour
{
public SpawnManager spawnManager;
public TextMeshProUGUI currentEntityDataText;
public TextMeshProUGUI existingEntityDataText;
public void Update()
{
UpdateCurrentEntityDataUI();
UpdateExistingEntityDataUI();
}
public void UpdateCurrentEntityDataUI()
{
currentEntityDataText.text = "Current Data: \\n";
for (int i = 0; i < spawnManager.currentlySpawnedEntities.Count; i++)
{
EntityData entityData = spawnManager.currentlySpawnedEntities[i];
currentEntityDataText.text += $"Name: {entityData.npcName}, Tool: {entityData.selectedItem}\\n";
}
}
public void UpdateExistingEntityDataUI()
{
existingEntityDataText.text = "Existing Data: \\n";
for (int i = 0; i < spawnManager.existingSpawnedEntities.Count; i++)
{
EntityData entityData = spawnManager.existingSpawnedEntities[i];
existingEntityDataText.text += $"Name: {entityData.npcName}, Tool: {entityData.selectedItem}\\n";
}
}
}