DuckRun/scenes/hindernis/hindernis.gd

12 lines
202 B
GDScript3
Raw Normal View History

2024-10-01 15:56:30 +02:00
extends CharacterBody2D
@onready var speed = 0
func _ready() -> void:
$"Sprite".frame = randi_range(0,4)
func _process(delta: float) -> void:
speed = $"..".speed
global_position.x -= speed*delta