bovido/scenes/player.tscn

234 lines
6.8 KiB
Plaintext

[gd_scene load_steps=17 format=3 uid="uid://ba1t35yyot4jl"]
[ext_resource type="Texture2D" uid="uid://bqkvmyqo86dtj" path="res://art/characters/Owlet_Monster_Walk_6.png" id="1_e23l4"]
[ext_resource type="Script" path="res://scripts/player/player.gd" id="1_fmx2p"]
[ext_resource type="Texture2D" uid="uid://cjxkidkeka7yp" path="res://art/characters/Owlet_Monster_Run_6.png" id="2_qq5i7"]
[ext_resource type="Texture2D" uid="uid://bi7ceeuwhg5mp" path="res://art/characters/Owlet_Monster_Idle_4.png" id="4_orj3a"]
[ext_resource type="Texture2D" uid="uid://dbrr63tv6i2ek" path="res://art/characters/Owlet_Monster_Throw_4.png" id="5_2s1mg"]
[ext_resource type="Script" path="res://scripts/state_machine/state_machine.gd" id="6_hl63m"]
[ext_resource type="Script" path="res://scripts/player/states/player_idle_state.gd" id="7_0nfrc"]
[ext_resource type="Script" path="res://scripts/player/states/player_walk_state.gd" id="7_gcd3q"]
[ext_resource type="Script" path="res://scripts/player/states/player_throw_state.gd" id="9_atm3r"]
[sub_resource type="Animation" id="Animation_rh7n7"]
length = 0.001
[sub_resource type="Animation" id="Animation_7igie"]
resource_name = "idle"
length = 0.4
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("4_orj3a")]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:hframes")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [4]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite2D:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3]
}
[sub_resource type="Animation" id="Animation_xfiuh"]
resource_name = "run"
length = 0.6
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("2_qq5i7")]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:hframes")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [6]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite2D:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3, 4, 5]
}
[sub_resource type="Animation" id="Animation_gswgu"]
resource_name = "throw"
length = 0.4
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("5_2s1mg")]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:hframes")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [4]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite2D:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3]
}
[sub_resource type="Animation" id="Animation_pjkea"]
resource_name = "walk"
length = 0.6
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("1_e23l4")]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:hframes")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [6]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite2D:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3, 4, 5]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ldfyt"]
_data = {
"RESET": SubResource("Animation_rh7n7"),
"idle": SubResource("Animation_7igie"),
"run": SubResource("Animation_xfiuh"),
"throw": SubResource("Animation_gswgu"),
"walk": SubResource("Animation_pjkea")
}
[sub_resource type="RectangleShape2D" id="RectangleShape2D_hocsq"]
size = Vector2(21, 10)
[node name="Player" type="CharacterBody2D"]
collision_mask = 14
script = ExtResource("1_fmx2p")
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(0, -16)
texture = ExtResource("5_2s1mg")
hframes = 4
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_ldfyt")
}
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
y_sort_enabled = true
position = Vector2(-2.5, -5)
shape = SubResource("RectangleShape2D_hocsq")
[node name="Area2D" type="Area2D" parent="."]
collision_mask = 8
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
y_sort_enabled = true
position = Vector2(-2.5, -5)
shape = SubResource("RectangleShape2D_hocsq")
[node name="StateMachine" type="Node" parent="." node_paths=PackedStringArray("state")]
script = ExtResource("6_hl63m")
state = NodePath("Idle")
[node name="Idle" type="Node" parent="StateMachine"]
script = ExtResource("7_0nfrc")
[node name="Walk" type="Node" parent="StateMachine"]
script = ExtResource("7_gcd3q")
[node name="Throw" type="Node" parent="StateMachine"]
script = ExtResource("9_atm3r")
[connection signal="collide_with_ball" from="." to="StateMachine/Idle" method="_on_player_collide_with_ball"]
[connection signal="animation_finished" from="AnimationPlayer" to="StateMachine/Throw" method="_on_animation_player_animation_finished"]
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]