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

20
game.gd Normal file
View File

@@ -0,0 +1,20 @@
extends Node3D
@onready var score_label: Label = %ScoreLabel
var score = 0
func increase_score():
score += 1
score_label.text = "Score: " + str(score)
func _on_mob_spawner_3d_mob_spawned(mob: Node) -> void:
if mob.has_signal("died"):
mob.died.connect(increase_score)
else:
print("this mob cannot die! (probably a bug)")
func _on_kill_plane_body_entered(body: Node3D) -> void:
print("kill plane triggered")
get_tree().reload_current_scene.call_deferred()