test
This commit is contained in:
@@ -3,11 +3,14 @@ extends Area2D
|
||||
@export var load_level: String
|
||||
@onready var animation_player = $AnimationPlayer
|
||||
@onready var player = %player
|
||||
@onready var audio_stream_player = $AudioStreamPlayer
|
||||
@onready var music = %Music
|
||||
|
||||
|
||||
func _on_body_entered(body):
|
||||
animation_player.play("change_scene")
|
||||
player.on_pause = true
|
||||
music.stop()
|
||||
|
||||
func load_new_scene():
|
||||
get_tree().change_scene_to_file("res://scenes/levels/" + load_level + ".tscn")
|
||||
|
||||
@@ -80,8 +80,8 @@ func f_shrink(body):
|
||||
die_sound.play()
|
||||
if not is_down:
|
||||
speed = 0
|
||||
collision_shape_2d.shape.height -= 9
|
||||
die.position.y += 2
|
||||
#collision_shape_2d.shape.height -= 9
|
||||
#die.position.y += 2
|
||||
animated_sprite_2d.play("shrink")
|
||||
is_down = true
|
||||
elif speed == 0:
|
||||
|
||||
Reference in New Issue
Block a user