2024-10-18 16:34:51 +02:00
|
|
|
extends Sprite2D
|
|
|
|
|
|
|
|
signal screen_entered
|
|
|
|
|
|
|
|
var speed: float
|
|
|
|
|
|
|
|
func _ready() -> void:
|
|
|
|
pass
|
|
|
|
|
2024-11-10 19:51:00 +01:00
|
|
|
func _process(delta: float) -> void:
|
2024-10-18 16:34:51 +02:00
|
|
|
if $"/root/Global".gamerunning:
|
2024-11-10 19:51:00 +01:00
|
|
|
print("ahhhh")
|
2024-10-18 16:34:51 +02:00
|
|
|
global_position.x -= $"/root/Global".speed*delta
|
|
|
|
|
|
|
|
|
|
|
|
func screen_e() -> void:
|
|
|
|
screen_entered.emit()
|
|
|
|
|
|
|
|
func screen_exited() -> void:
|
|
|
|
queue_free()
|