This commit is contained in:
2024-09-08 02:00:18 -07:00
parent 5240fd5f92
commit 29a6d1072c
36 changed files with 1194 additions and 203 deletions

View File

@@ -19,8 +19,14 @@ public partial class Armor : InventoryItem
Pickup.BodyEntered += OnEntered;
}
public void OnEntered(Node3D body)
public void OnEntered(Node body)
{
if (GameRepo.InventoryItems.Value.Count() >= GameRepo.MaxItemSize)
{
AnimationPlayer.Play("drop");
return;
}
var inventoryList = GameRepo.InventoryItems.Value.Append(this).ToList();
GameRepo.InventoryItems.OnNext(inventoryList);
QueueFree();