Added serilizable field so we can adjust max spawning in unity.
maxObjectCount and currentObjectCount that incements when objects are spawned and decrements when objects are destroyed.
A SetSpawner() method is added to AbstractObject to assign the Spawner reference.
The OnDestroy() method in AbstractObject calls OnObjectDestroyed() from the spawner when the object is destroyed.
When spawning an object in Spawner, the reference to Spawner is passed to the new object.
Describe your changes
Issue ticket number and link
Added serilizable field so we can adjust max spawning in unity.
maxObjectCount and currentObjectCount that incements when objects are spawned and decrements when objects are destroyed. A SetSpawner() method is added to AbstractObject to assign the Spawner reference. The OnDestroy() method in AbstractObject calls OnObjectDestroyed() from the spawner when the object is destroyed. When spawning an object in Spawner, the reference to Spawner is passed to the new object.