-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlayer.tscn
56 lines (47 loc) · 1.96 KB
/
Player.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
[gd_scene load_steps=13 format=2]
[ext_resource path="res://Player.gd" type="Script" id=1]
[ext_resource path="res://sprite/blocky-flap-1.png" type="Texture" id=2]
[ext_resource path="res://sprite/blocky-flap-2.png" type="Texture" id=3]
[ext_resource path="res://sprite/blocky-flap-3.png" type="Texture" id=4]
[ext_resource path="res://sprite/blocky-flap-4.png" type="Texture" id=5]
[ext_resource path="res://sprite/blocky-flap-5.png" type="Texture" id=6]
[ext_resource path="res://sprite/blocky-neutral-1.png" type="Texture" id=7]
[ext_resource path="res://sprite/blocky-neutral-2.png" type="Texture" id=8]
[ext_resource path="res://sounds/jump1.wav" type="AudioStream" id=9]
[ext_resource path="res://sounds/jump2.wav" type="AudioStream" id=10]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 7 ), ExtResource( 8 ) ],
"loop": true,
"name": "neutral",
"speed": 2.0
}, {
"frames": [ ExtResource( 2 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 4 ), ExtResource( 4 ), ExtResource( 5 ), ExtResource( 6 ), ExtResource( 6 ), ExtResource( 6 ) ],
"loop": false,
"name": "flap",
"speed": 15.0
} ]
[sub_resource type="CircleShape2D" id=2]
radius = 32.0289
[node name="Player" type="KinematicBody2D"]
script = ExtResource( 1 )
__meta__ = {
"_edit_group_": true
}
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
scale = Vector2( 0.25, 0.25 )
frames = SubResource( 1 )
animation = "neutral"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 2 )
[node name="FlapTimer" type="Timer" parent="."]
wait_time = 0.1
one_shot = true
[node name="FlapSound1" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 9 )
volume_db = -10.0
[node name="FlapSound2" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 10 )
volume_db = -10.0
[connection signal="animation_finished" from="AnimatedSprite" to="." method="_on_animation_finished"]
[connection signal="timeout" from="FlapTimer" to="." method="_on_reached_jump_apex"]