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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
[gd_scene load_steps=10 format=1]
[ext_resource path="res://coin.gd" type="Script" id=1]
[ext_resource path="res://coin.png" type="Texture" id=2]
[ext_resource path="res://sound_coin.wav" type="Sample" id=3]
[ext_resource path="res://bullet.png" type="Texture" id=4]
[sub_resource type="CircleShape2D" id=1]
custom_solver_bias = 0.0
radius = 10.0
[sub_resource type="Animation" id=2]
resource/name = "spin"
length = 1.5
loop = true
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("sprite:frame")
tracks/0/interp = 1
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25, 1.5 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1 ), "values":[ 0, 1, 2, 3, 2, 1, 0 ] }
[sub_resource type="Animation" id=3]
length = 8.0
loop = false
step = 0.0
tracks/0/type = "value"
tracks/0/path = NodePath("sprite:frame")
tracks/0/interp = 1
tracks/0/keys = { "cont":true, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 0 ] }
tracks/1/type = "value"
tracks/1/path = NodePath("sound:play/play")
tracks/1/interp = 1
tracks/1/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ "coin" ] }
tracks/2/type = "value"
tracks/2/path = NodePath("particles:visibility/self_opacity")
tracks/2/interp = 1
tracks/2/keys = { "cont":true, "times":FloatArray( 0, 1.66 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.0 ] }
tracks/3/type = "value"
tracks/3/path = NodePath("sprite:visibility/self_opacity")
tracks/3/interp = 1
tracks/3/keys = { "cont":true, "times":FloatArray( 0, 0.4 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.0 ] }
tracks/4/type = "value"
tracks/4/path = NodePath("particles:config/emitting")
tracks/4/interp = 1
tracks/4/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ true ] }
tracks/5/type = "method"
tracks/5/path = NodePath(".")
tracks/5/interp = 1
tracks/5/keys = { "times":FloatArray( 2.7 ), "transitions":FloatArray( 1 ), "values":[ { "args":[ ], "method":"queue_free" } ] }
[sub_resource type="SampleLibrary" id=4]
samples/coin = { "db":0.0, "pitch":1.0, "sample":ExtResource( 3 ) }
[sub_resource type="ColorRamp" id=5]
offsets = FloatArray( 0, 1 )
colors = ColorArray( 1, 1, 1, 1, 0, 0, 0, 1 )
[node name="coin" 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="sprite" type="Sprite" parent="."]
texture = ExtResource( 2 )
hframes = 4
[node name="anim" type="AnimationPlayer" parent="."]
playback/process_mode = 1
playback/default_blend_time = 0.0
root/root = NodePath("..")
anims/spin = SubResource( 2 )
anims/taken = SubResource( 3 )
playback/active = true
playback/speed = 3.0
blend_times = [ ]
autoplay = "spin"
[node name="collision" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
trigger = false
_update_shape_index = -1
[node name="sound" type="SamplePlayer2D" parent="."]
params/volume_db = 0.0
params/pitch_scale = 1.0
params/attenuation/min_distance = 1.0
params/attenuation/max_distance = 2048.0
params/attenuation/distance_exp = 1.0
config/polyphony = 1
config/samples = SubResource( 4 )
config/pitch_random = 0.0
[node name="particles" type="Particles2D" parent="."]
visibility/blend_mode = 1
config/amount = 8
config/lifetime = 0.4
config/emitting = false
config/half_extents = Vector2( 5, 5 )
config/texture = ExtResource( 4 )
params/direction = 0.0
params/spread = 10.0
params/linear_velocity = 0.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 = 0.2
params/final_size = 0.2
params/hue_variation = 0.0
params/anim_speed_scale = 1.0
params/anim_initial_pos = 0.0
color/color_ramp = SubResource( 5 )
[node name="enabler" type="VisibilityEnabler2D" parent="."]
rect = Rect2( -10, -10, 20, 20 )
enabler/pause_animations = true
enabler/freeze_bodies = true
enabler/pause_particles = true
enabler/process_parent = false
enabler/fixed_process_parent = false
[connection signal="body_enter" from="." to="." method="_on_body_enter"]
|