flappy-bird/Player.tscn

84 lines
2.1 KiB
Text

[gd_scene load_steps=5 format=2]
[ext_resource path="res://Player.gd" type="Script" id=1]
[ext_resource path="res://res/sprites.png" type="Texture" id=2]
[sub_resource type="CapsuleShape2D" id=2]
radius = 12.8837
height = 4.07484
[sub_resource type="Animation" id=3]
resource_name = "fly"
length = 0.4
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite1:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Sprite2:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0.1, 0.3 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ 0, 0 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("Sprite3:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0.2 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 0 ]
}
[node name="Player" type="Area2D"]
position = Vector2( 9.25964, 6.09653 )
script = ExtResource( 1 )
__meta__ = {
"_edit_group_": true
}
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
rotation = 1.5708
shape = SubResource( 2 )
[node name="Node2D" type="Node2D" parent="."]
scale = Vector2( 2, 2 )
[node name="Sprite1" type="Sprite" parent="Node2D"]
texture = ExtResource( 2 )
region_enabled = true
region_rect = Rect2( 3, 491, 17, 12 )
[node name="Sprite2" type="Sprite" parent="Node2D"]
texture = ExtResource( 2 )
region_enabled = true
region_rect = Rect2( 31, 491, 17, 12 )
[node name="Sprite3" type="Sprite" parent="Node2D"]
texture = ExtResource( 2 )
region_enabled = true
region_rect = Rect2( 59, 491, 17, 12 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="Node2D"]
root_node = NodePath("../..")
autoplay = "fly"
anims/fly = SubResource( 3 )
[connection signal="body_entered" from="." to="." method="_on_Player_body_entered"]