[gd_scene load_steps=7 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"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_uict5"] size = Vector2(32, 16) [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")