516 lines
14 KiB
Plaintext
516 lines
14 KiB
Plaintext
[gd_scene format=3 uid="uid://5viursrnvdyf"]
|
|
|
|
[ext_resource type="Script" uid="uid://duilaa5lwqeup" path="res://Scenes/Player/player.gd" id="1_a3d8c"]
|
|
[ext_resource type="Texture2D" uid="uid://cjbvc07lh4x1b" path="res://Ninja Adventure - Asset Pack/Actor/Characters/KnightGold/SeparateAnim/Walk.png" id="2_a3d8c"]
|
|
[ext_resource type="Texture2D" uid="uid://cpuphg0fwkemr" path="res://Ninja Adventure - Asset Pack/Actor/Characters/KnightGold/SeparateAnim/Attack.png" id="2_dd0ac"]
|
|
[ext_resource type="Texture2D" uid="uid://cp2qfumar3lu" path="res://Ninja Adventure - Asset Pack/Actor/Characters/KnightGold/SeparateAnim/Dead.png" id="3_0u5uq"]
|
|
[ext_resource type="Texture2D" uid="uid://6dmy1j0t5mqy" path="res://Ninja Adventure - Asset Pack/Items/Scroll/ScrollEmpty.png" id="3_xpcdj"]
|
|
[ext_resource type="Texture2D" uid="uid://ff3wjwfsais6" path="res://Ninja Adventure - Asset Pack/Ui/LifeReceptacle/heart_2.png" id="4_mtuoh"]
|
|
[ext_resource type="Texture2D" uid="uid://38ldil8moinv" path="res://Ninja Adventure - Asset Pack/Items/Weapons/Sword2/SpriteInHand.png" id="5_htcer"]
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_eksi1"]
|
|
atlas = ExtResource("2_dd0ac")
|
|
region = Rect2(0, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_jincj"]
|
|
atlas = ExtResource("2_dd0ac")
|
|
region = Rect2(32, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_rqdc0"]
|
|
atlas = ExtResource("2_dd0ac")
|
|
region = Rect2(48, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qr1w5"]
|
|
atlas = ExtResource("2_dd0ac")
|
|
region = Rect2(16, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ythyg"]
|
|
atlas = ExtResource("3_0u5uq")
|
|
region = Rect2(0, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_a3d8c"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(0, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_74mp2"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(0, 16, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_oikmp"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(0, 32, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_06tpx"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(0, 48, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_xpcdj"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(32, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_mtuoh"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(32, 16, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_htcer"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(32, 32, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_dd0ac"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(32, 48, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_0u5uq"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(48, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_jlvik"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(48, 16, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_gk6dx"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(48, 32, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_jhyir"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(48, 48, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_7g0yx"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(16, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_dey5f"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(16, 16, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_r5xpd"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(16, 32, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ks1b7"]
|
|
atlas = ExtResource("2_a3d8c")
|
|
region = Rect2(16, 48, 16, 16)
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_bqpwv"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_eksi1")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"attack_down",
|
|
"speed": 5.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_jincj")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"attack_left",
|
|
"speed": 5.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_rqdc0")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"attack_right",
|
|
"speed": 5.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_qr1w5")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"attack_up",
|
|
"speed": 5.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_ythyg")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"death",
|
|
"speed": 5.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_a3d8c")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_74mp2")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_oikmp")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_06tpx")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"move_down",
|
|
"speed": 6.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_xpcdj")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_mtuoh")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_htcer")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_dd0ac")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"move_left",
|
|
"speed": 6.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_0u5uq")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_jlvik")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_gk6dx")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_jhyir")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"move_right",
|
|
"speed": 6.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_7g0yx")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_dey5f")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_r5xpd")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_ks1b7")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"move_up",
|
|
"speed": 6.0
|
|
}]
|
|
|
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bqpwv"]
|
|
radius = 5.0
|
|
height = 10.0
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_chgu2"]
|
|
radius = 6.0
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_chgu2"]
|
|
size = Vector2(8, 8)
|
|
|
|
[sub_resource type="LabelSettings" id="LabelSettings_chgu2"]
|
|
font_size = 48
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_hnuln"]
|
|
atlas = ExtResource("4_mtuoh")
|
|
region = Rect2(0, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_aqm4k"]
|
|
atlas = ExtResource("4_mtuoh")
|
|
region = Rect2(16, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_rcvs5"]
|
|
atlas = ExtResource("4_mtuoh")
|
|
region = Rect2(32, 0, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_h8ma5"]
|
|
atlas = ExtResource("4_mtuoh")
|
|
region = Rect2(48, 0, 16, 16)
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_chgu2"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_hnuln")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"0_hp",
|
|
"speed": 5.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_aqm4k")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"1_hp",
|
|
"speed": 5.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_rcvs5")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"2_hp",
|
|
"speed": 5.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_h8ma5")
|
|
}],
|
|
"loop": 1,
|
|
"name": &"3_hp",
|
|
"speed": 5.0
|
|
}]
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_3rdvi"]
|
|
size = Vector2(8, 13)
|
|
|
|
[sub_resource type="Animation" id="Animation_gk6dx"]
|
|
length = 0.001
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("Sword:rotation")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 0,
|
|
"values": [1.5707964]
|
|
}
|
|
tracks/1/type = "value"
|
|
tracks/1/imported = false
|
|
tracks/1/enabled = true
|
|
tracks/1/path = NodePath("Sword:position")
|
|
tracks/1/interp = 1
|
|
tracks/1/loop_wrap = true
|
|
tracks/1/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 0,
|
|
"values": [Vector2(-3, -13)]
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_jhyir"]
|
|
resource_name = "attack_bottom"
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("Sword:position")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 0,
|
|
"values": [Vector2(0, 13)]
|
|
}
|
|
tracks/1/type = "value"
|
|
tracks/1/imported = false
|
|
tracks/1/enabled = true
|
|
tracks/1/path = NodePath("Sword:rotation")
|
|
tracks/1/interp = 1
|
|
tracks/1/loop_wrap = true
|
|
tracks/1/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 0,
|
|
"values": [0.0]
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_jlvik"]
|
|
resource_name = "attack_left"
|
|
length = 0.2
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("Sword:rotation")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 0,
|
|
"values": [1.5707964]
|
|
}
|
|
tracks/1/type = "value"
|
|
tracks/1/imported = false
|
|
tracks/1/enabled = true
|
|
tracks/1/path = NodePath("Sword:position")
|
|
tracks/1/interp = 1
|
|
tracks/1/loop_wrap = true
|
|
tracks/1/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 0,
|
|
"values": [Vector2(-13, 4)]
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_dd0ac"]
|
|
resource_name = "attack_right"
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("Sword:position")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 0,
|
|
"values": [Vector2(13, 4)]
|
|
}
|
|
tracks/1/type = "value"
|
|
tracks/1/imported = false
|
|
tracks/1/enabled = true
|
|
tracks/1/path = NodePath("Sword:rotation")
|
|
tracks/1/interp = 1
|
|
tracks/1/loop_wrap = true
|
|
tracks/1/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 0,
|
|
"values": [4.712389]
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_0u5uq"]
|
|
resource_name = "attack_up"
|
|
length = 0.2
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("Sword:position")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 0,
|
|
"values": [Vector2(-3, -13)]
|
|
}
|
|
tracks/1/type = "value"
|
|
tracks/1/imported = false
|
|
tracks/1/enabled = true
|
|
tracks/1/path = NodePath("Sword:rotation")
|
|
tracks/1/interp = 1
|
|
tracks/1/loop_wrap = true
|
|
tracks/1/keys = {
|
|
"times": PackedFloat32Array(0.2),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 0,
|
|
"values": [3.1415927]
|
|
}
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_jlvik"]
|
|
_data = {
|
|
&"RESET": SubResource("Animation_gk6dx"),
|
|
&"attack_bottom": SubResource("Animation_jhyir"),
|
|
&"attack_left": SubResource("Animation_jlvik"),
|
|
&"attack_right": SubResource("Animation_dd0ac"),
|
|
&"attack_up": SubResource("Animation_0u5uq")
|
|
}
|
|
|
|
[node name="CharacterBody2D" type="CharacterBody2D" unique_id=1991398375]
|
|
collision_mask = 7
|
|
motion_mode = 1
|
|
script = ExtResource("1_a3d8c")
|
|
|
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=721334358]
|
|
sprite_frames = SubResource("SpriteFrames_bqpwv")
|
|
animation = &"move_down"
|
|
autoplay = "move_down"
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=129222135]
|
|
visible = false
|
|
position = Vector2(0, 3)
|
|
shape = SubResource("CapsuleShape2D_bqpwv")
|
|
|
|
[node name="HitBoxArea2D" type="Area2D" parent="." unique_id=1052547818]
|
|
collision_layer = 2
|
|
collision_mask = 16
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="HitBoxArea2D" unique_id=206980179]
|
|
position = Vector2(0, 2)
|
|
shape = SubResource("CircleShape2D_chgu2")
|
|
debug_color = Color(0.99152297, 0, 0.27048782, 0.41960785)
|
|
|
|
[node name="InteractArea2D" type="Area2D" parent="." unique_id=145023444]
|
|
collision_layer = 2
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="InteractArea2D" unique_id=775673729]
|
|
shape = SubResource("RectangleShape2D_chgu2")
|
|
debug_color = Color(0.9427947, 0.09120729, 0.5535774, 0.41960785)
|
|
|
|
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=1672000946]
|
|
|
|
[node name="Panel" type="Panel" parent="CanvasLayer" unique_id=1717998937]
|
|
offset_left = 198.0
|
|
offset_top = 52.0
|
|
offset_right = 412.0
|
|
offset_bottom = 125.0
|
|
|
|
[node name="Label" type="Label" parent="CanvasLayer/Panel" unique_id=1669846200]
|
|
layout_mode = 0
|
|
offset_left = 78.0
|
|
offset_top = 2.0
|
|
offset_right = 118.0
|
|
offset_bottom = 69.0
|
|
text = "0"
|
|
label_settings = SubResource("LabelSettings_chgu2")
|
|
|
|
[node name="TextureRect" type="TextureRect" parent="CanvasLayer/Panel" unique_id=1105594124]
|
|
layout_mode = 0
|
|
offset_left = 9.0
|
|
offset_top = 8.0
|
|
offset_right = 63.0
|
|
offset_bottom = 62.0
|
|
texture = ExtResource("3_xpcdj")
|
|
|
|
[node name="HealthBar" type="AnimatedSprite2D" parent="CanvasLayer" unique_id=102598890]
|
|
unique_name_in_owner = true
|
|
position = Vector2(114, 88)
|
|
scale = Vector2(4.7812505, 4.7812505)
|
|
sprite_frames = SubResource("SpriteFrames_chgu2")
|
|
animation = &"3_hp"
|
|
|
|
[node name="Sword" type="Sprite2D" parent="." unique_id=984511662]
|
|
visible = false
|
|
show_behind_parent = true
|
|
position = Vector2(-3, -13)
|
|
rotation = 1.5707964
|
|
texture = ExtResource("5_htcer")
|
|
|
|
[node name="SwordArea2D" type="Area2D" parent="Sword" unique_id=479479356]
|
|
collision_layer = 2
|
|
collision_mask = 16
|
|
monitoring = false
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Sword/SwordArea2D" unique_id=1964142758]
|
|
position = Vector2(0, 0.5)
|
|
shape = SubResource("RectangleShape2D_3rdvi")
|
|
debug_color = Color(0.6497558, 0.52038795, 0, 0.41960785)
|
|
|
|
[node name="SwordTimer" type="Timer" parent="Sword" unique_id=639462034]
|
|
wait_time = 0.3
|
|
one_shot = true
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1687360666]
|
|
libraries/ = SubResource("AnimationLibrary_jlvik")
|
|
|
|
[node name="DeathTimer" type="Timer" parent="." unique_id=1301433095]
|
|
wait_time = 1.5
|
|
one_shot = true
|
|
|
|
[connection signal="body_entered" from="HitBoxArea2D" to="." method="_on_hit_box_area_2d_body_entered"]
|
|
[connection signal="body_entered" from="InteractArea2D" to="." method="_on_area_2d_body_entered"]
|
|
[connection signal="body_exited" from="InteractArea2D" to="." method="_on_area_2d_body_exited"]
|
|
[connection signal="body_entered" from="Sword/SwordArea2D" to="." method="_on_sword_area_2d_body_entered"]
|
|
[connection signal="timeout" from="Sword/SwordTimer" to="." method="_on_sword_timer_timeout"]
|
|
[connection signal="timeout" from="DeathTimer" to="." method="_on_death_timer_timeout"]
|