Made windowspawner keep track of spawned window count

This commit is contained in:
2026-01-19 20:22:35 +00:00
parent e636e28d3a
commit 6c3e7ca111
6 changed files with 18 additions and 18 deletions

View File

@@ -5,14 +5,16 @@ namespace InterfaceOff
{
public abstract class WindowBase : MonoBehaviour
{
private WindowSpawner Creator;
public WindowInteractions Interactions { get; set; }
public WindowComponents Components { get; set; }
protected Vector2 Velocity;
public void InstantiateWindowBase()
public void InstantiateWindowBase(WindowSpawner creator)
{
transform.position = CanvasManager.GetRandomPositionOnCanvas();
Creator = creator;
OnWindowInstantiation();
}
@@ -60,6 +62,7 @@ namespace InterfaceOff
protected void DestroyWindow()
{
Creator.AlertOfDespawnedWindow();
Destroy(gameObject);
}
}