Floppy_Bort/scenes/cloud/cloud.gd

16 lines
370 B
GDScript3
Raw Normal View History

2025-02-11 19:47:33 +01:00
extends Sprite2D
var speed:int
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
frame = randi_range(0,3)
var sc = randi_range(1,6)
scale = Vector2(sc,sc)
speed = randi_range(-1,-4)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
global_position.x += speed