public BonusFire() : base(Data.Instance.BonusFireData) { _bonusFireData = Data.Instance.BonusFireData; _bulletCount = _bonusFireData.BulletCount; _prefab = _bonusFireData.Prefab; _rotation = new Quaternion(); _bullet = new BonusBullet(); }
public void Spawn(Transform transform, Quaternion quaternion) { _bullet = Transform.Instantiate(_prefab, transform.position, quaternion); BonusBullet BonusBullet = new BonusBullet(); BonusBullet = this; Services.Instance.LevelService.ActiveBonusBullet.Add(BonusBullet); _lifeTimer.AddTimeRemaining(); }
public override void Use() { base.Use(); for (int i = 0; i < _bulletCount; i++) { _rotation = Quaternion.Euler(0, 90 + i * 5, 0); _bullet = new BonusBullet(); _bullet.Spawn(GetTransform(), _rotation); } }