public CoresEmitterController(Transform barrel, Transform turret, CannonConfig config) { _barrel = barrel; _config = config; _turret = turret; _corePool = new Pool(new Factory(_config.CorePrefab), _config.PoolSize, NameManager.CANNON_CORE_ROOT); _coreControllers = new List <CoreController>(); }
public CoreController(Transform core, CannonConfig config) { _core = core; if (_core.TryGetComponent <TrailRenderer>(out var component)) { _trail = component; } _rigidbody = _core.gameObject.GetOrAddComponent <Rigidbody2D>(); _config = config; IsActive = false; }