Added 3d pseduo canvas

This commit is contained in:
Pasha Bibko
2026-01-20 13:59:02 +00:00
parent bc1c12d97b
commit fe2a5179ee
6 changed files with 411 additions and 9 deletions

View File

@@ -20,6 +20,7 @@ namespace InterfaceOff
[field: SerializeField] private Canvas GameCanvas { get; set; }
[field: SerializeField] private GameObject DeathInfo { get; set; }
[field: SerializeField] private SpawnableWindowType[] WindowTypes { get; set; }
[field: SerializeField] private GameObject Parent { get; set; }
private int TotalSpawnWeight { get; set; }
[field: SerializeField] public int SpawnedWindowCount { get; private set; }
@@ -63,7 +64,7 @@ namespace InterfaceOff
private void SpawnNewRandomWindow()
{
/* Creates the gameobject with a random class */
GameObject go = Instantiate(SampleChild, GameCanvas.transform);
GameObject go = Instantiate(SampleChild, Parent.transform);
go.SetActive(true);
Type type = GetRandomWindowType();
@@ -121,7 +122,7 @@ namespace InterfaceOff
{
/* Destroys all children and stops them from spawning */
AutoSpawn = false;
foreach (Transform child in GameCanvas.transform)
foreach (Transform child in Parent.transform)
{
WindowBase window = child.GetComponent<WindowBase>();
if (DebugUtils.IsNotNull(window))