This commit is contained in:
Jonas Braus
2024-07-31 20:52:28 +02:00
parent b18dfee7dc
commit a4476f2ce2
6 changed files with 219 additions and 12 deletions
+10 -1
View File
@@ -10,6 +10,8 @@ extends CharacterBody2D
@onready var pipe_sound = $PipeSound
@onready var jump_sound = $JumpSound
@onready var shrink_sound = $shrinkSound
@onready var die_player = $diePlayer
@onready var music = %Music
const SPEED = 130.0
@@ -174,7 +176,14 @@ func shrink():
pipedetector_ground.position.y -= 8
shrink_sound.play()
else:
print("dead")
player_die()
func player_die():
die_player.play("die")
music.stop()
func reload_scene():
get_tree().reload_current_scene()
func increase_coins():
coins += 1