-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnut3.tscn
115 lines (98 loc) · 3.13 KB
/
nut3.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
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
[gd_scene load_steps=11 format=2]
[ext_resource path="res://nut3.gd" type="Script" id=1]
[ext_resource path="res://art/nut-anim.png" type="Texture" id=2]
[ext_resource path="res://sound/grab.mp3" type="AudioStream" id=3]
[ext_resource path="res://sound/hit.mp3" type="AudioStream" id=4]
[ext_resource path="res://sound/crack.mp3" type="AudioStream" id=5]
[ext_resource path="res://sound/eat.mp3" type="AudioStream" id=6]
[sub_resource type="PhysicsMaterial" id=1]
friction = 0.75
bounce = 0.25
[sub_resource type="CapsuleShape2D" id=2]
radius = 10.6464
height = 6.96594
[sub_resource type="Animation" id=3]
resource_name = "crack"
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.25, 0.5, 0.75 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 4, 5, 6, 8 ]
}
[sub_resource type="Animation" id=4]
length = 8.0
step = 2.0
tracks/0/type = "value"
tracks/0/path = NodePath("sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 2, 4, 6 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 0, 1, 2, 3 ]
}
[node name="nut3" type="RigidBody2D"]
position = Vector2( 415.267, 205.578 )
scale = Vector2( 0.5, 0.5 )
collision_layer = 2
collision_mask = 6
mass = 2.04082
physics_material_override = SubResource( 1 )
gravity_scale = 3.0
contacts_reported = 1
contact_monitor = true
angular_velocity = 10.0
script = ExtResource( 1 )
__meta__ = {
"_edit_group_": true
}
[node name="sprite" type="Sprite" parent="."]
scale = Vector2( 1.25, 1.25 )
texture = ExtResource( 2 )
hframes = 3
vframes = 3
frame = 4
[node name="collision" type="CollisionShape2D" parent="."]
scale = Vector2( 1.25, 1.25 )
shape = SubResource( 2 )
[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."]
position = Vector2( -0.0809665, 0.912507 )
scale = Vector2( 1.03041, 1.25341 )
[node name="nut_life_span" type="Timer" parent="."]
wait_time = 10.0
one_shot = true
autostart = true
[node name="effect" type="Tween" parent="."]
[node name="aninut" type="AnimationPlayer" parent="."]
anims/crack = SubResource( 3 )
anims/roten = SubResource( 4 )
[node name="hit" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 4 )
volume_db = -30.0
pitch_scale = 0.5
[node name="grab" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 3 )
volume_db = -15.0
pitch_scale = 0.5
[node name="crack" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 5 )
volume_db = -16.0
mix_target = 2
[node name="eat" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 6 )
volume_db = 2.0
mix_target = 2
[connection signal="body_entered" from="." to="." method="_on_nut_body_entered"]
[connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"]
[connection signal="timeout" from="nut_life_span" to="." method="_on_Timer_timeout"]
[connection signal="tween_all_completed" from="effect" to="." method="_on_effect_tween_all_completed"]