19 lines
421 B
GDScript3
19 lines
421 B
GDScript3
|
|
extends Camera2D
|
||
|
|
|
||
|
|
@export var camera_speed : float = 10
|
||
|
|
var active : bool = false
|
||
|
|
|
||
|
|
# Called when the node enters the scene tree for the first time.
|
||
|
|
func _ready() -> void:
|
||
|
|
pass # Replace with function body.
|
||
|
|
|
||
|
|
|
||
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||
|
|
func _process(delta: float) -> void:
|
||
|
|
if active:
|
||
|
|
position.x += delta * camera_speed
|
||
|
|
|
||
|
|
|
||
|
|
func _on_lander_moved() -> void:
|
||
|
|
active = true
|