示例#1
0
 public EnemySpawner(UnityPoolManager <Enemy, EnemyView> enemyPool, AsyncProcessor asyncProcessor,
                     Settings settings, IScreenSize screenSize, Camera camera, IElementSize size)
 {
     _enemyPool                  = enemyPool;
     _asyncProcessor             = asyncProcessor;
     _settings                   = settings;
     _camera                     = camera;
     _size                       = size;
     screenSize.ChangeSizeEvent += ScreenSizeChange;
     ScreenSizeChange(screenSize.Size);
     asyncProcessor.StartCoroutine(SpawnPoint());
     asyncProcessor.StartCoroutine(SpawnDamage());
 }
 protected virtual void Awake()
 {
     Instance    = this;
     PoolManager = new PoolManager <string, UnityPoolObject>(MaxInstanceCount);
 }
示例#3
0
 public override void Push()
 {
     UnityPoolManager.Push(this, Transform.parent);
 }