summaryrefslogtreecommitdiff
path: root/demos/2d/space_shooter/shot.tscn
blob: 2913eaf5b7e76833bfb7b1aa7875d7ee437dea05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
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"]