summaryrefslogtreecommitdiff
path: root/demos/2d/space_shooter/shot.tscn
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2016-04-02 12:35:23 +0200
committerRémi Verschelde <rverschelde@gmail.com>2016-04-02 14:39:08 +0200
commit23cf6a85bdb904a1833c6015222d9ee69842c1ed (patch)
treef363b1cf1b6c9deb0549b071514dfc1ee7d5f093 /demos/2d/space_shooter/shot.tscn
parent4eb49cc73241e0597174c4bfdfdddaf96dce86af (diff)
Port 2D demos to TSCN/TRES formats
Part of #4196.
Diffstat (limited to 'demos/2d/space_shooter/shot.tscn')
-rw-r--r--demos/2d/space_shooter/shot.tscn103
1 files changed, 103 insertions, 0 deletions
diff --git a/demos/2d/space_shooter/shot.tscn b/demos/2d/space_shooter/shot.tscn
new file mode 100644
index 0000000000..2913eaf5b7
--- /dev/null
+++ b/demos/2d/space_shooter/shot.tscn
@@ -0,0 +1,103 @@
+[gd_scene load_steps=6 format=1]
+
+[ext_resource path="res://shot.gd" type="Script" id=1]
+[ext_resource path="res://shoot.png" type="Texture" id=2]
+
+[sub_resource type="RectangleShape2D" id=1]
+
+custom_solver_bias = 0.0
+extents = Vector2( 10, 4 )
+
+[sub_resource type="ColorRamp" id=2]
+
+offsets = FloatArray( 0, 1 )
+colors = ColorArray( 0.238085, 0.881885, 0.983902, 1, 1, 1, 1, 0 )
+
+[sub_resource type="Animation" id=3]
+
+length = 1.0
+loop = false
+step = 0.1
+tracks/0/type = "value"
+tracks/0/path = NodePath("hit_splash:config/emitting")
+tracks/0/interp = 1
+tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.1 ), "transitions":FloatArray( 1, 1 ), "values":[ true, false ] }
+tracks/1/type = "method"
+tracks/1/path = NodePath(".")
+tracks/1/interp = 1
+tracks/1/keys = { "times":FloatArray( 1 ), "transitions":FloatArray( 1 ), "values":[ { "args":[ ], "method":"queue_free" } ] }
+tracks/2/type = "value"
+tracks/2/path = NodePath("sprite:visibility/visible")
+tracks/2/interp = 1
+tracks/2/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ false ] }
+
+[node name="shot" type="Area2D"]
+
+input/pickable = true
+shapes/0/shape = SubResource( 1 )
+shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
+shapes/0/trigger = false
+gravity_vec = Vector2( 0, 1 )
+gravity = 98.0
+linear_damp = 0.1
+angular_damp = 1.0
+script/script = ExtResource( 1 )
+
+[node name="visibility" type="VisibilityNotifier2D" parent="."]
+
+transform/pos = Vector2( 1.8353, -0.0742126 )
+transform/scale = Vector2( 1.54149, 0.770745 )
+rect = Rect2( -10, -10, 20, 20 )
+
+[node name="sprite" type="Sprite" parent="."]
+
+texture = ExtResource( 2 )
+
+[node name="collision" type="CollisionShape2D" parent="."]
+
+shape = SubResource( 1 )
+trigger = false
+_update_shape_index = -1
+
+[node name="hit_splash" type="Particles2D" parent="."]
+
+config/amount = 32
+config/lifetime = 0.5
+config/emitting = false
+config/explosiveness = 0.1
+params/direction = 0.0
+params/spread = 180.0
+params/linear_velocity = 50.0
+params/spin_velocity = 0.0
+params/orbit_velocity = 0.0
+params/gravity_direction = 0.0
+params/gravity_strength = 0.0
+params/radial_accel = 0.0
+params/tangential_accel = 0.0
+params/damping = 0.0
+params/initial_angle = 0.0
+params/initial_size = 3.0
+params/final_size = 3.0
+params/hue_variation = 0.0
+params/anim_speed_scale = 1.0
+params/anim_initial_pos = 0.0
+color/color_ramp = SubResource( 2 )
+
+[node name="anim" type="AnimationPlayer" parent="."]
+
+playback/process_mode = 1
+playback/default_blend_time = 0.0
+root/root = NodePath("..")
+anims/splash = SubResource( 3 )
+playback/active = true
+playback/speed = 1.0
+blend_times = [ ]
+autoplay = ""
+
+[connection signal="body_enter" from="." to="." method="_on_shot_body_enter"]
+
+[connection signal="area_enter" from="." to="." method="_on_shot_area_enter"]
+
+[connection signal="exit_screen" from="visibility" to="." method="_on_visibility_exit_screen"]
+
+