296 lines
10 KiB
Plaintext
296 lines
10 KiB
Plaintext
[gd_scene load_steps=36 format=3 uid="uid://dhamcei7tfta8"]
|
|
|
|
[ext_resource type="Shader" path="res://Shaders/Flash.gdshader" id="1_msit5"]
|
|
[ext_resource type="Script" path="res://Characters/Enemy.cs" id="2_pkari"]
|
|
[ext_resource type="Script" path="res://State/Character/CharacterStateMachine.cs" id="3_2dbgx"]
|
|
[ext_resource type="Script" path="res://State/Character/NPCIdleState.cs" id="4_47f2d"]
|
|
[ext_resource type="Script" path="res://State/Character/NPCMoveState.cs" id="5_iphm1"]
|
|
[ext_resource type="Script" path="res://State/Thinker/ThinkerStateMachine.cs" id="6_6516i"]
|
|
[ext_resource type="Script" path="res://State/Thinker/CenturionAttackState.cs" id="7_n2slg"]
|
|
[ext_resource type="Script" path="res://State/Thinker/IdleState.cs" id="8_5neew"]
|
|
[ext_resource type="Script" path="res://Utils/AnimationManager.cs" id="9_fgnr2"]
|
|
[ext_resource type="AnimationLibrary" uid="uid://xs6g84fkepjr" path="res://Assets/Animations/npc_hurt.res" id="10_bbwbd"]
|
|
[ext_resource type="AnimationLibrary" uid="uid://f1aqhnxndybx" path="res://Assets/Animations/npc_stun.res" id="11_a0f8a"]
|
|
[ext_resource type="Material" uid="uid://bat28samf7ukd" path="res://Assets/Sprites/Particles/NPCDamageProcessMaterial.tres" id="11_p7yev"]
|
|
[ext_resource type="Texture2D" uid="uid://bd8l8kafb42dt" path="res://Assets/Sprites/Particles/circle.png" id="12_t3nnt"]
|
|
[ext_resource type="Material" uid="uid://2tsvsp45elru" path="res://Assets/Sprites/Particles/NPCDeathParticles.tres" id="13_nm3wd"]
|
|
[ext_resource type="Texture2D" uid="uid://c1a7lvb4uuwfy" path="res://Assets/Sprites/Particles/circle-16.png" id="14_o5rd3"]
|
|
[ext_resource type="AudioStream" uid="uid://k6kpdj1kv0jg" path="res://Assets/Sounds/splat.ogg" id="15_8yg1g"]
|
|
[ext_resource type="Texture2D" uid="uid://cfyd6sv4yeplt" path="res://Assets/Sprites/Characters/doc-centurion.png" id="16_6uxxp"]
|
|
[ext_resource type="Script" path="res://Items/Inventory.cs" id="17_6fh5y"]
|
|
[ext_resource type="PackedScene" uid="uid://5y1acxl4j4n7" path="res://Items/Weapons/Pugio.tscn" id="18_7l8tj"]
|
|
[ext_resource type="PackedScene" uid="uid://cjgxyhgcyvsv7" path="res://BoundingBoxes/Hurtbox.tscn" id="19_xol7n"]
|
|
|
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_2fq6c"]
|
|
resource_local_to_scene = true
|
|
shader = ExtResource("1_msit5")
|
|
shader_parameter/color = Vector4(1, 1, 1, 1)
|
|
shader_parameter/intensity = 0.0
|
|
shader_parameter/alpha_modulate = 1.0
|
|
|
|
[sub_resource type="Animation" id="Animation_rqtrh"]
|
|
length = 0.001
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("%Sprites/Node2D/Character:frame")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 1,
|
|
"values": [0]
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_qws2q"]
|
|
resource_name = "idle"
|
|
length = 0.8
|
|
loop_mode = 1
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("%Sprites/Node2D/Character:frame")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 1,
|
|
"values": [0]
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_dwyme"]
|
|
resource_name = "move"
|
|
length = 0.6
|
|
loop_mode = 1
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("./Sprites/Node2D/Character:frame")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/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": [1, 2, 3, 4, 5, 6]
|
|
}
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_uqsue"]
|
|
_data = {
|
|
"RESET": SubResource("Animation_rqtrh"),
|
|
"idle": SubResource("Animation_qws2q"),
|
|
"move": SubResource("Animation_dwyme")
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_adxyh"]
|
|
resource_local_to_scene = true
|
|
length = 0.001
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_sxq14"]
|
|
_data = {
|
|
"RESET": SubResource("Animation_adxyh")
|
|
}
|
|
|
|
[sub_resource type="CanvasTexture" id="CanvasTexture_pited"]
|
|
diffuse_texture = ExtResource("14_o5rd3")
|
|
|
|
[sub_resource type="Gradient" id="Gradient_b2o0f"]
|
|
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
|
|
|
|
[sub_resource type="GradientTexture1D" id="GradientTexture1D_tfqqu"]
|
|
gradient = SubResource("Gradient_b2o0f")
|
|
|
|
[sub_resource type="Curve" id="Curve_30p4b"]
|
|
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.2, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.5), 0.0, 0.0, 0, 0]
|
|
point_count = 3
|
|
|
|
[sub_resource type="CurveTexture" id="CurveTexture_pcpms"]
|
|
curve = SubResource("Curve_30p4b")
|
|
|
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_qdhau"]
|
|
particle_flag_disable_z = true
|
|
spread = 180.0
|
|
initial_velocity_min = 32.0
|
|
initial_velocity_max = 32.0
|
|
angular_velocity_min = 90.0
|
|
angular_velocity_max = 90.0
|
|
gravity = Vector3(0, 0, 0)
|
|
linear_accel_min = -64.0
|
|
linear_accel_max = -32.0
|
|
tangential_accel_min = 8.0
|
|
tangential_accel_max = 8.0
|
|
scale_min = 0.13
|
|
scale_max = 0.25
|
|
scale_curve = SubResource("CurveTexture_pcpms")
|
|
color = Color(1, 0, 0, 1)
|
|
color_ramp = SubResource("GradientTexture1D_tfqqu")
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_bfqew"]
|
|
size = Vector2(12, 8)
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1gjgc"]
|
|
size = Vector2(12, 16)
|
|
|
|
[node name="Centurion" type="CharacterBody2D" node_paths=PackedStringArray("DefaultSelectedItem", "ThinkerStateMachine", "Sprite", "Inventory", "StateMachine", "Hurtbox")]
|
|
y_sort_enabled = true
|
|
texture_filter = 3
|
|
material = SubResource("ShaderMaterial_2fq6c")
|
|
collision_layer = 6
|
|
collision_mask = 17
|
|
script = ExtResource("2_pkari")
|
|
DefaultSelectedItem = NodePath("Inventory/Sword")
|
|
ThinkerStateMachine = NodePath("ThinkerStateMachine")
|
|
Speed = 40.0
|
|
Mass = 2.0
|
|
Health = 80.0
|
|
Sprite = NodePath("Sprites/Node2D/Character")
|
|
Inventory = NodePath("Inventory")
|
|
StateMachine = NodePath("StateMachine")
|
|
Hurtbox = NodePath("Hurtbox")
|
|
|
|
[node name="StateMachine" type="Node" parent="." node_paths=PackedStringArray("InitialState", "Character")]
|
|
script = ExtResource("3_2dbgx")
|
|
InitialState = NodePath("Idle")
|
|
Character = NodePath("..")
|
|
|
|
[node name="Idle" type="Node" parent="StateMachine" node_paths=PackedStringArray("MoveState", "Character")]
|
|
script = ExtResource("4_47f2d")
|
|
MoveState = NodePath("../Move")
|
|
Character = NodePath("../..")
|
|
|
|
[node name="Move" type="Node" parent="StateMachine" node_paths=PackedStringArray("IdleState", "Character")]
|
|
script = ExtResource("5_iphm1")
|
|
IdleState = NodePath("../Idle")
|
|
Character = NodePath("../..")
|
|
|
|
[node name="ThinkerStateMachine" type="Node" parent="." node_paths=PackedStringArray("InitialState")]
|
|
script = ExtResource("6_6516i")
|
|
InitialState = NodePath("Idle")
|
|
|
|
[node name="Attack" type="Node" parent="ThinkerStateMachine" node_paths=PackedStringArray("NavigationAgent", "PassiveState", "PursueState", "NPC")]
|
|
script = ExtResource("7_n2slg")
|
|
FollowTeammate = true
|
|
NavigationAgent = NodePath("../../NavigationAgent2D")
|
|
PathfindingDistance = 32.0
|
|
PreferredWeightDistance = 24.0
|
|
MaxDistanceToTarget = 128.0
|
|
UseItemDistance = 48.0
|
|
PassiveState = NodePath("../Idle")
|
|
PursueState = NodePath("../Idle")
|
|
NPC = NodePath("../..")
|
|
|
|
[node name="Idle" type="Node" parent="ThinkerStateMachine" node_paths=PackedStringArray("PursueState", "NavigationAgent", "NPC")]
|
|
script = ExtResource("8_5neew")
|
|
PursueState = NodePath("../Attack")
|
|
MinTargetDistance = 24.0
|
|
PursueOnLineOfSight = true
|
|
MinLineOfSightDistance = 256.0
|
|
NavigationAgent = NodePath("../../NavigationAgent2D")
|
|
NPC = NodePath("../..")
|
|
|
|
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
|
|
target_desired_distance = 16.0
|
|
debug_enabled = true
|
|
|
|
[node name="Animations" type="Node" parent="."]
|
|
script = ExtResource("9_fgnr2")
|
|
|
|
[node name="Movement" type="AnimationPlayer" parent="Animations"]
|
|
root_node = NodePath("../..")
|
|
libraries = {
|
|
"": SubResource("AnimationLibrary_uqsue")
|
|
}
|
|
|
|
[node name="Attack" type="AnimationPlayer" parent="Animations"]
|
|
root_node = NodePath("../..")
|
|
libraries = {
|
|
"": SubResource("AnimationLibrary_sxq14")
|
|
}
|
|
|
|
[node name="Hurt" type="AnimationPlayer" parent="Animations"]
|
|
root_node = NodePath("../..")
|
|
libraries = {
|
|
"": ExtResource("10_bbwbd")
|
|
}
|
|
|
|
[node name="Stun" type="AnimationPlayer" parent="Animations"]
|
|
root_node = NodePath("../..")
|
|
libraries = {
|
|
"": ExtResource("11_a0f8a")
|
|
}
|
|
|
|
[node name="Effects" type="Node2D" parent="."]
|
|
unique_name_in_owner = true
|
|
|
|
[node name="HurtParticles" type="GPUParticles2D" parent="Effects"]
|
|
position = Vector2(0, -8)
|
|
emitting = false
|
|
process_material = ExtResource("11_p7yev")
|
|
texture = ExtResource("12_t3nnt")
|
|
lifetime = 0.4
|
|
one_shot = true
|
|
explosiveness = 1.0
|
|
|
|
[node name="DeathParticles" type="GPUParticles2D" parent="Effects"]
|
|
emitting = false
|
|
amount = 32
|
|
process_material = ExtResource("13_nm3wd")
|
|
texture = SubResource("CanvasTexture_pited")
|
|
lifetime = 2.0
|
|
one_shot = true
|
|
preprocess = 0.1
|
|
explosiveness = 0.9
|
|
|
|
[node name="SpawnParticles" type="GPUParticles2D" parent="Effects"]
|
|
emitting = false
|
|
amount = 24
|
|
process_material = SubResource("ParticleProcessMaterial_qdhau")
|
|
texture = ExtResource("14_o5rd3")
|
|
|
|
[node name="HurtSound" type="AudioStreamPlayer2D" parent="Effects"]
|
|
stream = ExtResource("15_8yg1g")
|
|
|
|
[node name="Sprites" type="Node2D" parent="."]
|
|
unique_name_in_owner = true
|
|
y_sort_enabled = true
|
|
use_parent_material = true
|
|
position = Vector2(-0.5, 4)
|
|
rotation = 6.28319
|
|
|
|
[node name="Node2D" type="Node2D" parent="Sprites"]
|
|
use_parent_material = true
|
|
|
|
[node name="Character" type="Sprite2D" parent="Sprites/Node2D"]
|
|
use_parent_material = true
|
|
texture = ExtResource("16_6uxxp")
|
|
offset = Vector2(0, -12)
|
|
hframes = 7
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
shape = SubResource("RectangleShape2D_bfqew")
|
|
|
|
[node name="Inventory" type="Node2D" parent="." node_paths=PackedStringArray("Hotbar")]
|
|
y_sort_enabled = true
|
|
script = ExtResource("17_6fh5y")
|
|
Hotbar = []
|
|
Items = []
|
|
|
|
[node name="Sword" parent="Inventory" node_paths=PackedStringArray("Hitbox", "AnimationPlayer", "ParryParticles", "StateMachine", "Anchor", "HandAnchor") instance=ExtResource("18_7l8tj")]
|
|
Hitbox = NodePath("Hitbox")
|
|
AnimationPlayer = NodePath("AnimationPlayer")
|
|
ParryParticles = NodePath("Anchor/Node2D/Sprite2D/ParryParticles")
|
|
StateMachine = NodePath("State")
|
|
Anchor = NodePath("Anchor")
|
|
HandAnchor = NodePath("Anchor/Node2D/Sprite2D/Hand")
|
|
|
|
[node name="Hurtbox" parent="." instance=ExtResource("19_xol7n")]
|
|
position = Vector2(0, 4)
|
|
|
|
[node name="CollisionShape2D" parent="Hurtbox" index="0"]
|
|
position = Vector2(0, -8)
|
|
shape = SubResource("RectangleShape2D_1gjgc")
|
|
|
|
[editable path="Hurtbox"]
|