Fix restorative

This commit is contained in:
2026-02-12 23:28:51 -08:00
parent 9615e1e251
commit 68b1455c53
8 changed files with 34 additions and 27 deletions

View File

@@ -770,7 +770,7 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
_playerEffectService.Instakill(enemy);
}
private void CollisionDetector_AreaEntered(Area3D area)
private async void CollisionDetector_AreaEntered(Area3D area)
{
if (area.GetParent() is InventoryItem inventoryItem)
{
@@ -792,6 +792,9 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
}
if (area.GetParent() is Restorative restorative)
{
await ToSignal(GetTree().CreateTimer(0.2f), "timeout");
VTComponent.Restore(restorative.RestoreAmount);
SfxDatabase.Instance.Play(SoundEffect.HealVT);
restorative.QueueFree();
}
}

View File

@@ -1356,7 +1356,7 @@ tracks/3/keys = {
[sub_resource type="Animation" id="Animation_jhq84"]
resource_name = "Rondo"
length = 1.23334
length = 1.26667
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
@@ -1376,10 +1376,10 @@ tracks/1/path = NodePath("SubViewportContainer/SubViewport/WeaponAttack:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 1.23333),
"times": PackedFloat32Array(0, 1.26667),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0, 37]
"values": [0, 38]
}
tracks/2/type = "value"
tracks/2/imported = false
@@ -7929,6 +7929,9 @@ animations = [{
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_y8v4x")
}, {
"duration": 1.0,
"texture": null
}],
"loop": false,
"name": &"Rondo",