private String ExecuteFiringSequence(IFireSequence sequence) { String msg = "Shots fired: "; sequence.Launch(map); msg = map.FiredShotsResults(); map.resetResults(); Console.WriteLine(msg); return msg; }
private void Awake() { _muzzles = GetMuzzles(); _fireParticles = GetFireParticles(_muzzles); _fireAnimation = GetComponent <IFireAnimation>() ?? new NoFireAnimation(); _fireControl = GetComponent <IFireSequence>() ?? new InstantFireSequence(); _fireSync = GetComponent <IFireControl>() ?? new NoFireControl(); _pool = new NoGameObjectPool <IProjectile>(ProjectilePrefab); _projectilePool = new ProjectilePool(_pool); _pool.OnNew += OnNewProjectile; if (isActiveAndEnabled) { _chambered = false; StartCoroutine(Rechamber(Cooldown)); } }