2023-04-23 21:10:37 -07:00
|
|
|
[gd_scene load_steps=29 format=3 uid="uid://b2254pup8k161"]
|
2022-11-10 20:29:53 -08:00
|
|
|
|
|
|
|
[ext_resource type="Script" path="res://Characters/Player.cs" id="1_flygr"]
|
2022-11-25 09:11:46 -08:00
|
|
|
[ext_resource type="Shader" path="res://Shaders/Flash.gdshader" id="2_ngsgt"]
|
2023-04-23 21:10:37 -07:00
|
|
|
[ext_resource type="Texture2D" uid="uid://bej8thq7ruyty" path="res://Assets/Sprites/Characters/forsen2.png" id="4_5vird"]
|
2022-11-25 11:59:55 -08:00
|
|
|
[ext_resource type="PackedScene" uid="uid://cl56eadpklnbo" path="res://Utils/PlayerCamera.tscn" id="4_ym125"]
|
2023-05-25 15:28:33 -07:00
|
|
|
[ext_resource type="Script" path="res://State/Character/CharacterStateMachine.cs" id="5_rgckv"]
|
|
|
|
[ext_resource type="Script" path="res://State/Character/PlayerIdleState.cs" id="6_wkfdm"]
|
2022-11-25 09:11:46 -08:00
|
|
|
[ext_resource type="PackedScene" uid="uid://d72ehtv1ks0e" path="res://Items/Weapons/Sword.tscn" id="7_4rxuv"]
|
2023-05-25 15:28:33 -07:00
|
|
|
[ext_resource type="Script" path="res://State/Character/PlayerMoveState.cs" id="7_dfqd8"]
|
2022-11-18 13:53:51 -08:00
|
|
|
[ext_resource type="Script" path="res://Items/Inventory.cs" id="7_xyenu"]
|
2023-05-25 15:28:33 -07:00
|
|
|
[ext_resource type="Script" path="res://State/Character/PlayerRollState.cs" id="8_fy0v5"]
|
2022-11-19 21:21:12 -08:00
|
|
|
[ext_resource type="PackedScene" uid="uid://cjgxyhgcyvsv7" path="res://BoundingBoxes/Hurtbox.tscn" id="9_avyu4"]
|
2022-11-26 14:53:24 -08:00
|
|
|
[ext_resource type="AudioStream" uid="uid://njun3e6v4854" path="res://Assets/Sounds/hurt.wav" id="12_h0x0g"]
|
2022-11-19 21:21:12 -08:00
|
|
|
|
2022-11-25 09:11:46 -08:00
|
|
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_h78y7"]
|
|
|
|
shader = ExtResource("2_ngsgt")
|
2023-03-19 13:54:48 -07:00
|
|
|
shader_parameter/color = Quaternion(1, 1, 1, 1)
|
2022-11-25 09:11:46 -08:00
|
|
|
shader_parameter/intensity = 0.0
|
|
|
|
|
2023-04-23 21:10:37 -07:00
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_55yt4"]
|
|
|
|
atlas = ExtResource("4_5vird")
|
2022-11-19 21:21:12 -08:00
|
|
|
region = Rect2(0, 0, 24, 24)
|
|
|
|
|
2023-04-23 21:10:37 -07:00
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_xa1bi"]
|
|
|
|
atlas = ExtResource("4_5vird")
|
2022-11-19 21:21:12 -08:00
|
|
|
region = Rect2(24, 0, 24, 24)
|
|
|
|
|
2023-04-23 21:10:37 -07:00
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_hiodl"]
|
|
|
|
atlas = ExtResource("4_5vird")
|
2022-11-19 21:21:12 -08:00
|
|
|
region = Rect2(48, 0, 24, 24)
|
|
|
|
|
2023-04-23 21:10:37 -07:00
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_tok7d"]
|
|
|
|
atlas = ExtResource("4_5vird")
|
2022-11-19 21:21:12 -08:00
|
|
|
region = Rect2(72, 0, 24, 24)
|
|
|
|
|
2023-04-23 21:10:37 -07:00
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_dp8x6"]
|
|
|
|
atlas = ExtResource("4_5vird")
|
2022-11-19 21:21:12 -08:00
|
|
|
region = Rect2(96, 0, 24, 24)
|
|
|
|
|
2023-04-23 21:10:37 -07:00
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_sglor"]
|
|
|
|
atlas = ExtResource("4_5vird")
|
2022-11-19 21:21:12 -08:00
|
|
|
region = Rect2(120, 0, 24, 24)
|
|
|
|
|
2023-04-23 21:10:37 -07:00
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_gb41o"]
|
|
|
|
atlas = ExtResource("4_5vird")
|
2022-11-19 21:21:12 -08:00
|
|
|
region = Rect2(144, 0, 24, 24)
|
|
|
|
|
2023-04-23 21:10:37 -07:00
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_bx6qq"]
|
|
|
|
atlas = ExtResource("4_5vird")
|
|
|
|
region = Rect2(168, 0, 24, 24)
|
|
|
|
|
2022-11-19 21:21:12 -08:00
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_2h7cf"]
|
|
|
|
animations = [{
|
2023-03-19 13:54:48 -07:00
|
|
|
"frames": [{
|
|
|
|
"duration": 1.0,
|
2023-04-23 21:10:37 -07:00
|
|
|
"texture": SubResource("AtlasTexture_55yt4")
|
2023-03-19 13:54:48 -07:00
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
2023-04-23 21:10:37 -07:00
|
|
|
"texture": SubResource("AtlasTexture_xa1bi")
|
2023-03-19 13:54:48 -07:00
|
|
|
}],
|
2022-11-19 21:21:12 -08:00
|
|
|
"loop": true,
|
|
|
|
"name": &"idle",
|
2023-05-23 00:25:28 -07:00
|
|
|
"speed": 2.0
|
2022-11-19 21:21:12 -08:00
|
|
|
}, {
|
2023-03-19 13:54:48 -07:00
|
|
|
"frames": [{
|
|
|
|
"duration": 1.0,
|
2023-04-23 21:10:37 -07:00
|
|
|
"texture": SubResource("AtlasTexture_hiodl")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": SubResource("AtlasTexture_tok7d")
|
2023-03-19 13:54:48 -07:00
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
2023-04-23 21:10:37 -07:00
|
|
|
"texture": SubResource("AtlasTexture_dp8x6")
|
2023-03-19 13:54:48 -07:00
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
2023-04-23 21:10:37 -07:00
|
|
|
"texture": SubResource("AtlasTexture_sglor")
|
2023-03-19 13:54:48 -07:00
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
2023-04-23 21:10:37 -07:00
|
|
|
"texture": SubResource("AtlasTexture_gb41o")
|
2023-03-19 13:54:48 -07:00
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
2023-04-23 21:10:37 -07:00
|
|
|
"texture": SubResource("AtlasTexture_bx6qq")
|
2023-03-19 13:54:48 -07:00
|
|
|
}],
|
2022-11-19 21:21:12 -08:00
|
|
|
"loop": true,
|
|
|
|
"name": &"move",
|
2023-05-23 00:25:28 -07:00
|
|
|
"speed": 10.0
|
2022-11-19 21:21:12 -08:00
|
|
|
}]
|
2022-11-10 20:29:53 -08:00
|
|
|
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_bfqew"]
|
2022-11-19 21:21:12 -08:00
|
|
|
size = Vector2(16, 8)
|
2022-11-10 20:29:53 -08:00
|
|
|
|
2022-11-13 15:42:04 -08:00
|
|
|
[sub_resource type="LabelSettings" id="LabelSettings_q5h1n"]
|
|
|
|
font_size = 24
|
|
|
|
|
2022-11-19 21:21:12 -08:00
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cjk6b"]
|
2023-05-23 00:25:28 -07:00
|
|
|
size = Vector2(8, 8)
|
2022-11-19 21:21:12 -08:00
|
|
|
|
2022-11-25 09:11:46 -08:00
|
|
|
[sub_resource type="Animation" id="Animation_dxevc"]
|
|
|
|
resource_name = "Hurt"
|
|
|
|
length = 0.6
|
|
|
|
tracks/0/type = "value"
|
|
|
|
tracks/0/imported = false
|
|
|
|
tracks/0/enabled = true
|
|
|
|
tracks/0/path = NodePath(".:material:shader_parameter/intensity")
|
|
|
|
tracks/0/interp = 2
|
|
|
|
tracks/0/loop_wrap = true
|
|
|
|
tracks/0/keys = {
|
|
|
|
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6),
|
|
|
|
"transitions": PackedFloat32Array(4, 4, 4, 4, 4, 4, 4),
|
|
|
|
"update": 0,
|
|
|
|
"values": [0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0]
|
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="Animation" id="Animation_k6l16"]
|
|
|
|
length = 0.001
|
|
|
|
tracks/0/type = "value"
|
|
|
|
tracks/0/imported = false
|
|
|
|
tracks/0/enabled = true
|
|
|
|
tracks/0/path = NodePath(".:material:shader_parameter/intensity")
|
|
|
|
tracks/0/interp = 1
|
|
|
|
tracks/0/loop_wrap = true
|
|
|
|
tracks/0/keys = {
|
|
|
|
"times": PackedFloat32Array(0),
|
|
|
|
"transitions": PackedFloat32Array(1),
|
|
|
|
"update": 0,
|
|
|
|
"values": [0.0]
|
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_xe5eq"]
|
|
|
|
_data = {
|
|
|
|
"Hurt": SubResource("Animation_dxevc"),
|
|
|
|
"RESET": SubResource("Animation_k6l16")
|
|
|
|
}
|
|
|
|
|
2022-11-25 11:59:55 -08:00
|
|
|
[node name="Player" type="CharacterBody2D" node_paths=PackedStringArray("Camera", "Sprite", "Inventory", "StateMachine")]
|
2022-12-04 20:12:34 -08:00
|
|
|
y_sort_enabled = true
|
2022-11-19 21:21:12 -08:00
|
|
|
texture_filter = 3
|
2022-11-25 09:11:46 -08:00
|
|
|
material = SubResource("ShaderMaterial_h78y7")
|
2022-12-04 20:12:34 -08:00
|
|
|
position = Vector2(0, -12)
|
2022-11-27 19:37:16 -08:00
|
|
|
collision_layer = 6
|
2023-05-23 00:25:28 -07:00
|
|
|
collision_mask = 17
|
2022-11-10 20:29:53 -08:00
|
|
|
script = ExtResource("1_flygr")
|
2022-11-25 11:59:55 -08:00
|
|
|
Camera = NodePath("Camera2D")
|
2022-11-18 13:53:51 -08:00
|
|
|
Speed = 64.0
|
2022-11-19 21:21:12 -08:00
|
|
|
Sprite = NodePath("Sprite")
|
|
|
|
Inventory = NodePath("Inventory")
|
2022-11-13 15:42:04 -08:00
|
|
|
StateMachine = NodePath("StateMachine")
|
2022-11-19 21:21:12 -08:00
|
|
|
Faction = 1
|
2022-11-10 20:29:53 -08:00
|
|
|
|
2022-11-13 15:42:04 -08:00
|
|
|
[node name="StateMachine" type="Node" parent="." node_paths=PackedStringArray("InitialState", "Character")]
|
2023-05-25 15:28:33 -07:00
|
|
|
script = ExtResource("5_rgckv")
|
2022-11-13 15:42:04 -08:00
|
|
|
InitialState = NodePath("Idle")
|
|
|
|
Character = NodePath("..")
|
|
|
|
|
2023-05-25 15:28:33 -07:00
|
|
|
[node name="Idle" type="Node" parent="StateMachine" node_paths=PackedStringArray("MoveState", "IdleState", "Character")]
|
|
|
|
script = ExtResource("6_wkfdm")
|
2022-11-13 15:42:04 -08:00
|
|
|
MoveState = NodePath("../Move")
|
2022-11-26 14:53:24 -08:00
|
|
|
IdleState = NodePath(".")
|
2023-05-25 15:28:33 -07:00
|
|
|
Character = NodePath("../..")
|
2022-11-13 15:42:04 -08:00
|
|
|
|
2023-05-25 15:28:33 -07:00
|
|
|
[node name="Move" type="Node" parent="StateMachine" node_paths=PackedStringArray("RollState", "IdleState", "Character")]
|
|
|
|
script = ExtResource("7_dfqd8")
|
2022-11-13 15:42:04 -08:00
|
|
|
RollState = NodePath("../Roll")
|
2022-11-26 14:53:24 -08:00
|
|
|
IdleState = NodePath("../Idle")
|
2023-05-25 15:28:33 -07:00
|
|
|
Character = NodePath("../..")
|
2022-11-13 15:42:04 -08:00
|
|
|
|
2023-05-25 15:28:33 -07:00
|
|
|
[node name="Roll" type="Node" parent="StateMachine" node_paths=PackedStringArray("IdleState", "Character")]
|
|
|
|
script = ExtResource("8_fy0v5")
|
2022-11-26 14:53:24 -08:00
|
|
|
IdleState = NodePath("../Idle")
|
2023-05-25 15:28:33 -07:00
|
|
|
Character = NodePath("../..")
|
|
|
|
|
|
|
|
[node name="Camera2D" parent="." instance=ExtResource("4_ym125")]
|
|
|
|
position_smoothing_speed = 8.0
|
|
|
|
|
|
|
|
[node name="Sprite" type="AnimatedSprite2D" parent="."]
|
|
|
|
use_parent_material = true
|
|
|
|
sprite_frames = SubResource("SpriteFrames_2h7cf")
|
|
|
|
animation = &"idle"
|
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
|
|
position = Vector2(0, 8)
|
|
|
|
shape = SubResource("RectangleShape2D_bfqew")
|
2022-11-13 15:42:04 -08:00
|
|
|
|
|
|
|
[node name="Debug" type="Control" parent="."]
|
2023-03-26 10:53:58 -07:00
|
|
|
visible = false
|
2022-11-13 15:42:04 -08:00
|
|
|
layout_mode = 3
|
|
|
|
anchors_preset = 0
|
|
|
|
|
|
|
|
[node name="State" type="Label" parent="Debug"]
|
2023-03-19 13:54:48 -07:00
|
|
|
layout_mode = 0
|
2022-11-13 15:42:04 -08:00
|
|
|
offset_left = -20.0
|
|
|
|
offset_top = -60.0
|
|
|
|
offset_right = 20.0
|
|
|
|
offset_bottom = -34.0
|
|
|
|
text = "lol"
|
|
|
|
label_settings = SubResource("LabelSettings_q5h1n")
|
|
|
|
horizontal_alignment = 1
|
|
|
|
|
|
|
|
[node name="Node" type="Node" parent="."]
|
2022-11-13 19:52:09 -08:00
|
|
|
|
|
|
|
[node name="Inventory" type="Node2D" parent="."]
|
2022-11-19 21:21:12 -08:00
|
|
|
y_sort_enabled = true
|
2023-05-23 00:25:28 -07:00
|
|
|
position = Vector2(0, 4)
|
2022-11-18 13:53:51 -08:00
|
|
|
script = ExtResource("7_xyenu")
|
2023-04-16 14:11:17 -07:00
|
|
|
InventoryMap = {
|
|
|
|
"equip_1": 0,
|
|
|
|
"equip_2": 1
|
|
|
|
}
|
2022-11-18 13:53:51 -08:00
|
|
|
|
|
|
|
[node name="Sword" parent="Inventory" instance=ExtResource("7_4rxuv")]
|
2023-05-23 00:25:28 -07:00
|
|
|
position = Vector2(0, 2)
|
2022-11-19 21:21:12 -08:00
|
|
|
|
|
|
|
[node name="Hurtbox" parent="." instance=ExtResource("9_avyu4")]
|
|
|
|
Faction = 1
|
|
|
|
|
|
|
|
[node name="CollisionShape2D" parent="Hurtbox" index="0"]
|
2023-05-23 00:25:28 -07:00
|
|
|
position = Vector2(0, 6)
|
2022-11-19 21:21:12 -08:00
|
|
|
shape = SubResource("RectangleShape2D_cjk6b")
|
|
|
|
|
2022-11-25 09:11:46 -08:00
|
|
|
[node name="FlashAnimation" type="AnimationPlayer" parent="."]
|
|
|
|
libraries = {
|
|
|
|
"": SubResource("AnimationLibrary_xe5eq")
|
|
|
|
}
|
|
|
|
|
2022-11-26 14:53:24 -08:00
|
|
|
[node name="HurtSound" type="AudioStreamPlayer2D" parent="."]
|
|
|
|
stream = ExtResource("12_h0x0g")
|
2023-03-19 23:36:36 -07:00
|
|
|
max_distance = 64.0
|
2022-11-26 14:53:24 -08:00
|
|
|
|
|
|
|
[node name="AudioListener2D" type="AudioListener2D" parent="."]
|
|
|
|
current = true
|
|
|
|
|
2022-11-19 21:21:12 -08:00
|
|
|
[connection signal="ReceivedDamage" from="Hurtbox" to="." method="_on_hurtbox_received_damage"]
|
|
|
|
|
|
|
|
[editable path="Hurtbox"]
|