323 lines
8.5 KiB
Plaintext
323 lines
8.5 KiB
Plaintext
[gd_scene format=3 uid="uid://cdg82mh4ljjty"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://bd4fgamr0s365" path="res://assets/sprites/knight.png" id="1_3vyb7"]
|
|
[ext_resource type="Script" uid="uid://q646ipq51kns" path="res://scripts/player.gd" id="1_g2els"]
|
|
[ext_resource type="AudioStream" uid="uid://b0w6ok7nj785a" path="res://assets/sounds/jump.wav" id="3_qhqgy"]
|
|
[ext_resource type="AudioStream" uid="uid://coolcllh2qxvq" path="res://assets/sounds/hurt.wav" id="4_dqkch"]
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_31cv2"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(64, 192, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_tuyoq"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(0, 192, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_l71n6"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(64, 192, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ke2ow"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(64, 224, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ujl30"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(96, 224, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_g2els"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(0, 0, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qhqgy"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(32, 0, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_dqkch"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(64, 0, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qlg0r"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(96, 0, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_4ni07"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(128, 64, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_fjrip"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(0, 64, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_smehm"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(32, 64, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ur7pv"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(64, 64, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_y4r1p"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(96, 64, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_d2wvv"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(128, 64, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_3v2ag"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(160, 64, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_jej6c"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(192, 64, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_f1ej7"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(224, 64, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_oprun"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(0, 96, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_a8ls1"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(32, 96, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qfm1y"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(64, 96, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_fulsm"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(96, 96, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_4r5pv"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(128, 96, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_60mlk"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(160, 96, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_i4ail"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(192, 96, 32, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_a38lo"]
|
|
atlas = ExtResource("1_3vyb7")
|
|
region = Rect2(224, 96, 32, 32)
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_tuyoq"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_31cv2")
|
|
}],
|
|
"loop": true,
|
|
"name": &"damage",
|
|
"speed": 10.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_tuyoq")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_l71n6")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_ke2ow")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_ujl30")
|
|
}],
|
|
"loop": true,
|
|
"name": &"death",
|
|
"speed": 4.0
|
|
}, {
|
|
"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_qlg0r")
|
|
}],
|
|
"loop": true,
|
|
"name": &"idle",
|
|
"speed": 10.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_4ni07")
|
|
}],
|
|
"loop": true,
|
|
"name": &"jump",
|
|
"speed": 10.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_fjrip")
|
|
}, {
|
|
"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_d2wvv")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_3v2ag")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_jej6c")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_f1ej7")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_oprun")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_a8ls1")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_qfm1y")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_fulsm")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_4r5pv")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_60mlk")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_i4ail")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_a38lo")
|
|
}],
|
|
"loop": true,
|
|
"name": &"run",
|
|
"speed": 10.0
|
|
}]
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_fjrip"]
|
|
radius = 5.0
|
|
|
|
[sub_resource type="Animation" id="Animation_dqkch"]
|
|
length = 0.001
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("Sounds/JumpSound:playing")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 1,
|
|
"values": [false]
|
|
}
|
|
tracks/1/type = "value"
|
|
tracks/1/imported = false
|
|
tracks/1/enabled = true
|
|
tracks/1/path = NodePath("Sounds/DeathSound:playing")
|
|
tracks/1/interp = 1
|
|
tracks/1/loop_wrap = true
|
|
tracks/1/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 1,
|
|
"values": [false]
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_tuyoq"]
|
|
resource_name = "death"
|
|
length = 0.16666667
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("Sounds/DeathSound:playing")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 1,
|
|
"values": [true]
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_qlg0r"]
|
|
resource_name = "jump"
|
|
length = 0.1
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("Sounds/JumpSound:playing")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 1,
|
|
"values": [true]
|
|
}
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_tuyoq"]
|
|
_data = {
|
|
&"RESET": SubResource("Animation_dqkch"),
|
|
&"death": SubResource("Animation_tuyoq"),
|
|
&"jump": SubResource("Animation_qlg0r")
|
|
}
|
|
|
|
[node name="Player" type="CharacterBody2D" unique_id=195434465]
|
|
z_index = 5
|
|
collision_layer = 2
|
|
script = ExtResource("1_g2els")
|
|
|
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=595098333]
|
|
position = Vector2(0, -12)
|
|
sprite_frames = SubResource("SpriteFrames_tuyoq")
|
|
animation = &"death"
|
|
autoplay = "idle"
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1612869252]
|
|
position = Vector2(0, -5)
|
|
shape = SubResource("CircleShape2D_fjrip")
|
|
|
|
[node name="RayCastRight" type="RayCast2D" parent="." unique_id=1546816083]
|
|
position = Vector2(0, -5)
|
|
target_position = Vector2(7, 0)
|
|
|
|
[node name="RayCastLeft" type="RayCast2D" parent="." unique_id=1026866969]
|
|
position = Vector2(0, -5)
|
|
target_position = Vector2(-7, 0)
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1622064189]
|
|
libraries/ = SubResource("AnimationLibrary_tuyoq")
|
|
playback_auto_capture = false
|
|
|
|
[node name="Sounds" type="Node" parent="." unique_id=1753040532]
|
|
|
|
[node name="DeathSound" type="AudioStreamPlayer" parent="Sounds" unique_id=1043463499]
|
|
stream = ExtResource("4_dqkch")
|
|
bus = &"SFX"
|
|
|
|
[node name="JumpSound" type="AudioStreamPlayer" parent="Sounds" unique_id=300532321]
|
|
stream = ExtResource("3_qhqgy")
|
|
bus = &"SFX"
|