2015-06-11 12:55:38 +00:00
|
|
|
|
|
|
|
extends Node2D
|
|
|
|
|
2015-11-21 15:13:43 +00:00
|
|
|
# Member variables
|
|
|
|
const SPEED = 200
|
|
|
|
var offset = 0
|
2015-06-11 12:55:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
func stop():
|
|
|
|
set_process(false)
|
|
|
|
|
|
|
|
|
|
|
|
func _process(delta):
|
2015-11-21 15:13:43 +00:00
|
|
|
offset += delta*SPEED
|
|
|
|
set_pos(Vector2(offset, 0))
|
|
|
|
|
2015-06-11 12:55:38 +00:00
|
|
|
|
|
|
|
func _ready():
|
2015-11-21 15:13:43 +00:00
|
|
|
set_process(true)
|