diff options
Diffstat (limited to 'demos/2d/space_shooter/rail.gd')
-rw-r--r-- | demos/2d/space_shooter/rail.gd | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/demos/2d/space_shooter/rail.gd b/demos/2d/space_shooter/rail.gd new file mode 100644 index 0000000000..22ebd02670 --- /dev/null +++ b/demos/2d/space_shooter/rail.gd @@ -0,0 +1,25 @@ + +extends Node2D + + +const SPEED=200 +# member variables here, example: +# var a=2 +# var b="textvar" + +func stop(): + set_process(false) + +var offset=0 + + +func _process(delta): + offset+=delta*SPEED + set_pos(Vector2(offset,0)) + +func _ready(): + set_process(true) + # Initialization here + + + |