// Start is called before the first frame update void Start() { if (!inventory) { inventory = GameObject.FindGameObjectWithTag("Player").GetComponent <OAPlayerInventory>(); } foreach (var child in children) { child.Master = this; } }
void Start() { if (!inventory) { inventory = GameObject.FindGameObjectWithTag("Player").GetComponent <OAPlayerInventory>(); } spawnArea = GetComponent <BoxCollider2D>(); spawner.OnEradicated.AddListener(OnHighTide); tide.OnHighTide.AddListener(OnHighTide); tide.OnLowTide.AddListener(DespawnAll); if (spawnOnStart) { OnHighTide(); } }