Added 3d pseduo canvas
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user