Starting an inventory manager
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
using Godot;
|
||||
using Movementtests.managers;
|
||||
using Movementtests.systems;
|
||||
|
||||
[Tool, GlobalClass, Icon("res://assets/ui/IconGodotNode/control/icon_crate.png")]
|
||||
public partial class Inventory : Control
|
||||
public partial class InventoryUI : Control
|
||||
{
|
||||
public PlayerController? Player { get; set; }
|
||||
|
||||
private AbilitySelection _startedFlyingSelection;
|
||||
private AbilitySelection _whileFlyingSelection;
|
||||
private AbilitySelection _stoppedFlyingSelection;
|
||||
@@ -22,7 +21,6 @@ public partial class Inventory : Control
|
||||
|
||||
public void AddAbilityForEvent(WeaponSystem.WeaponEvent forEvent, string abilityName)
|
||||
{
|
||||
if (Player is null) return;
|
||||
Player.GrantWeaponExplosionAbilityForEvent(forEvent, abilityName);
|
||||
InventoryManager.Instance.AddAbilityForWeaponEvent(forEvent, abilityName);
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,10 @@
|
||||
class_name InventoryWrapper
|
||||
extends OverlaidMenu
|
||||
|
||||
@export var player: PlayerController
|
||||
|
||||
@onready var inventory: Control = %Inventory
|
||||
|
||||
func _ready() -> void:
|
||||
if Engine.is_editor_hint(): return
|
||||
inventory.Player = player
|
||||
|
||||
func _on_close_button_pressed() -> void:
|
||||
close()
|
||||
|
||||
Reference in New Issue
Block a user