Initial commit
This commit is contained in:
commit
a0b34dd454
54 changed files with 1826 additions and 0 deletions
16
scripts/kill_zone.gd
Normal file
16
scripts/kill_zone.gd
Normal 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()
|
Loading…
Add table
Add a link
Reference in a new issue