Starting an inventory manager

This commit is contained in:
2026-04-20 11:41:22 +02:00
parent f9ca56e34a
commit 667d6b2588
9 changed files with 57 additions and 20 deletions

View File

@@ -0,0 +1,26 @@
using Godot;
using Movementtests.managers;
using Movementtests.systems;
[Tool, GlobalClass, Icon("res://assets/ui/IconGodotNode/control/icon_crate.png")]
public partial class InventoryUI : Control
{
private AbilitySelection _startedFlyingSelection;
private AbilitySelection _whileFlyingSelection;
private AbilitySelection _stoppedFlyingSelection;
public override void _Ready()
{
_startedFlyingSelection = GetNode<AbilitySelection>("%StartedFlying");
_whileFlyingSelection = GetNode<AbilitySelection>("%WhileFlying");
_stoppedFlyingSelection = GetNode<AbilitySelection>("%StoppedFlying");
_startedFlyingSelection.AbilityAdded += AddAbilityForEvent;
_whileFlyingSelection.AbilityAdded += AddAbilityForEvent;
_stoppedFlyingSelection.AbilityAdded += AddAbilityForEvent;
}
public void AddAbilityForEvent(WeaponSystem.WeaponEvent forEvent, string abilityName)
{
InventoryManager.Instance.AddAbilityForWeaponEvent(forEvent, abilityName);
}
}