[gd_scene format=3 uid="uid://6athlweutl2g"] [ext_resource type="PackedScene" uid="uid://uyl0s1e67x6s" path="res://Scenes/Characters/Player/sprite.tscn" id="1_27cb7"] [ext_resource type="PackedScene" uid="uid://c2ydbmmvnfca6" path="res://Scenes/Characters/Player/state_machine.tscn" id="1_lyjr2"] [ext_resource type="Script" uid="uid://dacvayqstkvws" path="res://Scripts/Characters/Player/player.gd" id="1_qqvsf"] [ext_resource type="Script" uid="uid://b0l02v61if6k8" path="res://Scripts/Components/facing_direction_component.gd" id="1_siygm"] [ext_resource type="Script" uid="uid://dwclkwbig1uii" path="res://Scripts/Characters/Player/movement_component.gd" id="4_apx8m"] [ext_resource type="Script" uid="uid://brlisuoocwehh" path="res://Scripts/Characters/Player/interact_scanner.gd" id="6_fu1fx"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_apx8m"] size = Vector2(9, 5) [sub_resource type="RectangleShape2D" id="RectangleShape2D_fu1fx"] size = Vector2(6, 5) [node name="Player" type="CharacterBody2D" unique_id=1502234578] script = ExtResource("1_qqvsf") [node name="Components" type="Node" parent="." unique_id=567893784] [node name="FacingDirectionComponent" type="Node" parent="Components" unique_id=408127032] script = ExtResource("1_siygm") [node name="StateMachine" parent="." unique_id=732559774 instance=ExtResource("1_lyjr2")] [node name="Idle State" type="Node" parent="StateMachine" unique_id=2017409248] [node name="Walking State" type="Node" parent="StateMachine" unique_id=1661048365] [node name="MovementComponent" type="Node" parent="." unique_id=1773880772 node_paths=PackedStringArray("body")] script = ExtResource("4_apx8m") body = NodePath("..") [node name="Sprite" parent="." unique_id=1169131604 node_paths=PackedStringArray("state_machine", "direction_component") instance=ExtResource("1_27cb7")] state_machine = NodePath("../StateMachine") direction_component = NodePath("../Components/FacingDirectionComponent") [node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=495465356] position = Vector2(-0.5, 4.5) shape = SubResource("RectangleShape2D_apx8m") [node name="Marker2D" type="Marker2D" parent="." unique_id=2003544808] [node name="InteractScanner" type="Area2D" parent="Marker2D" unique_id=408353807 node_paths=PackedStringArray("parent", "direction_component")] collision_layer = 0 collision_mask = 2 script = ExtResource("6_fu1fx") parent = NodePath("..") direction_component = NodePath("../../Components/FacingDirectionComponent") [node name="CollisionShape2D" type="CollisionShape2D" parent="Marker2D/InteractScanner" unique_id=1274307485] position = Vector2(0, 9.5) shape = SubResource("RectangleShape2D_fu1fx") debug_color = Color(0.79959095, 0.41617078, 0.18507844, 0.41960785) [connection signal="DirectionChanged" from="Components/FacingDirectionComponent" to="Sprite" method="UpdateSprite"] [connection signal="DirectionChanged" from="Components/FacingDirectionComponent" to="Marker2D/InteractScanner" method="OnDirectionChanged"] [connection signal="MovementPerformed" from="MovementComponent" to="Components/FacingDirectionComponent" method="ChangeDirectionUsingMovementVector"] [connection signal="area_entered" from="Marker2D/InteractScanner" to="." method="_on_interact_scanner_area_entered"] [connection signal="area_exited" from="Marker2D/InteractScanner" to="." method="_on_interact_scanner_area_exited"]