Made windowspawner keep track of spawned window count
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user