mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-11 04:25:55 +00:00
Changed casting for timemodifiers
This commit is contained in:
parent
efd6283487
commit
c318bd8c13
7 changed files with 15 additions and 18 deletions
|
|
@ -20,7 +20,7 @@ public partial class BulletResource : Resource
|
|||
|
||||
[Export]
|
||||
public BulletCreationModifier Modifier;
|
||||
[Export] public Array<Resource> TimeModifiers;
|
||||
[Export] public Array<TimeModifier> TimeModifiers;
|
||||
|
||||
public BulletInfo MakeBullet(Vector2 position, int count = 1, float spread = 0f, float rotationOffset = 0f)
|
||||
{
|
||||
|
|
@ -39,11 +39,12 @@ public partial class BulletResource : Resource
|
|||
Modifier = Modifier,
|
||||
LifeTime = LifeTime,
|
||||
DestructionParticlesScene = DestructionParticlesScene,
|
||||
TimeModifiers = TimeModifiers?.Where(mod => mod is TimeModifier).Cast<TimeModifier>().Select(m => new ModifierWrapper()
|
||||
{
|
||||
TimeModifier = m,
|
||||
Applied = false
|
||||
}).ToList()
|
||||
TimeModifiers = TimeModifiers.ToList()
|
||||
// TimeModifiers = TimeModifiers?.Where(mod => mod is TimeModifier).Cast<TimeModifier>().Select(m => new ModifierWrapper()
|
||||
// {
|
||||
// TimeModifier = m,
|
||||
// Applied = false
|
||||
// }).ToList()
|
||||
// TimeModifiers = TimeModifiers?.Select(x => new ModifierWrapper()
|
||||
// {
|
||||
// Applied = false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue