made the initial inventory loadout into a resource to initialize the injected dependency with
This commit is contained in:
22
managers/WeaponInventory.cs
Normal file
22
managers/WeaponInventory.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
||||
using Godot;
|
||||
|
||||
namespace Movementtests.managers;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class WeaponInventory(
|
||||
ForgeAbilityBehavior[] onWeaponStartedFlyingAbilities,
|
||||
ForgeAbilityBehavior[] onWeaponFlyingTickAbilities,
|
||||
ForgeAbilityBehavior[] onWeaponStoppedFlyingAbilities
|
||||
) : Resource
|
||||
{
|
||||
[Export]
|
||||
public ForgeAbilityBehavior[] OnWeaponStartedFlyingAbilities { get; set; } = onWeaponStartedFlyingAbilities;
|
||||
[Export]
|
||||
public ForgeAbilityBehavior[] OnWeaponFlyingTickAbilities { get; set; } = onWeaponFlyingTickAbilities;
|
||||
[Export]
|
||||
public ForgeAbilityBehavior[] OnWeaponStoppedFlyingAbilities { get; set; } = onWeaponStoppedFlyingAbilities;
|
||||
|
||||
public WeaponInventory() : this([], [], []) {}
|
||||
}
|
||||
Reference in New Issue
Block a user