summaryrefslogtreecommitdiff
path: root/demos/2d/space_shooter/rail.gd
blob: a9559806cb8eba57bf21b519311e1847d35c6286 (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_fixed_process(false)


func _fixed_process(delta):
	offset += delta*SPEED
	set_pos(Vector2(offset, 0))


func _ready():
	set_fixed_process(true)