Grazing for shields

This commit is contained in:
Marco 2025-04-01 15:46:25 +02:00
commit 8b28805cbd
22 changed files with 554 additions and 9 deletions

View file

@ -20,6 +20,8 @@ public partial class BulletResource : Resource
[Export] public BulletOwner Owner = BulletOwner.None;
[Export] public DamageType DamageType = DamageType.Neutral;
[Export] public bool Controllable = false;
[Export] public bool Grazeable { get; set; } = true;
[Export] public float GrazeValue { get; set; } = 1f;
[Export]
public BulletCreationModifier Modifier;
@ -44,7 +46,9 @@ public partial class BulletResource : Resource
DestroyOnCollision = DestroyOnCollision,
DestructionParticlesScene = DestructionParticlesScene,
Controllabe = Controllable,
TimeModifiers = TimeModifiers.Select(x => x).ToList()
TimeModifiers = TimeModifiers.Select(x => x).ToList(),
Grazeable = Grazeable,
GrazeValue = GrazeValue,
// TimeModifiers = TimeModifiers?.Where(mod => mod is TimeModifier).Cast<TimeModifier>().Select(m => new ModifierWrapper()
// {
// TimeModifier = m,