19 lines
402 B
GDScript3
19 lines
402 B
GDScript3
|
extends Node2D
|
||
|
|
||
|
@export var move_speed: int
|
||
|
signal pipe_collision
|
||
|
|
||
|
# Called when the node enters the scene tree for the first time.
|
||
|
func _ready():
|
||
|
pass # Replace with function body.
|
||
|
|
||
|
|
||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||
|
func _process(delta):
|
||
|
global_translate(Vector2.LEFT * move_speed * delta)
|
||
|
pass
|
||
|
|
||
|
|
||
|
func _on_pipe_body_entered(_body):
|
||
|
pipe_collision.emit()
|