public PrefabFactory(IServices services, IPrefabReferences prefabs) { this.services = services; cache = new Dictionary <string, GameObject>(); CacheObjects(prefabs); pool = new PrefabPool(); }
public void Intialize(float minSpeed, float maxSpeed, float spawnPointX, float spawnPointY, float spawnDelay, IPrefabPool pool) { this.minSpeed = minSpeed; this.maxSpeed = maxSpeed; this.spawnPointX = spawnPointX; this.spawnPointY = spawnPointY; this.spawnDelay = spawnDelay; this.pool = pool; }
/// <summary> /// Sets a custom implementation for pooling prefabs /// </summary> public static void SetPrefabPool(IPrefabPool pool) { if (pool == null) { throw new ArgumentNullException("pool"); } Core.PrefabPool = pool; }
public static void Add(IPrefabPool edit, int count) { Instance._Add(new Data(edit, count)); }
public Data(IPrefabPool target, int count) { this.poolData = target; this.count = count; }