-
Notifications
You must be signed in to change notification settings - Fork 0
/
Crate.tscn
58 lines (46 loc) · 1.74 KB
/
Crate.tscn
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
[gd_scene load_steps=10 format=2]
[ext_resource path="res://Assets/crate.png" type="Texture" id=1]
[ext_resource path="res://src/Crate.gd" type="Script" id=2]
[ext_resource path="res://Assets/audio/explosion.wav" type="AudioStream" id=3]
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 16, 16 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 1 )
region = Rect2( 16, 0, 16, 16 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 1 )
region = Rect2( 32, 0, 16, 16 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 1 )
region = Rect2( 48, 0, 16, 16 )
[sub_resource type="SpriteFrames" id=5]
animations = [ {
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ) ],
"loop": true,
"name": "destroy",
"speed": 30.0
} ]
[sub_resource type="RectangleShape2D" id=6]
extents = Vector2( 7.99219, 7.99219 )
[node name="Crate" type="StaticBody2D"]
scale = Vector2( 4, 4 )
collision_layer = 4
collision_mask = 0
script = ExtResource( 2 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 5 )
animation = "destroy"
centered = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 8, 8 )
shape = SubResource( 6 )
[node name="ExplosionSound" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 3 )
volume_db = -18.0
[node name="DespawnTimer" type="Timer" parent="."]
wait_time = 20.0
autostart = true
[connection signal="animation_finished" from="AnimatedSprite" to="." method="_on_AnimatedSprite_animation_finished"]
[connection signal="finished" from="ExplosionSound" to="." method="_on_ExplosionSound_finished"]
[connection signal="timeout" from="DespawnTimer" to="." method="_on_DespawnTimer_timeout"]