My first 3D game with Godot 4.4

This commit is contained in:
2025-08-18 18:48:02 -04:00
commit aef6af1eca
89 changed files with 10495 additions and 0 deletions

17
player/cookie_3d.gd Normal file
View File

@@ -0,0 +1,17 @@
extends Area3D
var food_ready: bool = true
func _on_body_entered(body: Node3D) -> void:
if body.has_method("heal") and food_ready == true:
$cookie_model.visible = false
food_ready = false
body.heal()
%RespawnTimer.start()
else:
print(str(body) + " wants to eat a cookie, but doesn't know how!")
return
func _on_respawn_timer_timeout() -> void:
food_ready = true
$cookie_model.visible = true