summaryrefslogtreecommitdiff
path: root/demos/2d/motion
diff options
context:
space:
mode:
Diffstat (limited to 'demos/2d/motion')
-rw-r--r--demos/2d/motion/engine.cfg2
-rw-r--r--demos/2d/motion/motion.scnbin2738 -> 0 bytes
-rw-r--r--demos/2d/motion/motion.tscn135
3 files changed, 136 insertions, 1 deletions
diff --git a/demos/2d/motion/engine.cfg b/demos/2d/motion/engine.cfg
index 6e660572d6..5395398e16 100644
--- a/demos/2d/motion/engine.cfg
+++ b/demos/2d/motion/engine.cfg
@@ -1,7 +1,7 @@
[application]
name="Motion Test"
-main_scene="res://motion.scn"
+main_scene="res://motion.tscn"
icon="res://icon.png"
[display]
diff --git a/demos/2d/motion/motion.scn b/demos/2d/motion/motion.scn
deleted file mode 100644
index 6e19356674..0000000000
--- a/demos/2d/motion/motion.scn
+++ /dev/null
Binary files differ
diff --git a/demos/2d/motion/motion.tscn b/demos/2d/motion/motion.tscn
new file mode 100644
index 0000000000..920ee55423
--- /dev/null
+++ b/demos/2d/motion/motion.tscn
@@ -0,0 +1,135 @@
+[gd_scene load_steps=4 format=1]
+
+[ext_resource path="res://car.png" type="Texture" id=1]
+[ext_resource path="res://motion.gd" type="Script" id=2]
+
+[sub_resource type="Animation" id=1]
+
+resource/name = "motion"
+length = 5.0
+loop = true
+step = 0.1
+tracks/0/type = "value"
+tracks/0/path = NodePath(".:transform/pos")
+tracks/0/interp = 1
+tracks/0/keys = { "cont":true, "times":FloatArray( 0, 5 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( -113, 154 ), Vector2( 907, 154 ) ] }
+
+[node name="Node2D" type="Node2D"]
+
+[node name="idle" type="Node2D" parent="."]
+
+[node name="car" type="Sprite" parent="idle"]
+
+transform/pos = Vector2( -113, 154 )
+texture = ExtResource( 1 )
+
+[node name="anim" type="AnimationPlayer" parent="idle/car"]
+
+playback/process_mode = 1
+playback/default_blend_time = 0.0
+root/root = NodePath("..")
+anims/motion = SubResource( 1 )
+playback/active = true
+playback/speed = 1.0
+blend_times = [ ]
+autoplay = "motion"
+
+[node name="Label" type="Label" parent="idle"]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 27.0
+margin/top = 80.0
+margin/right = 104.0
+margin/bottom = 93.0
+text = "Idle Process Animation"
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="fixed" type="Node2D" parent="."]
+
+transform/pos = Vector2( 0, 106 )
+
+[node name="car" type="Sprite" parent="fixed"]
+
+transform/pos = Vector2( -113, 154 )
+texture = ExtResource( 1 )
+
+[node name="anim" type="AnimationPlayer" parent="fixed/car"]
+
+playback/process_mode = 0
+playback/default_blend_time = 0.0
+root/root = NodePath("..")
+anims/motion = SubResource( 1 )
+playback/active = true
+playback/speed = 1.0
+blend_times = [ ]
+autoplay = "motion"
+
+[node name="Label1" type="Label" parent="fixed"]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 27.0
+margin/top = 80.0
+margin/right = 104.0
+margin/bottom = 93.0
+text = "Fixed Process Animation"
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="code_idle" type="Node2D" parent="."]
+
+transform/pos = Vector2( 0, 215 )
+
+[node name="car" type="Sprite" parent="code_idle"]
+
+transform/pos = Vector2( -113, 154 )
+texture = ExtResource( 1 )
+script/script = ExtResource( 2 )
+use_idle = true
+
+[node name="Label1" type="Label" parent="code_idle"]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 27.0
+margin/top = 80.0
+margin/right = 104.0
+margin/bottom = 93.0
+text = "Idle Process Code"
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="code_fixed" type="Node2D" parent="."]
+
+transform/pos = Vector2( 0, 324 )
+
+[node name="car" type="Sprite" parent="code_fixed"]
+
+transform/pos = Vector2( -113, 154 )
+texture = ExtResource( 1 )
+script/script = ExtResource( 2 )
+use_idle = false
+
+[node name="Label1" type="Label" parent="code_fixed"]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 27.0
+margin/top = 80.0
+margin/right = 104.0
+margin/bottom = 93.0
+text = "Fixed Process Code"
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+