1
Fork 0
mirror of https://github.com/Steffo99/pineapple-surf.git synced 2024-11-22 15:54:20 +00:00
pineapple-surf/player/SplashController.gd

14 lines
302 B
GDScript3
Raw Normal View History

2023-01-07 18:23:07 +00:00
extends Node
@onready var player: Node3D = $".."
@onready var spawn_point: Vector3 = player.position
@onready var splash_sound: AudioStreamPlayer = $SplashSound
func _process(_delta):
if player.position.y < 0:
splash_sound.play()
player.position = spawn_point
2023-01-08 13:48:47 +00:00
player.velocity = Vector3.ZERO