Ejemplo n.º 1
0
        public PrefabFactory(IServices services, IPrefabReferences prefabs)
        {
            this.services = services;

            cache = new Dictionary <string, GameObject>();
            CacheObjects(prefabs);
            pool = new PrefabPool();
        }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
        /// <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;
        }
Ejemplo n.º 4
0
 public static void Add(IPrefabPool edit, int count)
 {
     Instance._Add(new Data(edit, count));
 }
Ejemplo n.º 5
0
 public Data(IPrefabPool target, int count)
 {
     this.poolData = target;
     this.count    = count;
 }