various updates

This commit is contained in:
Tabby 2025-05-23 21:36:52 +10:00
parent 8d6da7bf7e
commit 43b52fcea9
17 changed files with 244 additions and 109 deletions

View file

@ -3,6 +3,12 @@ extends Node
signal game_win
signal game_lose
@export var ufo_speed : float = 0.1
@export_group("Node References")
@export var ufo_path : PathFollow2D
var ufo_progress : float
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
@ -10,4 +16,13 @@ func _ready() -> void:
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
ufo_progress += delta * ufo_speed
ufo_path.progress_ratio = ufo_progress
if ufo_progress >= 1:
print("invaders lose")
game_lose.emit()
func _on_ufo_area_entered(area: Area2D) -> void:
print("invaders win")
game_win.emit()