Initial commit

This commit is contained in:
ItsDrike 2025-02-27 23:50:12 +01:00
commit a0b34dd454
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
54 changed files with 1826 additions and 0 deletions

16
scripts/kill_zone.gd Normal file
View file

@ -0,0 +1,16 @@
extends Area2D
@onready var timer: Timer = $Timer
@onready var hurt_audio_player: AudioStreamPlayer2D = $HurtAudioPlayer
func _on_body_entered(body: Node2D) -> void:
# Slow down everything
Engine.time_scale = 0.5
# Remove the player's collider, making them fall through the map
body.get_node("CollisionShape2D").queue_free()
hurt_audio_player.play()
timer.start()
func _on_timer_timeout() -> void:
Engine.time_scale = 1
get_tree().reload_current_scene()