My first 2D game in Godot 4.4

This commit is contained in:
2025-08-18 19:39:33 -04:00
commit 35600f72f9
83 changed files with 2512 additions and 0 deletions

24
survivors_game.gd Normal file
View File

@@ -0,0 +1,24 @@
extends Node2D
func _ready():
spawn_monster()
spawn_monster()
spawn_monster()
spawn_monster()
spawn_monster()
%SpawnTimer.start()
func spawn_monster():
var new_monster = preload("res://monster.tscn").instantiate()
%PathFollow2D.progress_ratio = randf()
new_monster.global_position = %PathFollow2D.global_position
add_child(new_monster)
func _on_spawn_timer_timeout() -> void:
spawn_monster()
func _on_player_health_depleted() -> void:
%GameoverCanvasLayer.visible = true
get_tree().paused = true