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); }
public override void Push() { UnityPoolManager.Push(this, Transform.parent); }