168 lines
4.7 KiB
Text
168 lines
4.7 KiB
Text
[gd_scene load_steps=21 format=3 uid="uid://642nm6c4mpxx"]
|
|
|
|
[ext_resource type="Script" uid="uid://rdqmsvofiots" path="res://scenes/player/player.gd" id="1_v6fml"]
|
|
[ext_resource type="Texture2D" uid="uid://b8ptokcqwpdud" path="res://scenes/player/saffron.png" id="2_3li8b"]
|
|
[ext_resource type="Script" uid="uid://dqjaxgmyxq3rx" path="res://scenes/classes/state_machine.gd" id="3_lvxji"]
|
|
[ext_resource type="Script" uid="uid://delyni51vg6us" path="res://scenes/player/states/idle.gd" id="4_75vfm"]
|
|
[ext_resource type="Script" uid="uid://dxfs1b8fuk7kv" path="res://scenes/player/states/running.gd" id="5_75vfm"]
|
|
[ext_resource type="Script" uid="uid://n7v8leojhykt" path="res://scenes/player/states/hitting.gd" id="6_75vfm"]
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_g2els"]
|
|
atlas = ExtResource("2_3li8b")
|
|
region = Rect2(0, 64, 24, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qhqgy"]
|
|
atlas = ExtResource("2_3li8b")
|
|
region = Rect2(24, 64, 24, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_dqkch"]
|
|
atlas = ExtResource("2_3li8b")
|
|
region = Rect2(48, 64, 24, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qlg0r"]
|
|
atlas = ExtResource("2_3li8b")
|
|
region = Rect2(0, 96, 24, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_tuyoq"]
|
|
atlas = ExtResource("2_3li8b")
|
|
region = Rect2(24, 96, 24, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_fjrip"]
|
|
atlas = ExtResource("2_3li8b")
|
|
region = Rect2(48, 96, 24, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_smehm"]
|
|
atlas = ExtResource("2_3li8b")
|
|
region = Rect2(0, 32, 24, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ur7pv"]
|
|
atlas = ExtResource("2_3li8b")
|
|
region = Rect2(24, 32, 24, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_y4r1p"]
|
|
atlas = ExtResource("2_3li8b")
|
|
region = Rect2(48, 32, 24, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_d2wvv"]
|
|
atlas = ExtResource("2_3li8b")
|
|
region = Rect2(48, 0, 24, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_3v2ag"]
|
|
atlas = ExtResource("2_3li8b")
|
|
region = Rect2(24, 0, 24, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_jej6c"]
|
|
atlas = ExtResource("2_3li8b")
|
|
region = Rect2(0, 0, 24, 32)
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_f1ej7"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_g2els")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_qhqgy")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_dqkch")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_qhqgy")
|
|
}],
|
|
"loop": true,
|
|
"name": &"down",
|
|
"speed": 5.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_qlg0r")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_tuyoq")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_fjrip")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_tuyoq")
|
|
}],
|
|
"loop": true,
|
|
"name": &"left",
|
|
"speed": 5.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_smehm")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_ur7pv")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_y4r1p")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_ur7pv")
|
|
}],
|
|
"loop": true,
|
|
"name": &"right",
|
|
"speed": 5.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_d2wvv")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_3v2ag")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_jej6c")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_3v2ag")
|
|
}],
|
|
"loop": true,
|
|
"name": &"up",
|
|
"speed": 5.0
|
|
}]
|
|
|
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_oprun"]
|
|
radius = 5.0
|
|
height = 16.0
|
|
|
|
[node name="Player" type="CharacterBody2D"]
|
|
collision_layer = 2
|
|
collision_mask = 13
|
|
floor_stop_on_slope = false
|
|
script = ExtResource("1_v6fml")
|
|
|
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
|
sprite_frames = SubResource("SpriteFrames_f1ej7")
|
|
animation = &"down"
|
|
frame_progress = 0.29168898
|
|
offset = Vector2(0, -16)
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
position = Vector2(0, -8)
|
|
shape = SubResource("CapsuleShape2D_oprun")
|
|
|
|
[node name="StateMachine" type="Node" parent="." node_paths=PackedStringArray("initial_state")]
|
|
script = ExtResource("3_lvxji")
|
|
initial_state = NodePath("Idle")
|
|
metadata/_custom_type_script = "uid://dqjaxgmyxq3rx"
|
|
|
|
[node name="Idle" type="Node" parent="StateMachine"]
|
|
script = ExtResource("4_75vfm")
|
|
metadata/_custom_type_script = "uid://b2sr7p80gdjii"
|
|
|
|
[node name="Running" type="Node" parent="StateMachine"]
|
|
script = ExtResource("5_75vfm")
|
|
metadata/_custom_type_script = "uid://b2sr7p80gdjii"
|
|
|
|
[node name="Hitting" type="Node" parent="StateMachine"]
|
|
script = ExtResource("6_75vfm")
|
|
metadata/_custom_type_script = "uid://b2sr7p80gdjii"
|
|
|
|
[node name="HitTimer" type="Timer" parent="."]
|
|
wait_time = 0.5
|
|
one_shot = true
|