👩‍💼Factory Manager

v1.0

The Factory Manager is a static ScriptableObject which means it will be active in your game without needing to be placed in your scenes.

Each ProjectileSpawner and each Projectile will register with the FactoryManager OnEnable() and unregister OnDisable().

The Factory Manager will maintain a List<> of each of these objects, which you can access from other scripts.

Individual objects have the option to not register, so the List<> available is not guaranteed to be all objects.

public static List<ProjectileSpawner> ProjectileSpawners { get; } = new List<ProjectileSpawner>();
public static List<Projectile> Projectiles { get; } = new List<Projectile>();

Global Observers

Global Observers automatically subscribe to the Factory Manager events. Each time a Projectile event is fired, the FactoryManager will repeat this event to all subscribed Global Observers.

Last updated