2022-11-19 21:21:12 -08:00
|
|
|
[gd_scene load_steps=19 format=3 uid="uid://dymwd5ihpwyqm"]
|
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"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://dxymfduyrbuvx" path="res://Sprites/Characters/forsen.png" id="2_jfku3"]
|
2022-11-13 15:42:04 -08:00
|
|
|
[ext_resource type="Script" path="res://Characters/States/Machine.cs" id="3_k4ypw"]
|
|
|
|
[ext_resource type="Script" path="res://Characters/States/NPCIdleState.cs" id="4_8r2qn"]
|
|
|
|
[ext_resource type="Script" path="res://Characters/States/NPCMoveState.cs" id="5_utogm"]
|
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"]
|
|
|
|
[ext_resource type="PackedScene" uid="uid://cajlwb67xenfy" path="res://Items/Weapons/Sword.tscn" id="8_s3c8r"]
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_6d2tf"]
|
|
|
|
atlas = ExtResource("2_jfku3")
|
|
|
|
region = Rect2(0, 0, 24, 24)
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_bdyma"]
|
|
|
|
atlas = ExtResource("2_jfku3")
|
|
|
|
region = Rect2(24, 0, 24, 24)
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_0dwbr"]
|
|
|
|
atlas = ExtResource("2_jfku3")
|
|
|
|
region = Rect2(48, 0, 24, 24)
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_r7fn6"]
|
|
|
|
atlas = ExtResource("2_jfku3")
|
|
|
|
region = Rect2(72, 0, 24, 24)
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_py8k0"]
|
|
|
|
atlas = ExtResource("2_jfku3")
|
|
|
|
region = Rect2(96, 0, 24, 24)
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_g3nb2"]
|
|
|
|
atlas = ExtResource("2_jfku3")
|
|
|
|
region = Rect2(120, 0, 24, 24)
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_jauql"]
|
|
|
|
atlas = ExtResource("2_jfku3")
|
|
|
|
region = Rect2(144, 0, 24, 24)
|
|
|
|
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_4tm2b"]
|
|
|
|
animations = [{
|
|
|
|
"frames": [SubResource("AtlasTexture_6d2tf"), SubResource("AtlasTexture_bdyma")],
|
|
|
|
"loop": true,
|
|
|
|
"name": &"idle",
|
|
|
|
"speed": 5.0
|
|
|
|
}, {
|
|
|
|
"frames": [SubResource("AtlasTexture_0dwbr"), SubResource("AtlasTexture_r7fn6"), SubResource("AtlasTexture_py8k0"), SubResource("AtlasTexture_g3nb2"), SubResource("AtlasTexture_jauql")],
|
|
|
|
"loop": true,
|
|
|
|
"name": &"move",
|
|
|
|
"speed": 12.0
|
|
|
|
}]
|
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"]
|
2022-11-19 21:21:12 -08:00
|
|
|
size = Vector2(16, 24)
|
2022-11-13 19:52:09 -08:00
|
|
|
|
2022-11-19 21:21:12 -08:00
|
|
|
[node name="ExampleEnemy" type="CharacterBody2D" node_paths=PackedStringArray("Sprite", "Inventory", "StateMachine")]
|
|
|
|
texture_filter = 3
|
|
|
|
y_sort_enabled = true
|
|
|
|
script = ExtResource("1_2yopk")
|
|
|
|
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 = 2
|
2022-11-10 20:29:53 -08:00
|
|
|
|
2022-11-19 21:21:12 -08:00
|
|
|
[node name="Sprite" type="AnimatedSprite2D" parent="."]
|
|
|
|
frames = SubResource("SpriteFrames_4tm2b")
|
|
|
|
animation = &"move"
|
|
|
|
playing = true
|
2022-11-10 20:29:53 -08:00
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
|
|
position = Vector2(0, 8)
|
|
|
|
shape = SubResource("RectangleShape2D_uict5")
|
2022-11-13 15:42:04 -08:00
|
|
|
|
|
|
|
[node name="StateMachine" type="Node" parent="." node_paths=PackedStringArray("InitialState", "Character")]
|
|
|
|
script = ExtResource("3_k4ypw")
|
|
|
|
InitialState = NodePath("Idle")
|
|
|
|
Character = NodePath("..")
|
|
|
|
|
|
|
|
[node name="Idle" type="Node" parent="StateMachine" node_paths=PackedStringArray("MoveState")]
|
|
|
|
script = ExtResource("4_8r2qn")
|
|
|
|
MoveState = NodePath("../Move")
|
|
|
|
|
|
|
|
[node name="Move" type="Node" parent="StateMachine" node_paths=PackedStringArray("IdleState")]
|
|
|
|
script = ExtResource("5_utogm")
|
|
|
|
IdleState = NodePath("../Idle")
|
2022-11-13 19:52:09 -08:00
|
|
|
|
|
|
|
[node name="Hurtbox" parent="." instance=ExtResource("6_jo0cg")]
|
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"]
|
|
|
|
shape = SubResource("RectangleShape2D_8lxmf")
|
|
|
|
|
2022-11-19 21:21:12 -08:00
|
|
|
[node name="Inventory" type="Node2D" parent="."]
|
|
|
|
y_sort_enabled = true
|
|
|
|
script = ExtResource("7_43gq8")
|
|
|
|
|
|
|
|
[node name="Sword" parent="Inventory" instance=ExtResource("8_s3c8r")]
|
|
|
|
|
2022-11-13 19:52:09 -08:00
|
|
|
[connection signal="ReceivedDamage" from="Hurtbox" to="." method="_on_hurtbox_received_damage"]
|
|
|
|
|
|
|
|
[editable path="Hurtbox"]
|