SupaLidlGame/Characters/ExampleEnemy.tscn

50 lines
2.0 KiB
Plaintext

[gd_scene load_steps=9 format=3 uid="uid://dymwd5ihpwyqm"]
[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"]
[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"]
[ext_resource type="PackedScene" uid="uid://cjgxyhgcyvsv7" path="res://BoundingBoxes/Hurtbox.tscn" id="6_jo0cg"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_uict5"]
size = Vector2(32, 16)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8lxmf"]
size = Vector2(32, 32)
[node name="ExampleEnemy" type="CharacterBody2D" node_paths=PackedStringArray("StateMachine")]
script = ExtResource("1_4x3dm")
Speed = 32.0
StateMachine = NodePath("StateMachine")
[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")
[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")
[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"]