Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 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;
     }
 }
Exemplo n.º 3
0
 public InputAttackController(BulletFactory bulletFactory, IForce force, IPoolSize poolSize)
 {
     _force        = force;
     _capacityPool = poolSize;
     _bulletPool   = new BulletPool(bulletFactory, _capacityPool.PoolSize);
 }