mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-09 19:55:54 +00:00
Made bullet creation modifier generics
This commit is contained in:
parent
9ae07e5b38
commit
797e24d766
7 changed files with 46 additions and 10 deletions
|
|
@ -19,7 +19,7 @@ public partial class BulletResource : Resource
|
|||
[Export] public DamageType DamageType = DamageType.Neutral;
|
||||
|
||||
[Export]
|
||||
public Resource Modifier;
|
||||
public BulletCreationModifier Modifier;
|
||||
[Export] public Array<Resource> TimeModifiers;
|
||||
|
||||
public BulletInfo MakeBullet(Vector2 position, int count = 1, float spread = 0f, float rotationOffset = 0f)
|
||||
|
|
@ -36,7 +36,7 @@ public partial class BulletResource : Resource
|
|||
Spread = spread,
|
||||
BulletScene = BulletScene,
|
||||
RotationOffset = rotationOffset,
|
||||
Modifier = Modifier as IBulletModifier,
|
||||
Modifier = Modifier,
|
||||
LifeTime = LifeTime,
|
||||
DestructionParticlesScene = DestructionParticlesScene,
|
||||
TimeModifiers = TimeModifiers?.Where(mod => mod is TimeModifier).Cast<TimeModifier>().ToList() ??
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue