summaryrefslogtreecommitdiff
path: root/demos/2d/motion/motion.gd
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-03 10:30:38 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-06-03 10:30:38 -0300
commitc7d45ec085086ab86192a7890b9622320d57b89d (patch)
tree0a764a6a2b7bded960a652c81a4b5a6815dd3c31 /demos/2d/motion/motion.gd
parentf9af57f3bdb16e015ee10b979fe18cf2195077f9 (diff)
Removed demos
they go to their own project now
Diffstat (limited to 'demos/2d/motion/motion.gd')
-rw-r--r--demos/2d/motion/motion.gd33
1 files changed, 0 insertions, 33 deletions
diff --git a/demos/2d/motion/motion.gd b/demos/2d/motion/motion.gd
deleted file mode 100644
index f9bbd6f90d..0000000000
--- a/demos/2d/motion/motion.gd
+++ /dev/null
@@ -1,33 +0,0 @@
-
-extends Sprite
-
-# Member variables
-const BEGIN = -113
-const END = 907
-const TIME = 5.0 # Seconds
-const SPEED = (END - BEGIN)/TIME
-
-export var use_idle = true
-
-
-func _process(delta):
- var ofs = get_pos()
- ofs.x += delta*SPEED
- if (ofs.x > END):
- ofs.x = BEGIN
- set_pos(ofs)
-
-
-func _fixed_process(delta):
- var ofs = get_pos()
- ofs.x += delta*SPEED
- if (ofs.x > END):
- ofs.x = BEGIN
- set_pos(ofs)
-
-
-func _ready():
- if (use_idle):
- set_process(true)
- else:
- set_fixed_process(true)