mirror of
https://github.com/MoonlitJolteon/crasher-sidescroller.git
synced 2025-11-01 13:10:21 +00:00
13 lines
257 B
GDScript
13 lines
257 B
GDScript
extends Node2D
|
|
|
|
@onready var world: CanvasGroup = $CanvasGroup
|
|
|
|
@onready var player: CharacterBody2D = $Player
|
|
|
|
func _process(delta: float) -> void:
|
|
|
|
world.position.x -= player.ground_speed.x * delta
|
|
|
|
if world.position.x < -2000:
|
|
world.position.x = 0
|