godot/demos/2d/space_shooter/rail.gd

20 lines
216 B
GDScript3
Raw Normal View History

extends Node2D
# Member variables
const SPEED = 200
var offset = 0
func stop():
set_process(false)
func _process(delta):
offset += delta*SPEED
set_pos(Vector2(offset, 0))
func _ready():
set_process(true)