level 4 a bowser
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
extends Area2D
|
||||
|
||||
@export var speed = 80
|
||||
@onready var audio_stream_player_2d = $AudioStreamPlayer2D
|
||||
|
||||
func _on_die_body_entered(body):
|
||||
queue_free()
|
||||
|
||||
func _physics_process(delta):
|
||||
position.x += speed * delta
|
||||
|
||||
|
||||
func _on_body_entered_player(body):
|
||||
body.shrink()
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_audio_stream_player_2d_finished():
|
||||
audio_stream_player_2d.play()
|
||||
Reference in New Issue
Block a user