Starting an inventory manager
This commit is contained in:
26
menus/scenes/overlaid_menus/InventoryUI.cs
Normal file
26
menus/scenes/overlaid_menus/InventoryUI.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user