Throwable item rework, increase health on timer timeout, add boss 1 model

This commit is contained in:
2024-09-22 23:05:33 -07:00
parent f490a390aa
commit 59390c04bf
44 changed files with 3373 additions and 101 deletions

View File

@@ -5,7 +5,7 @@ using Godot;
using System;
[Meta(typeof(IAutoNode))]
public partial class ThrowableItem : Node3D, IInventoryItem
public partial class ThrowableItem : Node3D, IUsableItem
{
public override void _Notification(int what) => this.Notify(what);
@@ -32,6 +32,14 @@ public partial class ThrowableItem : Node3D, IInventoryItem
Pickup.BodyEntered += OnEntered;
}
public void Use()
{
if (ThrowableItemInfo.HealHPAmount > 0)
Game.HealHP(ThrowableItemInfo.HealHPAmount);
if (ThrowableItemInfo.HealVTAmount > 0)
Game.HealVT(ThrowableItemInfo.HealVTAmount);
}
public void OnEntered(Node3D body)
{
var isAdded = GameRepo.PlayerData.Inventory.TryAdd(this);