SupaLidlGame/Characters/ExampleEnemy.tscn

152 lines
5.3 KiB
Plaintext
Raw Normal View History

2023-10-02 00:10:24 -07:00
[gd_scene load_steps=19 format=3 uid="uid://bf55wbq7m1gpp"]
2022-11-10 20:29:53 -08:00
2022-11-19 21:21:12 -08:00
[ext_resource type="Script" path="res://Characters/Enemy.cs" id="1_2yopk"]
2022-11-25 09:11:46 -08:00
[ext_resource type="Shader" path="res://Shaders/Flash.gdshader" id="1_fx1w5"]
2023-04-23 21:10:37 -07:00
[ext_resource type="Texture2D" uid="uid://bej8thq7ruyty" path="res://Assets/Sprites/Characters/forsen2.png" id="3_ocaae"]
2023-05-25 15:28:33 -07:00
[ext_resource type="Script" path="res://State/Character/CharacterStateMachine.cs" id="4_424ux"]
[ext_resource type="Script" path="res://State/Character/NPCIdleState.cs" id="5_tn4cf"]
[ext_resource type="Script" path="res://State/Character/NPCMoveState.cs" id="6_73mr6"]
2023-10-02 00:10:24 -07:00
[ext_resource type="Script" path="res://State/Thinker/ThinkerStateMachine.cs" id="6_and4s"]
2022-11-13 19:52:09 -08:00
[ext_resource type="PackedScene" uid="uid://cjgxyhgcyvsv7" path="res://BoundingBoxes/Hurtbox.tscn" id="6_jo0cg"]
2022-11-19 21:21:12 -08:00
[ext_resource type="Script" path="res://Items/Inventory.cs" id="7_43gq8"]
2023-10-02 00:10:24 -07:00
[ext_resource type="Script" path="res://State/Thinker/AttackState.cs" id="7_bp1d0"]
2023-05-26 22:28:08 -07:00
[ext_resource type="PackedScene" uid="uid://dvqap2uhcah63" path="res://Items/Weapons/Sword.tscn" id="8_s3c8r"]
2022-11-26 14:53:24 -08:00
[ext_resource type="AudioStream" uid="uid://njun3e6v4854" path="res://Assets/Sounds/hurt.wav" id="10_n1e64"]
2022-11-25 09:11:46 -08:00
2022-11-27 19:37:16 -08:00
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ms3xg"]
resource_local_to_scene = true
2022-11-25 09:11:46 -08:00
shader = ExtResource("1_fx1w5")
2023-03-19 23:36:36 -07:00
shader_parameter/color = Quaternion(1, 1, 1, 1)
2022-11-25 09:11:46 -08:00
shader_parameter/intensity = 0.0
2023-07-31 01:12:47 -07:00
shader_parameter/alpha_modulate = 1.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="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="AnimationLibrary" id="AnimationLibrary_xe5eq"]
_data = {
"RESET": SubResource("Animation_k6l16"),
"hurt": SubResource("Animation_dxevc")
}
2022-11-19 21:21:12 -08:00
2022-11-10 20:29:53 -08:00
[sub_resource type="RectangleShape2D" id="RectangleShape2D_uict5"]
2022-11-19 21:21:12 -08:00
size = Vector2(16, 8)
2022-11-10 20:29:53 -08:00
2022-11-13 19:52:09 -08:00
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8lxmf"]
2023-04-23 21:10:37 -07:00
size = Vector2(16, 18)
2022-11-13 19:52:09 -08:00
2023-10-02 00:10:24 -07:00
[node name="ExampleEnemy" type="CharacterBody2D" node_paths=PackedStringArray("ThinkerStateMachine", "Sprite", "Inventory", "StateMachine", "Hurtbox")]
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-27 19:37:16 -08:00
material = SubResource("ShaderMaterial_ms3xg")
collision_layer = 10
2023-05-23 00:25:28 -07:00
collision_mask = 17
2022-11-19 21:21:12 -08:00
script = ExtResource("1_2yopk")
2023-10-02 00:10:24 -07:00
ThinkerStateMachine = NodePath("ThinkerStateMachine")
2022-11-25 09:11:46 -08:00
Health = 50.0
2023-10-02 00:10:24 -07:00
Sprite = NodePath("Sprites/Node2D/Character")
2022-11-19 21:21:12 -08:00
Inventory = NodePath("Inventory")
2022-11-13 15:42:04 -08:00
StateMachine = NodePath("StateMachine")
2023-06-10 22:15:28 -07:00
Hurtbox = NodePath("Hurtbox")
2022-11-19 21:21:12 -08:00
Faction = 2
2022-11-10 20:29:53 -08:00
2023-05-25 15:28:33 -07:00
[node name="StateMachine" type="Node" parent="." node_paths=PackedStringArray("InitialState", "Character")]
script = ExtResource("4_424ux")
InitialState = NodePath("Idle")
Character = NodePath("..")
[node name="Idle" type="Node" parent="StateMachine" node_paths=PackedStringArray("MoveState", "Character")]
script = ExtResource("5_tn4cf")
MoveState = NodePath("../Move")
Character = NodePath("../..")
[node name="Move" type="Node" parent="StateMachine" node_paths=PackedStringArray("IdleState", "Character")]
script = ExtResource("6_73mr6")
IdleState = NodePath("../Idle")
Character = NodePath("../..")
2023-10-02 00:10:24 -07:00
[node name="ThinkerStateMachine" type="Node" parent="." node_paths=PackedStringArray("InitialState")]
script = ExtResource("6_and4s")
InitialState = NodePath("Attack")
[node name="Attack" type="Node" parent="ThinkerStateMachine" node_paths=PackedStringArray("NPC")]
script = ExtResource("7_bp1d0")
NPC = NodePath("../..")
2023-07-31 01:12:47 -07:00
[node name="Animations" type="Node" parent="."]
[node name="HurtAnimation" type="AnimationPlayer" parent="Animations"]
root_node = NodePath("../..")
libraries = {
"": SubResource("AnimationLibrary_xe5eq")
}
2023-10-02 00:10:24 -07:00
[node name="Sprites" type="Node2D" parent="."]
unique_name_in_owner = true
y_sort_enabled = true
2023-04-23 21:10:37 -07:00
use_parent_material = true
2023-10-02 00:10:24 -07:00
position = Vector2(-0.5, 0)
[node name="Node2D" type="Node2D" parent="Sprites"]
use_parent_material = true
[node name="Character" type="Sprite2D" parent="Sprites/Node2D"]
use_parent_material = true
position = Vector2(0, -8)
texture = ExtResource("3_ocaae")
offset = Vector2(0, -4)
hframes = 46
2022-11-10 20:29:53 -08:00
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
2023-05-23 00:25:28 -07:00
position = Vector2(0, 4)
2022-11-10 20:29:53 -08:00
shape = SubResource("RectangleShape2D_uict5")
2022-11-13 15:42:04 -08:00
2022-11-13 19:52:09 -08:00
[node name="Hurtbox" parent="." instance=ExtResource("6_jo0cg")]
2023-05-23 00:25:28 -07:00
position = Vector2(0, -4)
2022-11-19 21:21:12 -08:00
Faction = 2
2022-11-13 19:52:09 -08:00
[node name="CollisionShape2D" parent="Hurtbox" index="0"]
2023-04-23 21:10:37 -07:00
position = Vector2(0, 4)
2022-11-13 19:52:09 -08:00
shape = SubResource("RectangleShape2D_8lxmf")
2022-11-19 21:21:12 -08:00
[node name="Inventory" type="Node2D" parent="."]
y_sort_enabled = true
2023-10-02 00:10:24 -07:00
position = Vector2(0, -4)
2022-11-19 21:21:12 -08:00
script = ExtResource("7_43gq8")
[node name="Sword" parent="Inventory" instance=ExtResource("8_s3c8r")]
2023-04-16 14:11:17 -07:00
Knockback = 100.0
2022-11-25 09:11:46 -08:00
2022-11-26 14:53:24 -08:00
[node name="HurtSound" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("10_n1e64")
2022-11-13 19:52:09 -08:00
[editable path="Hurtbox"]