2022-11-13 19:52:09 -08:00
|
|
|
[gd_scene load_steps=9 format=3 uid="uid://dymwd5ihpwyqm"]
|
2022-11-10 20:29:53 -08:00
|
|
|
|
|
|
|
[ext_resource type="Script" path="res://Characters/NPC.cs" id="1_4x3dm"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://bw052v8ikfget" path="res://icon.svg" id="2_ujqd7"]
|
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-10 20:29:53 -08:00
|
|
|
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_uict5"]
|
|
|
|
size = Vector2(32, 16)
|
|
|
|
|
2022-11-13 19:52:09 -08:00
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8lxmf"]
|
|
|
|
size = Vector2(32, 32)
|
|
|
|
|
2022-11-13 15:42:04 -08:00
|
|
|
[node name="ExampleEnemy" type="CharacterBody2D" node_paths=PackedStringArray("StateMachine")]
|
2022-11-10 20:29:53 -08:00
|
|
|
script = ExtResource("1_4x3dm")
|
2022-11-12 16:45:04 -08:00
|
|
|
Speed = 32.0
|
2022-11-13 15:42:04 -08:00
|
|
|
StateMachine = NodePath("StateMachine")
|
2022-11-10 20:29:53 -08:00
|
|
|
|
|
|
|
[node name="Icon" type="Sprite2D" parent="."]
|
|
|
|
scale = Vector2(0.25, 0.25)
|
|
|
|
texture = ExtResource("2_ujqd7")
|
|
|
|
|
|
|
|
[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")]
|
|
|
|
|
|
|
|
[node name="CollisionShape2D" parent="Hurtbox" index="0"]
|
|
|
|
shape = SubResource("RectangleShape2D_8lxmf")
|
|
|
|
|
|
|
|
[connection signal="ReceivedDamage" from="Hurtbox" to="." method="_on_hurtbox_received_damage"]
|
|
|
|
|
|
|
|
[editable path="Hurtbox"]
|