diff options
Diffstat (limited to 'demos/2d/motion/motion.tscn')
-rw-r--r-- | demos/2d/motion/motion.tscn | 135 |
1 files changed, 135 insertions, 0 deletions
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 + + |