canto/Assets/Scripts/UI/TestThing.cs
2025-07-19 23:42:43 -04:00

41 lines
824 B
C#

using UnityEngine;
namespace KitsuneCafe.UI
{
public class TestThing : MonoBehaviour
{
[SerializeField]
private UiOrchestrator orchestrator;
[SerializeField]
private ModalElement modal;
private ElementId id;
public void Open()
{
id = orchestrator.SpawnElement(modal.Create("<3", "fuck !!!! :3"), transform.position + (Vector3.up * 2));
}
public void Close()
{
if (id != default)
{
orchestrator.DespawnElement(id);
id = default;
}
}
public void Toggle()
{
if (id != default)
{
Close();
}
else
{
Open();
}
}
}
}