public AttackInitialization(Transform transform, SpaceshipData spaceshipData, BulletData bulletData) { var barrel = new ShotPoint(transform, spaceshipData); _shotPoint = barrel.GetShotPoint(); var bulletFactory = new BulletFactory(bulletData); _inputAttackController = new InputAttackController(bulletFactory, bulletData, bulletData); }
public BulletPool(BulletFactory bulletFactory, int capacityPool) { _bulletPool = new Dictionary <string, HashSet <Rigidbody2D> >(); _bulletInitialization = new BulletInitialization(bulletFactory); _capacityPool = capacityPool; if (!_rootPool) { _rootPool = new GameObject(POOL_AMMUNITION).transform; } }
public InputAttackController(BulletFactory bulletFactory, IForce force, IPoolSize poolSize) { _force = force; _capacityPool = poolSize; _bulletPool = new BulletPool(bulletFactory, _capacityPool.PoolSize); }