summaryrefslogtreecommitdiff
path: root/demos/2d/space_shooter/rail.gd
blob: 7362dff97d8f92165916ce895d9dd3317bd5f484 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

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)