Added player damage, invulnerability frames, knockback, and death handling. Enemies stop attacking after player death and player controls are disabled. Added a persistent three-life system with ambulance cutscenes after the first two deaths and a final Game Over cutscene after the third death.
14 lines
368 B
GDScript
14 lines
368 B
GDScript
extends Control
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
pass # Replace with function body.
|
|
|
|
|
|
|
|
func _on_video_stream_player_finished() -> void:
|
|
print("AMBULANCE VIDEO FINISHED")
|
|
Gamecontroller.playerHealth = Gamecontroller.player.starting_health
|
|
get_tree().change_scene_to_file("res://Scenes/Levels/MainGame.tscn")
|