Am I punching trees or pounding sand?

This commit is contained in:
2025-11-05 13:48:01 +11:00
parent b65134d283
commit cb85608dfe
5 changed files with 34 additions and 7 deletions

View File

@@ -3,9 +3,9 @@ extends Area2D
var _durability: int = 3
func _on_body_entered(body: Node2D) -> void:
if body is CharacterBody2D:
if body is Character:
_durability -= 1
body.repel_collision(self)
if _durability <= 0:
print("tree dead")
Inventory.add_item(Inventory.Wood.new())
queue_free()