mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-05 20:35:55 +00:00
Lasers
This commit is contained in:
parent
95979bd3b8
commit
ba2f6a97fc
9 changed files with 254 additions and 26 deletions
|
|
@ -23,7 +23,9 @@ public partial class SpiralPattern : AttackPattern
|
|||
[Export] private BulletOwner owner = BulletOwner.Enemy;
|
||||
[Export] private DamageType _damageType = DamageType.Neutral;
|
||||
[Export] private float _bulletDamage = 1f;
|
||||
[ExportGroup("Modifiers")]
|
||||
[Export] private BulletCreationModifier _modifier;
|
||||
[ExportGroup("Modifiers")]
|
||||
[Export] private Array<TimeModifier> _timeModifiers;
|
||||
|
||||
[Export] private bool _targetPlayer = false;
|
||||
|
|
@ -55,29 +57,54 @@ public partial class SpiralPattern : AttackPattern
|
|||
direction = (Boss.GameManager.PlayerPosition.Value - Boss.GlobalPosition).Normalized();
|
||||
}
|
||||
|
||||
spawner.SpawnBullet(new BulletInfo()
|
||||
{
|
||||
Position = Boss.GlobalPosition,
|
||||
Direction = direction,
|
||||
Speed = bulletSpeed,
|
||||
Owner = owner,
|
||||
DamageType = _damageType,
|
||||
Damage = _bulletDamage,
|
||||
BulletCount = bulletCount,
|
||||
Spread = spread,
|
||||
BulletScene = BulletScene,
|
||||
RotationOffset = angleOffset,
|
||||
Modifier = _modifier,
|
||||
TimeModifiers = ((_timeModifiers?.Where(mod => mod != null)) ?? Array.Empty<TimeModifier>()).Select(m => new ModifierWrapper()
|
||||
spawner.SpawnBullet(MakeBullet(Boss.GlobalPosition, direction, angleOffset));
|
||||
|
||||
// spawner.SpawnBullet(new BulletInfo()
|
||||
// {
|
||||
// Position = Boss.GlobalPosition,
|
||||
// Direction = direction,
|
||||
// Speed = bulletSpeed,
|
||||
// Owner = owner,
|
||||
// DamageType = _damageType,
|
||||
// Damage = _bulletDamage,
|
||||
// BulletCount = bulletCount,
|
||||
// Spread = spread,
|
||||
// BulletScene = BulletScene,
|
||||
// RotationOffset = angleOffset,
|
||||
// Modifier = _modifier,
|
||||
// TimeModifiers = ((_timeModifiers?.Where(mod => mod != null)) ?? Array.Empty<TimeModifier>()).Select(m => new ModifierWrapper()
|
||||
// {
|
||||
// TimeModifier = m,
|
||||
// Applied = false
|
||||
// }).ToList()
|
||||
// });
|
||||
|
||||
burstTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual BulletInfo MakeBullet(Vector2 position, Vector2 direction, float angleOffset)
|
||||
{
|
||||
return new BulletInfo()
|
||||
{
|
||||
Position = position,
|
||||
Direction = direction,
|
||||
Speed = bulletSpeed,
|
||||
Owner = owner,
|
||||
DamageType = _damageType,
|
||||
Damage = _bulletDamage,
|
||||
BulletCount = bulletCount,
|
||||
Spread = spread,
|
||||
BulletScene = BulletScene,
|
||||
RotationOffset = angleOffset,
|
||||
Modifier = _modifier,
|
||||
TimeModifiers = ((_timeModifiers?.Where(mod => mod != null)) ?? Array.Empty<TimeModifier>()).Select(m =>
|
||||
new ModifierWrapper()
|
||||
{
|
||||
TimeModifier = m,
|
||||
Applied = false
|
||||
}).ToList()
|
||||
});
|
||||
|
||||
// spawner.SpawnSpiralPattern(Boss.GlobalPosition, bulletSpeed, owner, bulletCount, rotationSpeed, timer, spread, BulletScene);
|
||||
burstTimer = 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public override bool IsComplete()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue