Compare commits
2 Commits
beta-1.6/p
...
155bf2202e
| Author | SHA1 | Date | |
|---|---|---|---|
| 155bf2202e | |||
| 9f057f6c16 |
@@ -1,7 +0,0 @@
|
|||||||
[gd_scene format=3 uid="uid://6athlweutl2g"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dacvayqstkvws" path="res://Entities/Characters/Player/Scripts/player_body.gd" id="1_qqvsf"]
|
|
||||||
|
|
||||||
[node name="Player Body" type="CharacterBody2D" unique_id=1502234578 groups=["Player Group"]]
|
|
||||||
y_sort_enabled = true
|
|
||||||
script = ExtResource("1_qqvsf")
|
|
||||||
@@ -1,491 +0,0 @@
|
|||||||
[gd_scene format=3 uid="uid://uyl0s1e67x6s"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cuar23q48cbja" path="res://Entities/Characters/Player/Scripts/sprite.gd" id="1_jqxwg"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://d1mourl3rq437" path="res://Assets/Spritesheets/Player/player-full-01.png" id="2_ndjja"]
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kg8vi"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(0, 1472, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_eqnrc"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(64, 1472, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rr1pu"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(128, 1472, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_85fw5"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(0, 1536, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5dpey"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(64, 1536, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vk7kj"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(128, 1536, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3ej6w"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(0, 1600, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_j7iyf"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(64, 1600, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gw75a"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(128, 1600, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w2nd7"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(192, 1472, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rd4wh"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(256, 1472, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rwmr7"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(320, 1472, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_na211"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(192, 1536, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kl0pt"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(256, 1536, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_sdskq"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(320, 1536, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1dk7p"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(192, 1600, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5pvpc"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(256, 1600, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3uof2"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(320, 1600, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0s5vo"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(0, 0, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_iy4ef"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(64, 0, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1l5y2"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(128, 0, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tbera"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(192, 0, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6giml"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(256, 0, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_huf5g"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(320, 0, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bsgi0"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(0, 64, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_72dk0"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(64, 64, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gwc2p"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(128, 64, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g4n6s"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(192, 64, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tvm7c"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(256, 64, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_amsyc"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(320, 64, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ei8qf"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(0, 128, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3fwgt"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(64, 128, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_83xkn"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(128, 128, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_df3jv"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(192, 128, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bwglw"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(256, 128, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_j74gm"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(320, 128, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_e1olu"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(0, 1280, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jmdrl"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(64, 1280, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wk3mk"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(128, 1280, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8mpdo"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(192, 1280, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_46inv"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(256, 1280, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_s6rq5"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(0, 192, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pu3ni"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(64, 192, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qdlmc"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(128, 192, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wfvue"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(192, 192, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pdvtf"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(256, 192, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_k84dj"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(320, 192, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_thygw"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(0, 256, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_soxdi"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(64, 256, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bexkr"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(128, 256, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_7vbqj"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(192, 256, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_xlw27"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(256, 256, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1unn3"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(320, 256, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_n4kyy"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(0, 320, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6pm4n"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(64, 320, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_2mqt6"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(128, 320, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_4bosx"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(192, 320, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_xx24f"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(256, 320, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fftbb"]
|
|
||||||
atlas = ExtResource("2_ndjja")
|
|
||||||
region = Rect2(320, 320, 64, 64)
|
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id="SpriteFrames_jqxwg"]
|
|
||||||
animations = [{
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_kg8vi")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_eqnrc")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_rr1pu")
|
|
||||||
}],
|
|
||||||
"loop": false,
|
|
||||||
"name": &"drawing-bow-down",
|
|
||||||
"speed": 5.0
|
|
||||||
}, {
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_85fw5")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_5dpey")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_vk7kj")
|
|
||||||
}],
|
|
||||||
"loop": false,
|
|
||||||
"name": &"drawing-bow-side",
|
|
||||||
"speed": 5.0
|
|
||||||
}, {
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_3ej6w")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_j7iyf")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_gw75a")
|
|
||||||
}],
|
|
||||||
"loop": false,
|
|
||||||
"name": &"drawing-bow-up",
|
|
||||||
"speed": 5.0
|
|
||||||
}, {
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_w2nd7")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_rd4wh")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_rwmr7")
|
|
||||||
}],
|
|
||||||
"loop": false,
|
|
||||||
"name": &"firing-arrow-down",
|
|
||||||
"speed": 5.0
|
|
||||||
}, {
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_na211")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_kl0pt")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_sdskq")
|
|
||||||
}],
|
|
||||||
"loop": false,
|
|
||||||
"name": &"firing-arrow-side",
|
|
||||||
"speed": 5.0
|
|
||||||
}, {
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_1dk7p")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_5pvpc")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_3uof2")
|
|
||||||
}],
|
|
||||||
"loop": false,
|
|
||||||
"name": &"firing-arrow-up",
|
|
||||||
"speed": 5.0
|
|
||||||
}, {
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_0s5vo")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_iy4ef")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_1l5y2")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_tbera")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_6giml")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_huf5g")
|
|
||||||
}],
|
|
||||||
"loop": true,
|
|
||||||
"name": &"idle-down",
|
|
||||||
"speed": 5.0
|
|
||||||
}, {
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_bsgi0")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_72dk0")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_gwc2p")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_g4n6s")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_tvm7c")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_amsyc")
|
|
||||||
}],
|
|
||||||
"loop": true,
|
|
||||||
"name": &"idle-side",
|
|
||||||
"speed": 5.0
|
|
||||||
}, {
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_ei8qf")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_3fwgt")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_83xkn")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_df3jv")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_bwglw")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_j74gm")
|
|
||||||
}],
|
|
||||||
"loop": true,
|
|
||||||
"name": &"idle-up",
|
|
||||||
"speed": 5.0
|
|
||||||
}, {
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_e1olu")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_jmdrl")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_wk3mk")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_8mpdo")
|
|
||||||
}, {
|
|
||||||
"duration": 8.0,
|
|
||||||
"texture": SubResource("AtlasTexture_46inv")
|
|
||||||
}],
|
|
||||||
"loop": false,
|
|
||||||
"name": &"opening-chest-down",
|
|
||||||
"speed": 8.0
|
|
||||||
}, {
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_s6rq5")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_pu3ni")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_qdlmc")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_wfvue")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_pdvtf")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_k84dj")
|
|
||||||
}],
|
|
||||||
"loop": true,
|
|
||||||
"name": &"walking-down",
|
|
||||||
"speed": 10.0
|
|
||||||
}, {
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_thygw")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_soxdi")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_bexkr")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_7vbqj")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_xlw27")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_1unn3")
|
|
||||||
}],
|
|
||||||
"loop": true,
|
|
||||||
"name": &"walking-side",
|
|
||||||
"speed": 10.0
|
|
||||||
}, {
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_n4kyy")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_6pm4n")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_2mqt6")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_4bosx")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_xx24f")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_fftbb")
|
|
||||||
}],
|
|
||||||
"loop": true,
|
|
||||||
"name": &"walking-up",
|
|
||||||
"speed": 10.0
|
|
||||||
}]
|
|
||||||
|
|
||||||
[node name="Sprite" type="AnimatedSprite2D" unique_id=1296959783]
|
|
||||||
sprite_frames = SubResource("SpriteFrames_jqxwg")
|
|
||||||
animation = &"idle-down"
|
|
||||||
autoplay = "idle-down"
|
|
||||||
script = ExtResource("1_jqxwg")
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
@export var state_machine: PlayerStateMachine
|
||||||
|
|
||||||
|
# Public Methods
|
||||||
|
func OnMovementInput(_movement_vector: Vector2) -> void:
|
||||||
|
var current_state := state_machine.GetCurrentStateEnum()
|
||||||
|
if current_state == PlayerStateMachine.States.IDLE:
|
||||||
|
var idle_state := state_machine.current_state as PlayerIdleState
|
||||||
|
idle_state.QueueMovement()
|
||||||
@@ -3,11 +3,8 @@ extends Node
|
|||||||
|
|
||||||
@export var state_machine: PlayerStateMachine
|
@export var state_machine: PlayerStateMachine
|
||||||
|
|
||||||
var _subscribed_events: Array[String] = []
|
|
||||||
var _subscribed_events_callables: Array[Callable] = []
|
|
||||||
|
|
||||||
func GetStateEnum() -> PlayerStateMachine.States:
|
func GetStateEnum() -> PlayerStateMachine.States:
|
||||||
push_error("Unimplemented Method: BaseState.GetStateEnum")
|
push_error("Unimplemented Method: BaseState.GetName")
|
||||||
return PlayerStateMachine.States.IDLE
|
return PlayerStateMachine.States.IDLE
|
||||||
|
|
||||||
|
|
||||||
@@ -34,23 +31,3 @@ func IsActive() -> bool:
|
|||||||
|
|
||||||
func IsStateActionable() -> bool:
|
func IsStateActionable() -> bool:
|
||||||
return true
|
return true
|
||||||
|
|
||||||
|
|
||||||
func SubscribeToEvent(event_name: String, callback: Callable) -> void:
|
|
||||||
if _subscribed_events.has(event_name):
|
|
||||||
return
|
|
||||||
_subscribed_events.append(event_name)
|
|
||||||
_subscribed_events_callables.append(callback)
|
|
||||||
|
|
||||||
|
|
||||||
# State Machine Visibility Only
|
|
||||||
func _StateMachine_OnEventSent(event_name: String, parameters: Variant) -> void:
|
|
||||||
var idx := _subscribed_events.find(event_name)
|
|
||||||
if idx == -1:
|
|
||||||
push_error("THIS SHOULD NEVER HAPPEN LOL")
|
|
||||||
|
|
||||||
var callable := _subscribed_events_callables[idx]
|
|
||||||
if callable.get_argument_count() == 0:
|
|
||||||
callable.call()
|
|
||||||
else:
|
|
||||||
callable.call(parameters)
|
|
||||||
|
|||||||
@@ -1,14 +1,52 @@
|
|||||||
extends BaseState
|
extends BaseState
|
||||||
|
class_name PlayerIdleState
|
||||||
|
|
||||||
# idle_state.gd
|
signal PlayerBecameIdle
|
||||||
|
|
||||||
func _ready() -> void:
|
@export var player: PlayerCharacter
|
||||||
SubscribeToEvent("MovementQueued", OnMovementQueued)
|
|
||||||
|
|
||||||
|
var _movement_component: MovementComponent
|
||||||
func OnMovementQueued(dv: Vector2) -> void:
|
var _sit_queued := false
|
||||||
state_machine.QueueStateChange(PlayerStateMachine.States.WALKING, {"dv": dv})
|
var _sit_queue_pos: Vector2
|
||||||
|
var _sit_queue_dir: Enums.Directions
|
||||||
|
|
||||||
|
|
||||||
func GetStateEnum() -> PlayerStateMachine.States:
|
func GetStateEnum() -> PlayerStateMachine.States:
|
||||||
return PlayerStateMachine.States.IDLE
|
return PlayerStateMachine.States.IDLE
|
||||||
|
|
||||||
|
|
||||||
|
func Enter(_extra_parameters: Dictionary) -> void:
|
||||||
|
_movement_component = ComponentUtils.GetMovementComponent(player)
|
||||||
|
if not _movement_component:
|
||||||
|
print_rich("[color=yellow]Warning: Player does not have a movement component...[/color]")
|
||||||
|
|
||||||
|
PlayerBecameIdle.emit()
|
||||||
|
|
||||||
|
|
||||||
|
func Update(_delta: float) -> void:
|
||||||
|
var item_a := Input.is_action_just_pressed("use_item_a")
|
||||||
|
|
||||||
|
if item_a:
|
||||||
|
state_machine.QueueStateChange(PlayerStateMachine.States.USING_ITEM_A, {})
|
||||||
|
return
|
||||||
|
|
||||||
|
if _sit_queued:
|
||||||
|
state_machine.QueueStateChange(PlayerStateMachine.States.SITTING, {"pos": _sit_queue_pos, "dir": _sit_queue_dir})
|
||||||
|
_sit_queued = false
|
||||||
|
return
|
||||||
|
|
||||||
|
if _movement_component and _movement_component.movement_vector != Vector2.ZERO:
|
||||||
|
state_machine.QueueStateChange(PlayerStateMachine.States.WALKING)
|
||||||
|
|
||||||
|
|
||||||
|
func OnSitOnFurnitureTriggered(sitting_position: Vector2, sitting_direction: Enums.Directions) -> void:
|
||||||
|
if state_machine.GetCurrentStateEnum() != GetStateEnum():
|
||||||
|
return
|
||||||
|
|
||||||
|
_sit_queued = true
|
||||||
|
_sit_queue_pos = sitting_position
|
||||||
|
_sit_queue_dir = sitting_direction
|
||||||
|
|
||||||
|
|
||||||
|
func OnCutsceneStarted() -> void:
|
||||||
|
state_machine.QueueStateChange(PlayerStateMachine.States.CUTSCENE)
|
||||||
|
|||||||
@@ -1,40 +1,30 @@
|
|||||||
extends BaseState
|
extends BaseState
|
||||||
|
|
||||||
# walking_state.gd
|
|
||||||
|
|
||||||
signal StartedWalking
|
signal StartedWalking
|
||||||
|
|
||||||
@export var walking_speed := 100
|
@export var walking_speed := 100
|
||||||
|
@export var direction_component: FacingDirectionComponent
|
||||||
@export var body: CharacterBody2D
|
@export var body: CharacterBody2D
|
||||||
|
|
||||||
var _queued_dv: Vector2
|
var _movement_component: MovementComponent
|
||||||
|
|
||||||
func _ready() -> void:
|
func GetStateEnum() -> PlayerStateMachine.States:
|
||||||
SubscribeToEvent("MovementQueued", OnMovementQueued)
|
return PlayerStateMachine.States.WALKING
|
||||||
SubscribeToEvent("NoMovementQueued", OnNoMovementQueued)
|
|
||||||
|
|
||||||
|
|
||||||
func Enter(_extra_parameters: Dictionary) -> void:
|
func Enter(_extra_parameters: Dictionary) -> void:
|
||||||
_queued_dv = _extra_parameters["dv"]
|
_movement_component = ComponentUtils.GetMovementComponent(body)
|
||||||
StartedWalking.emit()
|
StartedWalking.emit()
|
||||||
|
|
||||||
|
|
||||||
func Update(_delta: float) -> void:
|
func Update(_delta: float) -> void:
|
||||||
if _queued_dv == Vector2.ZERO:
|
var movement_vector := _movement_component.movement_vector
|
||||||
|
|
||||||
|
if movement_vector == Vector2.ZERO:
|
||||||
state_machine.QueueStateChange(PlayerStateMachine.States.IDLE)
|
state_machine.QueueStateChange(PlayerStateMachine.States.IDLE)
|
||||||
return
|
return
|
||||||
|
|
||||||
body.velocity = _queued_dv * walking_speed
|
body.velocity = movement_vector * walking_speed
|
||||||
body.move_and_slide()
|
body.move_and_slide()
|
||||||
|
|
||||||
|
direction_component.ChangeDirectionUsingMovementVector(movement_vector)
|
||||||
func OnMovementQueued(dv: Vector2) -> void:
|
|
||||||
_queued_dv = dv
|
|
||||||
|
|
||||||
|
|
||||||
func OnNoMovementQueued() -> void:
|
|
||||||
_queued_dv = Vector2.ZERO
|
|
||||||
|
|
||||||
|
|
||||||
func GetStateEnum() -> PlayerStateMachine.States:
|
|
||||||
return PlayerStateMachine.States.WALKING
|
|
||||||
|
|||||||
15
Entities/Characters/Player/Scripts/movement_component.gd
Normal file
15
Entities/Characters/Player/Scripts/movement_component.gd
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
extends Node
|
||||||
|
class_name MovementComponent
|
||||||
|
|
||||||
|
signal MovementInput(movement_vector: Vector2)
|
||||||
|
|
||||||
|
var movement_vector: Vector2
|
||||||
|
|
||||||
|
func _physics_process(_delta: float) -> void:
|
||||||
|
var direction_vector := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
|
||||||
|
|
||||||
|
if direction_vector:
|
||||||
|
movement_vector = direction_vector
|
||||||
|
MovementInput.emit(movement_vector)
|
||||||
|
else:
|
||||||
|
movement_vector = Vector2.ZERO
|
||||||
18
Entities/Characters/Player/Scripts/player.gd
Normal file
18
Entities/Characters/Player/Scripts/player.gd
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
extends CharacterBody2D
|
||||||
|
class_name PlayerCharacter
|
||||||
|
|
||||||
|
# Signals
|
||||||
|
signal SitOnFurnitureTriggered(sitting_position: Vector2, sitting_direction: Enums.Directions)
|
||||||
|
|
||||||
|
# Exports
|
||||||
|
@export var player_sprite: PlayerSprite
|
||||||
|
@export var state_machine: PlayerStateMachine
|
||||||
|
@export var interact_scanner: InteractScanner
|
||||||
|
|
||||||
|
# Public Methods
|
||||||
|
func QueueCutsceneState() -> void:
|
||||||
|
state_machine.QueueStateChange(PlayerStateMachine.States.CUTSCENE)
|
||||||
|
|
||||||
|
|
||||||
|
func QueueEndCutsceneState() -> void:
|
||||||
|
state_machine.QueueStateChange(PlayerStateMachine.States.IDLE)
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
extends CharacterBody2D
|
|
||||||
|
|
||||||
# PlayerBody.gd:
|
|
||||||
# Represents the player's actual CharacterBody (collision)
|
|
||||||
@@ -1,3 +1,78 @@
|
|||||||
extends AnimatedSprite2D
|
extends Node2D
|
||||||
|
class_name PlayerSprite
|
||||||
|
|
||||||
# sprite.gd
|
# Signals
|
||||||
|
signal DrawingBowAnimationFinished
|
||||||
|
signal FiringArrowAnimationFinished
|
||||||
|
signal AnimationFinished(animation_name: String)
|
||||||
|
|
||||||
|
# Exports
|
||||||
|
@export var state_machine: PlayerStateMachine
|
||||||
|
@export var direction_component: FacingDirectionComponent
|
||||||
|
|
||||||
|
# OnReady Variables
|
||||||
|
@onready var full: AnimatedSprite2D = $Full
|
||||||
|
|
||||||
|
# Private Variables
|
||||||
|
var _all_parts: Array[AnimatedSprite2D]
|
||||||
|
var _current_animation := "idle-down"
|
||||||
|
var _is_flipped := false
|
||||||
|
|
||||||
|
# Public Methods
|
||||||
|
func UpdateSprite() -> void:
|
||||||
|
var current_state := state_machine.current_state
|
||||||
|
var current_direction := direction_component.GetCurrentDirection()
|
||||||
|
var animation := _build_animation_name(current_state, current_direction)
|
||||||
|
var should_flip := _should_flip_horizontal()
|
||||||
|
|
||||||
|
if animation == _current_animation and should_flip == _is_flipped:
|
||||||
|
return
|
||||||
|
|
||||||
|
_current_animation = animation
|
||||||
|
_is_flipped = should_flip
|
||||||
|
|
||||||
|
for part in _all_parts:
|
||||||
|
part.animation = animation
|
||||||
|
part.play()
|
||||||
|
part.flip_h = should_flip
|
||||||
|
|
||||||
|
|
||||||
|
func OnAnimationFinished() -> void:
|
||||||
|
if _current_animation.begins_with("drawing-bow-"):
|
||||||
|
DrawingBowAnimationFinished.emit()
|
||||||
|
elif _current_animation.begins_with("firing-arrow-"):
|
||||||
|
FiringArrowAnimationFinished.emit()
|
||||||
|
AnimationFinished.emit(_current_animation)
|
||||||
|
|
||||||
|
|
||||||
|
func PlaySpecifiedAnimation(animation_name: String) -> void:
|
||||||
|
_current_animation = animation_name
|
||||||
|
for part in _all_parts:
|
||||||
|
part.animation = animation_name
|
||||||
|
part.play()
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
_all_parts = [
|
||||||
|
full
|
||||||
|
]
|
||||||
|
|
||||||
|
UpdateSprite()
|
||||||
|
|
||||||
|
|
||||||
|
func _build_animation_name(state: BaseState, direction: Enums.Directions) -> String:
|
||||||
|
# e.g. "idle-down", "walking-up"
|
||||||
|
var state_str := state.GetAnimationBaseName().replace("_", "-")
|
||||||
|
var direction_str := _direction_to_animation_state(direction)
|
||||||
|
return "%s-%s" % [state_str, direction_str]
|
||||||
|
|
||||||
|
|
||||||
|
func _direction_to_animation_state(direction: Enums.Directions) -> String:
|
||||||
|
if direction == Enums.Directions.LEFT or direction == Enums.Directions.RIGHT:
|
||||||
|
return "side"
|
||||||
|
return Enums.Directions.keys()[direction].to_lower()
|
||||||
|
|
||||||
|
|
||||||
|
func _should_flip_horizontal() -> bool:
|
||||||
|
return direction_component.GetCurrentDirection() == Enums.Directions.LEFT
|
||||||
|
|||||||
@@ -1,64 +0,0 @@
|
|||||||
extends Node
|
|
||||||
|
|
||||||
# sprite_animation_changer.gd
|
|
||||||
|
|
||||||
# When the player actually changes state or direction, this component will decide
|
|
||||||
# which sprite animation should play
|
|
||||||
|
|
||||||
@export var sprite: AnimatedSprite2D
|
|
||||||
|
|
||||||
var _cached_dv: Vector2
|
|
||||||
var _cached_state: PlayerStateMachine.States
|
|
||||||
|
|
||||||
var _walking_animation_data = {
|
|
||||||
Vector2.LEFT: ["walking-side", true],
|
|
||||||
Vector2.RIGHT: ["walking-side", false],
|
|
||||||
Vector2.UP: ["walking-up", false],
|
|
||||||
Vector2.DOWN: ["walking-down", false]
|
|
||||||
}
|
|
||||||
|
|
||||||
var _idle_animation_data = {
|
|
||||||
Vector2.LEFT: ["idle-side", true],
|
|
||||||
Vector2.RIGHT: ["idle-side", false],
|
|
||||||
Vector2.UP: ["idle-up", false],
|
|
||||||
Vector2.DOWN: ["idle-down", false]
|
|
||||||
}
|
|
||||||
|
|
||||||
func OnStateChanged(to_state: PlayerStateMachine.States, _from_state: PlayerStateMachine.States) -> void:
|
|
||||||
_cached_state = to_state
|
|
||||||
if to_state == PlayerStateMachine.States.WALKING:
|
|
||||||
_to_walking_state()
|
|
||||||
return
|
|
||||||
if to_state == PlayerStateMachine.States.IDLE:
|
|
||||||
_to_idle_state()
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
func OnMovementQueued(dv: Vector2) -> void:
|
|
||||||
_cached_dv = Vector2Utils.GetClosestDirectionVector(dv)
|
|
||||||
|
|
||||||
if _cached_state == PlayerStateMachine.States.WALKING:
|
|
||||||
# Direction changed while walking, update animation, just run _to_walking_state again
|
|
||||||
_to_walking_state()
|
|
||||||
|
|
||||||
|
|
||||||
func _to_walking_state() -> void:
|
|
||||||
if _walking_animation_data.has(_cached_dv):
|
|
||||||
var animation_data = _walking_animation_data[_cached_dv]
|
|
||||||
var animation_name = animation_data[0] as String
|
|
||||||
var is_flipped = animation_data[1] as bool
|
|
||||||
|
|
||||||
sprite.animation = animation_name
|
|
||||||
sprite.flip_h = is_flipped
|
|
||||||
sprite.play()
|
|
||||||
|
|
||||||
|
|
||||||
func _to_idle_state() -> void:
|
|
||||||
if _idle_animation_data.has(_cached_dv):
|
|
||||||
var animation_data = _idle_animation_data[_cached_dv]
|
|
||||||
var animation_name = animation_data[0] as String
|
|
||||||
var is_flipped = animation_data[1] as bool
|
|
||||||
|
|
||||||
sprite.animation = animation_name
|
|
||||||
sprite.flip_h = is_flipped
|
|
||||||
sprite.play()
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://by3g7ne2b3lgi
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
extends Node
|
|
||||||
|
|
||||||
@export var state_machine: PlayerStateMachine
|
|
||||||
|
|
||||||
# Public Methods
|
|
||||||
func OnMovementQueued(direction_vector: Vector2) -> void:
|
|
||||||
state_machine.SendEventToCurrentStateIfValid("MovementQueued", direction_vector)
|
|
||||||
|
|
||||||
|
|
||||||
func OnNoMovementQueued() -> void:
|
|
||||||
state_machine.SendEventToCurrentStateIfValid("NoMovementQueued")
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
extends Node
|
extends Node
|
||||||
class_name PlayerStateMachine
|
class_name PlayerStateMachine
|
||||||
|
|
||||||
signal StateChanged(to_state: States, from_state: States)
|
signal StateChanged
|
||||||
|
|
||||||
enum States {
|
enum States {
|
||||||
UNSET, IDLE, WALKING, USING_ITEM_A, DRAWING_BOW, FIRING_ARROW,
|
UNSET, IDLE, WALKING, USING_ITEM_A, DRAWING_BOW, FIRING_ARROW,
|
||||||
@@ -25,11 +25,6 @@ func QueueStateChange(to_state_enum: PlayerStateMachine.States, extra_parameters
|
|||||||
queued_parameters = extra_parameters
|
queued_parameters = extra_parameters
|
||||||
|
|
||||||
|
|
||||||
func SendEventToCurrentStateIfValid(signal_name: String, parameters: Variant = null) -> void:
|
|
||||||
if current_state._subscribed_events.has(signal_name):
|
|
||||||
current_state._StateMachine_OnEventSent(signal_name, parameters)
|
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
var children := states_container.get_children()
|
var children := states_container.get_children()
|
||||||
@@ -52,9 +47,6 @@ func _process(delta: float) -> void:
|
|||||||
|
|
||||||
|
|
||||||
func _swap_state() -> void:
|
func _swap_state() -> void:
|
||||||
var from_state := current_state.GetStateEnum()
|
|
||||||
var to_state := queued_state
|
|
||||||
|
|
||||||
if current_state:
|
if current_state:
|
||||||
current_state.Exit()
|
current_state.Exit()
|
||||||
|
|
||||||
@@ -63,4 +55,4 @@ func _swap_state() -> void:
|
|||||||
queued_state = PlayerStateMachine.States.UNSET
|
queued_state = PlayerStateMachine.States.UNSET
|
||||||
queued_parameters = {}
|
queued_parameters = {}
|
||||||
|
|
||||||
StateChanged.emit(to_state, from_state)
|
StateChanged.emit()
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
[gd_scene format=3 uid="uid://dl4bhu5o71rdv"]
|
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://uyl0s1e67x6s" path="res://Entities/Characters/Player/Individual Components/sprite.tscn" id="1_ydjex"]
|
|
||||||
|
|
||||||
[node name="Decorative Player Map Entity" type="Node2D" unique_id=2077444123]
|
|
||||||
y_sort_enabled = true
|
|
||||||
|
|
||||||
[node name="Sprite" parent="." unique_id=1296959783 instance=ExtResource("1_ydjex")]
|
|
||||||
128
Entities/Characters/Player/player.tscn
Normal file
128
Entities/Characters/Player/player.tscn
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
[gd_scene format=3 uid="uid://6athlweutl2g"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://uyl0s1e67x6s" path="res://Entities/Characters/Player/sprite.tscn" id="1_27cb7"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c2ydbmmvnfca6" path="res://Entities/Characters/Player/state_machine.tscn" id="1_lyjr2"]
|
||||||
|
[ext_resource type="Script" uid="uid://dacvayqstkvws" path="res://Entities/Characters/Player/Scripts/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://dkmc1t43gomdb" path="res://Entities/Characters/Player/Scripts/States/idle_state.gd" id="4_dxcao"]
|
||||||
|
[ext_resource type="Script" uid="uid://ckn7gmtc23b8l" path="res://Entities/Characters/Player/Scripts/States/using_item_a_state.gd" id="5_1mdwi"]
|
||||||
|
[ext_resource type="Script" uid="uid://bwmmah30t3m0u" path="res://Entities/Characters/Player/Scripts/States/walking_state.gd" id="5_cscr0"]
|
||||||
|
[ext_resource type="Script" uid="uid://brlisuoocwehh" path="res://Entities/Characters/Player/Scripts/interact_scanner.gd" id="6_fu1fx"]
|
||||||
|
[ext_resource type="Script" uid="uid://bnp1vowmu15lg" path="res://Entities/Characters/Player/Scripts/States/drawing_bow_state.gd" id="7_cscr0"]
|
||||||
|
[ext_resource type="Script" uid="uid://cd2ewadcm8oi5" path="res://Entities/Characters/Player/Scripts/States/firing_arrow_state.gd" id="8_plevq"]
|
||||||
|
[ext_resource type="Script" uid="uid://bx1a35al4yiej" path="res://Entities/Characters/Player/Scripts/States/sitting_state.gd" id="9_sdxbo"]
|
||||||
|
[ext_resource type="Script" uid="uid://bnontuqj3cnom" path="res://Entities/Characters/Player/Scripts/States/cutscene_state.gd" id="10_p06rw"]
|
||||||
|
[ext_resource type="Script" uid="uid://wfdtd3xlgrvm" path="res://Entities/Characters/Player/Scripts/States/play_animation_state.gd" id="12_aencf"]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_apx8m"]
|
||||||
|
size = Vector2(10, 5)
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_plevq"]
|
||||||
|
radius = 12.0
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_fu1fx"]
|
||||||
|
size = Vector2(6, 5)
|
||||||
|
|
||||||
|
[node name="Player" type="CharacterBody2D" unique_id=1502234578 node_paths=PackedStringArray("player_sprite", "state_machine", "interact_scanner") groups=["Player Group"]]
|
||||||
|
y_sort_enabled = true
|
||||||
|
script = ExtResource("1_qqvsf")
|
||||||
|
player_sprite = NodePath("Player Sprite")
|
||||||
|
state_machine = NodePath("State Machine")
|
||||||
|
interact_scanner = NodePath("Marker2D/InteractScanner")
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=495465356]
|
||||||
|
position = Vector2(0, 4.5)
|
||||||
|
shape = SubResource("RectangleShape2D_apx8m")
|
||||||
|
|
||||||
|
[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="State Machine" parent="." unique_id=732559774 node_paths=PackedStringArray("states_container", "current_state") instance=ExtResource("1_lyjr2")]
|
||||||
|
states_container = NodePath("States")
|
||||||
|
current_state = NodePath("States/Idle State")
|
||||||
|
|
||||||
|
[node name="States" type="Node" parent="State Machine" unique_id=1171587216]
|
||||||
|
|
||||||
|
[node name="Idle State" type="Node" parent="State Machine/States" unique_id=2017409248 node_paths=PackedStringArray("player", "state_machine")]
|
||||||
|
script = ExtResource("4_dxcao")
|
||||||
|
player = NodePath("../../..")
|
||||||
|
state_machine = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="Walking State" type="Node" parent="State Machine/States" unique_id=1661048365 node_paths=PackedStringArray("direction_component", "body", "state_machine")]
|
||||||
|
script = ExtResource("5_cscr0")
|
||||||
|
direction_component = NodePath("../../../Components/FacingDirectionComponent")
|
||||||
|
body = NodePath("../../..")
|
||||||
|
state_machine = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="Using Item A State" type="Node" parent="State Machine/States" unique_id=1017153142 node_paths=PackedStringArray("body", "direction_component", "state_machine")]
|
||||||
|
script = ExtResource("5_1mdwi")
|
||||||
|
body = NodePath("../../..")
|
||||||
|
direction_component = NodePath("../../../Components/FacingDirectionComponent")
|
||||||
|
state_machine = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="Drawing Bow State" type="Node" parent="State Machine/States" unique_id=317681716 node_paths=PackedStringArray("body", "state_machine")]
|
||||||
|
script = ExtResource("7_cscr0")
|
||||||
|
body = NodePath("../../..")
|
||||||
|
state_machine = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="Firing Arrow State" type="Node" parent="State Machine/States" unique_id=2129772816 node_paths=PackedStringArray("direction_component", "arrow_spawn_marker", "state_machine")]
|
||||||
|
script = ExtResource("8_plevq")
|
||||||
|
direction_component = NodePath("../../../Components/FacingDirectionComponent")
|
||||||
|
arrow_spawn_marker = NodePath("../../../Marker2D")
|
||||||
|
state_machine = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="Sitting State" type="Node" parent="State Machine/States" unique_id=1774602333 node_paths=PackedStringArray("state_machine")]
|
||||||
|
script = ExtResource("9_sdxbo")
|
||||||
|
state_machine = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="Cutscene State" type="Node" parent="State Machine/States" unique_id=1722986400 node_paths=PackedStringArray("state_machine")]
|
||||||
|
script = ExtResource("10_p06rw")
|
||||||
|
state_machine = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="Play Animation State" type="Node" parent="State Machine/States" unique_id=1357816619 node_paths=PackedStringArray("state_machine")]
|
||||||
|
script = ExtResource("12_aencf")
|
||||||
|
state_machine = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="Occlusion Culling Area" type="Area2D" parent="." unique_id=1195961806]
|
||||||
|
collision_layer = 8
|
||||||
|
collision_mask = 0
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Occlusion Culling Area" unique_id=1162272029]
|
||||||
|
shape = SubResource("CircleShape2D_plevq")
|
||||||
|
|
||||||
|
[node name="Player Sprite" parent="." unique_id=1169131604 node_paths=PackedStringArray("state_machine", "direction_component") instance=ExtResource("1_27cb7")]
|
||||||
|
state_machine = NodePath("../State Machine")
|
||||||
|
direction_component = NodePath("../Components/FacingDirectionComponent")
|
||||||
|
|
||||||
|
[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="SitOnFurnitureTriggered" from="." to="State Machine/States/Idle State" method="OnSitOnFurnitureTriggered"]
|
||||||
|
[connection signal="DirectionChanged" from="Components/FacingDirectionComponent" to="Player Sprite" method="UpdateSprite"]
|
||||||
|
[connection signal="DirectionChanged" from="Components/FacingDirectionComponent" to="Marker2D/InteractScanner" method="OnDirectionChanged"]
|
||||||
|
[connection signal="PlayerBecameIdle" from="State Machine/States/Idle State" to="Player Sprite" method="UpdateSprite"]
|
||||||
|
[connection signal="StartedWalking" from="State Machine/States/Walking State" to="Player Sprite" method="UpdateSprite"]
|
||||||
|
[connection signal="PlayerBeganDrawingBow" from="State Machine/States/Drawing Bow State" to="Player Sprite" method="UpdateSprite"]
|
||||||
|
[connection signal="PlayerBeganFiringArrow" from="State Machine/States/Firing Arrow State" to="Player Sprite" method="UpdateSprite"]
|
||||||
|
[connection signal="PlayAnimation" from="State Machine/States/Play Animation State" to="Player Sprite" method="PlaySpecifiedAnimation"]
|
||||||
|
[connection signal="AnimationFinished" from="Player Sprite" to="State Machine/States/Play Animation State" method="OnAnimationFinished"]
|
||||||
|
[connection signal="DrawingBowAnimationFinished" from="Player Sprite" to="State Machine/States/Drawing Bow State" method="OnDrawingBowAnimationFinished"]
|
||||||
|
[connection signal="FiringArrowAnimationFinished" from="Player Sprite" to="State Machine/States/Firing Arrow State" method="OnFiringArrowAnimationFinished"]
|
||||||
|
[connection signal="InteractionActionTriggered" from="Marker2D/InteractScanner" to="." method="_on_interaction_action_triggered"]
|
||||||
|
[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"]
|
||||||
|
[connection signal="body_entered" from="Marker2D/InteractScanner" to="." method="_on_interact_scanner_body_entered"]
|
||||||
|
[connection signal="body_exited" from="Marker2D/InteractScanner" to="." method="_on_interact_scanner_body_exited"]
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
[gd_scene format=3 uid="uid://c65cfm3t0obwq"]
|
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://6athlweutl2g" path="res://Entities/Characters/Player/Individual Components/body.tscn" id="1_62n52"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://uyl0s1e67x6s" path="res://Entities/Characters/Player/Individual Components/sprite.tscn" id="2_1uhri"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://c2ydbmmvnfca6" path="res://Entities/Characters/Player/Individual Components/state_machine.tscn" id="3_1uhri"]
|
|
||||||
[ext_resource type="Script" uid="uid://dkmc1t43gomdb" path="res://Entities/Characters/Player/Scripts/States/idle_state.gd" id="4_evnf3"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://nbkisxm2oekn" path="res://Entities/Characters/Utility/Components/movement_component.tscn" id="5_h314u"]
|
|
||||||
[ext_resource type="Script" uid="uid://bwmmah30t3m0u" path="res://Entities/Characters/Player/Scripts/States/walking_state.gd" id="5_rg3km"]
|
|
||||||
[ext_resource type="Script" uid="uid://ctoxjn2rvtjs6" path="res://Entities/Characters/Player/Scripts/state_event_connector.gd" id="6_18fwg"]
|
|
||||||
[ext_resource type="Script" uid="uid://by3g7ne2b3lgi" path="res://Entities/Characters/Player/Scripts/sprite_animation_changer.gd" id="8_bm64c"]
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_62n52"]
|
|
||||||
size = Vector2(13, 9)
|
|
||||||
|
|
||||||
[node name="Player Map Entity" type="Node2D" unique_id=469362016]
|
|
||||||
y_sort_enabled = true
|
|
||||||
|
|
||||||
[node name="Player Body" parent="." unique_id=1502234578 instance=ExtResource("1_62n52")]
|
|
||||||
collision_layer = 17
|
|
||||||
|
|
||||||
[node name="Sprite" parent="Player Body" unique_id=1169131604 instance=ExtResource("2_1uhri")]
|
|
||||||
position = Vector2(0, 7)
|
|
||||||
offset = Vector2(0, -7)
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player Body" unique_id=760188594]
|
|
||||||
position = Vector2(-0.5, 4.5)
|
|
||||||
shape = SubResource("RectangleShape2D_62n52")
|
|
||||||
|
|
||||||
[node name="State Machine" parent="." unique_id=732559774 node_paths=PackedStringArray("states_container", "current_state") instance=ExtResource("3_1uhri")]
|
|
||||||
states_container = NodePath(".")
|
|
||||||
current_state = NodePath("Idle")
|
|
||||||
|
|
||||||
[node name="Idle" type="Node" parent="State Machine" unique_id=1849660058 node_paths=PackedStringArray("state_machine")]
|
|
||||||
script = ExtResource("4_evnf3")
|
|
||||||
state_machine = NodePath("..")
|
|
||||||
|
|
||||||
[node name="Walking" type="Node" parent="State Machine" unique_id=485440867 node_paths=PackedStringArray("body", "state_machine")]
|
|
||||||
script = ExtResource("5_rg3km")
|
|
||||||
body = NodePath("../../Player Body")
|
|
||||||
state_machine = NodePath("..")
|
|
||||||
|
|
||||||
[node name="Movement Component" parent="." unique_id=737644583 instance=ExtResource("5_h314u")]
|
|
||||||
|
|
||||||
[node name="Internal" type="Node" parent="." unique_id=95043416]
|
|
||||||
|
|
||||||
[node name="State Event Connector" type="Node" parent="Internal" unique_id=186266500 node_paths=PackedStringArray("state_machine")]
|
|
||||||
script = ExtResource("6_18fwg")
|
|
||||||
state_machine = NodePath("../../State Machine")
|
|
||||||
|
|
||||||
[node name="Sprite Animation Changer" type="Node" parent="Internal" unique_id=281485983 node_paths=PackedStringArray("sprite")]
|
|
||||||
script = ExtResource("8_bm64c")
|
|
||||||
sprite = NodePath("../../Player Body/Sprite")
|
|
||||||
|
|
||||||
[connection signal="StateChanged" from="State Machine" to="Internal/Sprite Animation Changer" method="OnStateChanged"]
|
|
||||||
[connection signal="MovementQueued" from="Movement Component" to="Internal/State Event Connector" method="OnMovementQueued"]
|
|
||||||
[connection signal="MovementQueued" from="Movement Component" to="Internal/Sprite Animation Changer" method="OnMovementQueued"]
|
|
||||||
[connection signal="NoMovementQueued" from="Movement Component" to="Internal/State Event Connector" method="OnNoMovementQueued"]
|
|
||||||
1756
Entities/Characters/Player/sprite.tscn
Normal file
1756
Entities/Characters/Player/sprite.tscn
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://c74mhfemxuuco" path="res://Entities/Characters/Player/Scripts/state_machine.gd" id="1_clu2m"]
|
[ext_resource type="Script" uid="uid://c74mhfemxuuco" path="res://Entities/Characters/Player/Scripts/state_machine.gd" id="1_clu2m"]
|
||||||
|
|
||||||
[node name="State Machine" type="Node" unique_id=732559774]
|
[node name="StateMachine" type="Node" unique_id=732559774]
|
||||||
script = ExtResource("1_clu2m")
|
script = ExtResource("1_clu2m")
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
extends Node
|
|
||||||
class_name MovementComponent
|
|
||||||
|
|
||||||
# movement_component.gd
|
|
||||||
# A simple script that checks for movement input and emits a signal with the
|
|
||||||
# direction vector
|
|
||||||
|
|
||||||
signal MovementQueued(direction_vector: Vector2)
|
|
||||||
signal NoMovementQueued
|
|
||||||
|
|
||||||
var direction_vector: Vector2
|
|
||||||
|
|
||||||
func _physics_process(_delta: float) -> void:
|
|
||||||
var dv := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
|
|
||||||
|
|
||||||
if dv:
|
|
||||||
direction_vector = dv
|
|
||||||
MovementQueued.emit(dv)
|
|
||||||
else:
|
|
||||||
direction_vector = Vector2.ZERO
|
|
||||||
NoMovementQueued.emit()
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene format=3 uid="uid://nbkisxm2oekn"]
|
[gd_scene format=3 uid="uid://nbkisxm2oekn"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dwclkwbig1uii" path="res://Entities/Characters/Utility/Components/Scripts/movement_component.gd" id="1_b2nib"]
|
[ext_resource type="Script" uid="uid://dwclkwbig1uii" path="res://Entities/Characters/Player/Scripts/movement_component.gd" id="1_b2nib"]
|
||||||
|
|
||||||
[node name="Movement Component" type="Node" unique_id=737644583]
|
[node name="Movement Component" type="Node" unique_id=737644583]
|
||||||
script = ExtResource("1_b2nib")
|
script = ExtResource("1_b2nib")
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
extends Node
|
extends Node
|
||||||
#extends Node
|
|
||||||
#
|
# Exports
|
||||||
## Exports
|
@export var player: PlayerCharacter
|
||||||
#@export var arrow_parent: Node2D
|
@export var arrow_parent: Node2D
|
||||||
#
|
|
||||||
## Preloads
|
# Preloads
|
||||||
#const wooden_arrow_scene: PackedScene = preload("uid://b2wq5m01b68rx")
|
const wooden_arrow_scene: PackedScene = preload("uid://b2wq5m01b68rx")
|
||||||
#
|
|
||||||
## Private Methods
|
# Private Methods
|
||||||
#func _ready() -> void:
|
func _ready() -> void:
|
||||||
#firing_arrow_state.ArrowFired.connect(_on_arrow_fired)
|
var firing_arrow_state: FiringArrowState = player.get_node("State Machine/States/Firing Arrow State")
|
||||||
#
|
firing_arrow_state.ArrowFired.connect(_on_arrow_fired)
|
||||||
#
|
|
||||||
#func _on_arrow_fired(fire_position: Vector2, direction: Vector2) -> void:
|
|
||||||
#var wooden_arrow := wooden_arrow_scene.instantiate() as BaseProjectile
|
func _on_arrow_fired(fire_position: Vector2, direction: Vector2) -> void:
|
||||||
#wooden_arrow.SetProjectileStartAndDirection(fire_position, direction)
|
var wooden_arrow := wooden_arrow_scene.instantiate() as BaseProjectile
|
||||||
#
|
wooden_arrow.SetProjectileStartAndDirection(fire_position, direction)
|
||||||
#if arrow_parent == null:
|
|
||||||
#return
|
if arrow_parent == null:
|
||||||
#arrow_parent.add_child(wooden_arrow)
|
return
|
||||||
|
arrow_parent.add_child(wooden_arrow)
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
extends Area2D
|
||||||
|
class_name CollisionLoadingZone
|
||||||
|
|
||||||
|
@export var loading_zone_transporter: LoadingZoneTransporter
|
||||||
|
|
||||||
|
# Private Methods
|
||||||
|
func _on_body_entered(body: Node2D) -> void:
|
||||||
|
if body is not PlayerCharacter:
|
||||||
|
return
|
||||||
|
|
||||||
|
loading_zone_transporter.Activate()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://ckfuj0lm6jv3i
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://bqedrioybnvi5
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
extends Area2D
|
extends Area2D
|
||||||
class_name InteractiveEntrance
|
class_name InteractiveLoadingZone
|
||||||
|
|
||||||
@export var entrance_transporter: EntranceTransporter
|
@export var loading_zone_transporter: LoadingZoneTransporter
|
||||||
|
|
||||||
# Public Methods
|
# Public Methods
|
||||||
func Activate() -> void:
|
func Activate() -> void:
|
||||||
entrance_transporter.Activate()
|
loading_zone_transporter.Activate()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
extends Node
|
extends Node
|
||||||
class_name EntranceTransporter
|
class_name LoadingZoneTransporter
|
||||||
|
|
||||||
signal MapTransitionQueued(map_id: Enums.MapIds, marker_name: String)
|
signal MapTransitionQueued(map_id: Enums.MapIds, marker_name: String)
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://bvl1vdqd5cjkc
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
[gd_scene format=3 uid="uid://dq6ifketavnfu"]
|
[gd_scene format=3 uid="uid://ca75b65eh7vv8"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://ckfuj0lm6jv3i" path="res://Entities/Map Objects/Loading Zone/Scripts/collision_loading_zone.gd" id="1_pb5hg"]
|
||||||
|
|
||||||
[node name="Collision Loading Zone" type="Area2D" unique_id=1043800735 groups=["Collision Loading Zone Group"]]
|
[node name="Collision Loading Zone" type="Area2D" unique_id=1043800735 groups=["Collision Loading Zone Group"]]
|
||||||
collision_layer = 0
|
collision_layer = 0
|
||||||
|
script = ExtResource("1_pb5hg")
|
||||||
|
|
||||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
[gd_scene format=3 uid="uid://bbules4o3xayc"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bqedrioybnvi5" path="res://Entities/Map Objects/Loading Zone/Scripts/entrance_transporter.gd" id="1_bkamm"]
|
|
||||||
|
|
||||||
[node name="Entrance Transporter" type="Node" unique_id=1690817663 groups=["Loading Zone Transporter Group"]]
|
|
||||||
script = ExtResource("1_bkamm")
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene format=3 uid="uid://bbules4o3xayc"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bvl1vdqd5cjkc" path="res://Entities/Map Objects/Loading Zone/Scripts/loading_zone_transporter.gd" id="1_p8o2m"]
|
||||||
|
|
||||||
|
[node name="Loading Zone Transporter" type="Node" unique_id=1690817663 groups=["Loading Zone Transporter Group"]]
|
||||||
|
script = ExtResource("1_p8o2m")
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
[gd_scene format=3 uid="uid://vc0dkptkr1ow"]
|
|
||||||
|
|
||||||
[node name="On Collision Trigger" type="Area2D" unique_id=895298999]
|
|
||||||
collision_layer = 0
|
|
||||||
@@ -11,23 +11,23 @@ func GetAllTreasureChests() -> Array[BaseChest]:
|
|||||||
return arr
|
return arr
|
||||||
|
|
||||||
|
|
||||||
func GetAllInteractiveEntrances() -> Array[InteractiveEntrance]:
|
func GetAllInteractiveLoadingZones() -> Array[InteractiveLoadingZone]:
|
||||||
var nodes := get_tree().get_nodes_in_group("Interactive Loading Zone Group")
|
var nodes := get_tree().get_nodes_in_group("Interactive Loading Zone Group")
|
||||||
var arr: Array[InteractiveEntrance] = []
|
var arr: Array[InteractiveLoadingZone] = []
|
||||||
|
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
if node is InteractiveEntrance:
|
if node is InteractiveLoadingZone:
|
||||||
arr.append(node)
|
arr.append(node)
|
||||||
|
|
||||||
return arr
|
return arr
|
||||||
|
|
||||||
|
|
||||||
func GetAllLoadingZoneTransporters() -> Array[EntranceTransporter]:
|
func GetAllLoadingZoneTransporters() -> Array[LoadingZoneTransporter]:
|
||||||
var nodes := get_tree().get_nodes_in_group("Loading Zone Transporter Group")
|
var nodes := get_tree().get_nodes_in_group("Loading Zone Transporter Group")
|
||||||
var arr: Array[EntranceTransporter] = []
|
var arr: Array[LoadingZoneTransporter] = []
|
||||||
|
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
if node is EntranceTransporter:
|
if node is LoadingZoneTransporter:
|
||||||
arr.append(node)
|
arr.append(node)
|
||||||
|
|
||||||
return arr
|
return arr
|
||||||
@@ -45,9 +45,9 @@ func GetAllDialogueTriggers() -> Array[DialogueTrigger]:
|
|||||||
return arr
|
return arr
|
||||||
|
|
||||||
|
|
||||||
func GetPlayerBody() -> CharacterBody2D:
|
func GetPlayer() -> PlayerCharacter:
|
||||||
var nodes := get_tree().get_nodes_in_group("Player Group")
|
var nodes := get_tree().get_nodes_in_group("Player Group")
|
||||||
if nodes.is_empty():
|
if nodes.is_empty():
|
||||||
return null
|
return null
|
||||||
|
|
||||||
return nodes[0] as CharacterBody2D
|
return nodes[0] as PlayerCharacter
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://ddgeo3vwebqeg" path="res://Entities/Map Objects/Mechanisms/shop_item.tscn" id="3_7ftpj"]
|
[ext_resource type="PackedScene" uid="uid://ddgeo3vwebqeg" path="res://Entities/Map Objects/Mechanisms/shop_item.tscn" id="3_7ftpj"]
|
||||||
[ext_resource type="Script" uid="uid://dkcsftcdqtmg" path="res://Maps/Connectors/Scripts/spawn_marker_connector.gd" id="3_t8w5b"]
|
[ext_resource type="Script" uid="uid://dkcsftcdqtmg" path="res://Maps/Connectors/Scripts/spawn_marker_connector.gd" id="3_t8w5b"]
|
||||||
[ext_resource type="Texture2D" uid="uid://hop1gedjh8s4" path="res://Assets/Spritesheets/Player/icons_full_32.png" id="4_r8s0p"]
|
[ext_resource type="Texture2D" uid="uid://hop1gedjh8s4" path="res://Assets/Spritesheets/Player/icons_full_32.png" id="4_r8s0p"]
|
||||||
[ext_resource type="PackedScene" uid="uid://6athlweutl2g" path="res://Entities/Characters/Player/Individual Components/body.tscn" id="5_6ky6i"]
|
[ext_resource type="PackedScene" uid="uid://6athlweutl2g" path="res://Entities/Characters/Player/player.tscn" id="5_6ky6i"]
|
||||||
[ext_resource type="Texture2D" uid="uid://crebnygky3qv0" path="res://Assets/Sprites/Black Square.png" id="6_kt7c3"]
|
[ext_resource type="Texture2D" uid="uid://crebnygky3qv0" path="res://Assets/Sprites/Black Square.png" id="6_kt7c3"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bbules4o3xayc" path="res://Entities/Map Objects/Loading Zone/entrance_transporter.tscn" id="6_t8w5b"]
|
[ext_resource type="PackedScene" uid="uid://bbules4o3xayc" path="res://Entities/Map Objects/Loading Zone/loading_zone_transporter.tscn" id="6_t8w5b"]
|
||||||
[ext_resource type="PackedScene" uid="uid://vc0dkptkr1ow" path="res://Entities/Map Objects/Triggers/on_collision_trigger.tscn" id="7_6p5cp"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://bf6llktwqhs8l" path="res://Assets/Sprites/Door Fade.png" id="7_7ftpj"]
|
[ext_resource type="Texture2D" uid="uid://bf6llktwqhs8l" path="res://Assets/Sprites/Door Fade.png" id="7_7ftpj"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://ca75b65eh7vv8" path="res://Entities/Map Objects/Loading Zone/collision_loading_zone.tscn" id="9_kp1fr"]
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fdj0q"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_fdj0q"]
|
||||||
atlas = ExtResource("4_r8s0p")
|
atlas = ExtResource("4_r8s0p")
|
||||||
@@ -42,8 +42,9 @@ script = ExtResource("1_83xsp")
|
|||||||
[node name="Shop Item Notification Connector" type="Node" parent="." unique_id=1088308326]
|
[node name="Shop Item Notification Connector" type="Node" parent="." unique_id=1088308326]
|
||||||
script = ExtResource("2_r8s0p")
|
script = ExtResource("2_r8s0p")
|
||||||
|
|
||||||
[node name="Spawn Marker Connector" type="Node" parent="." unique_id=2053338893 node_paths=PackedStringArray("markers")]
|
[node name="Spawn Marker Connector" type="Node" parent="." unique_id=2053338893 node_paths=PackedStringArray("player", "markers")]
|
||||||
script = ExtResource("3_t8w5b")
|
script = ExtResource("3_t8w5b")
|
||||||
|
player = NodePath("../Player")
|
||||||
markers = NodePath("../Spawn Markers")
|
markers = NodePath("../Spawn Markers")
|
||||||
|
|
||||||
[node name="Tilemap" type="Node2D" parent="." unique_id=81778152]
|
[node name="Tilemap" type="Node2D" parent="." unique_id=81778152]
|
||||||
@@ -99,13 +100,14 @@ debug_color = Color(0.9710676, 0.103622, 0.35069537, 0.41960785)
|
|||||||
|
|
||||||
[node name="Loading Zones" type="Node2D" parent="." unique_id=525992692]
|
[node name="Loading Zones" type="Node2D" parent="." unique_id=525992692]
|
||||||
|
|
||||||
[node name="On Collision Trigger" parent="Loading Zones" unique_id=895298999 instance=ExtResource("7_6p5cp")]
|
[node name="Collision Loading Zone" parent="Loading Zones" unique_id=1043800735 node_paths=PackedStringArray("loading_zone_transporter") instance=ExtResource("9_kp1fr")]
|
||||||
|
loading_zone_transporter = NodePath("Loading Zone Transporter")
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Loading Zones/On Collision Trigger" unique_id=1798970421]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Loading Zones/Collision Loading Zone" unique_id=1798970421]
|
||||||
position = Vector2(224, 243)
|
position = Vector2(224, 243)
|
||||||
shape = SubResource("RectangleShape2D_kp1fr")
|
shape = SubResource("RectangleShape2D_kp1fr")
|
||||||
|
|
||||||
[node name="Loading Zone Transporter" parent="Loading Zones/On Collision Trigger" unique_id=1690817663 instance=ExtResource("6_t8w5b")]
|
[node name="Loading Zone Transporter" parent="Loading Zones/Collision Loading Zone" unique_id=1690817663 instance=ExtResource("6_t8w5b")]
|
||||||
destination_marker_name = "Shop Entrance"
|
destination_marker_name = "Shop Entrance"
|
||||||
|
|
||||||
[node name="Spawn Markers" type="Node2D" parent="." unique_id=680471197]
|
[node name="Spawn Markers" type="Node2D" parent="." unique_id=680471197]
|
||||||
@@ -113,7 +115,7 @@ destination_marker_name = "Shop Entrance"
|
|||||||
[node name="Shop Entrance" type="Marker2D" parent="Spawn Markers" unique_id=122141189]
|
[node name="Shop Entrance" type="Marker2D" parent="Spawn Markers" unique_id=122141189]
|
||||||
position = Vector2(223, 225)
|
position = Vector2(223, 225)
|
||||||
|
|
||||||
[node name="Player Body" parent="." unique_id=1502234578 instance=ExtResource("5_6ky6i")]
|
[node name="Player" parent="." unique_id=1502234578 instance=ExtResource("5_6ky6i")]
|
||||||
position = Vector2(289, 174)
|
position = Vector2(289, 174)
|
||||||
|
|
||||||
[node name="Camera2D" type="Camera2D" parent="." unique_id=1684491254]
|
[node name="Camera2D" type="Camera2D" parent="." unique_id=1684491254]
|
||||||
@@ -144,4 +146,5 @@ position = Vector2(224, 232)
|
|||||||
scale = Vector2(2, 1)
|
scale = Vector2(2, 1)
|
||||||
texture = ExtResource("7_7ftpj")
|
texture = ExtResource("7_7ftpj")
|
||||||
|
|
||||||
[connection signal="body_entered" from="Loading Zones/On Collision Trigger" to="Loading Zones/On Collision Trigger/Loading Zone Transporter" method="Activate" unbinds=1]
|
[connection signal="InteractScannerAreaEntered" from="Player" to="Shop Item Notification Connector" method="OnPlayerInteractScannerAreaEntered"]
|
||||||
|
[connection signal="InteractScannerAreaExited" from="Player" to="Shop Item Notification Connector" method="OnPlayerInteractScannerAreaExited"]
|
||||||
|
|||||||
@@ -1,54 +1,54 @@
|
|||||||
extends Node
|
extends Node
|
||||||
#class_name BenchInteractionConnector
|
class_name BenchInteractionConnector
|
||||||
#
|
|
||||||
## Signals
|
# Signals
|
||||||
#signal SitOnBenchTriggered(position: Vector2, sitting_direction: Enums.Directions)
|
signal SitOnBenchTriggered(position: Vector2, sitting_direction: Enums.Directions)
|
||||||
#
|
|
||||||
## Exports
|
# Exports
|
||||||
#@export var player: PlayerBody
|
@export var player: PlayerCharacter
|
||||||
#
|
|
||||||
## Private Variables
|
# Private Variables
|
||||||
#var _benches_in_range: Array[WoodenBench] = []
|
var _benches_in_range: Array[WoodenBench] = []
|
||||||
#
|
|
||||||
## Private Methods
|
# Private Methods
|
||||||
#func _ready() -> void:
|
func _ready() -> void:
|
||||||
#player.interact_scanner.area_entered.connect(_on_interact_scanned)
|
player.interact_scanner.area_entered.connect(_on_interact_scanned)
|
||||||
#player.interact_scanner.area_exited.connect(_on_interact_unscanned)
|
player.interact_scanner.area_exited.connect(_on_interact_unscanned)
|
||||||
#player.interact_scanner.InteractionActionTriggered.connect(_on_interact_triggered)
|
player.interact_scanner.InteractionActionTriggered.connect(_on_interact_triggered)
|
||||||
#
|
|
||||||
#
|
|
||||||
#func _on_interact_scanned(area: Area2D) -> void:
|
func _on_interact_scanned(area: Area2D) -> void:
|
||||||
#var parent := area.get_parent()
|
var parent := area.get_parent()
|
||||||
#if parent == null or parent is not WoodenBench or _benches_in_range.has(parent):
|
if parent == null or parent is not WoodenBench or _benches_in_range.has(parent):
|
||||||
#return
|
return
|
||||||
#_benches_in_range.append(parent)
|
_benches_in_range.append(parent)
|
||||||
#
|
|
||||||
#
|
|
||||||
#func _on_interact_unscanned(area: Area2D) -> void:
|
func _on_interact_unscanned(area: Area2D) -> void:
|
||||||
#var parent: Node = area.get_parent()
|
var parent: Node = area.get_parent()
|
||||||
#if parent == null or parent is not WoodenBench or !_benches_in_range.has(parent):
|
if parent == null or parent is not WoodenBench or !_benches_in_range.has(parent):
|
||||||
#return
|
return
|
||||||
#_benches_in_range.erase(parent)
|
_benches_in_range.erase(parent)
|
||||||
#
|
|
||||||
#
|
|
||||||
#func _on_interact_triggered() -> void:
|
func _on_interact_triggered() -> void:
|
||||||
#if _benches_in_range.is_empty():
|
if _benches_in_range.is_empty():
|
||||||
#return
|
return
|
||||||
#
|
|
||||||
#var bench := _benches_in_range[0]
|
var bench := _benches_in_range[0]
|
||||||
#var sitting_spots_container := bench.get_node("Sitting Spots") as Node2D
|
var sitting_spots_container := bench.get_node("Sitting Spots") as Node2D
|
||||||
#var sitting_spot_markers := sitting_spots_container.get_children()
|
var sitting_spot_markers := sitting_spots_container.get_children()
|
||||||
#
|
|
||||||
#var closest_marker: Marker2D
|
var closest_marker: Marker2D
|
||||||
#var distance_to_player := 9999.0
|
var distance_to_player := 9999.0
|
||||||
#for node in sitting_spot_markers:
|
for node in sitting_spot_markers:
|
||||||
#var marker := node as Marker2D
|
var marker := node as Marker2D
|
||||||
#var distance := marker.global_position.distance_to(player.global_position)
|
var distance := marker.global_position.distance_to(player.global_position)
|
||||||
#if distance < distance_to_player:
|
if distance < distance_to_player:
|
||||||
#closest_marker = marker
|
closest_marker = marker
|
||||||
#distance_to_player = distance
|
distance_to_player = distance
|
||||||
#
|
|
||||||
#if !closest_marker:
|
if !closest_marker:
|
||||||
#return
|
return
|
||||||
#
|
|
||||||
#player.SitOnFurnitureTriggered.emit(closest_marker.global_position, Enums.Directions.DOWN)
|
player.SitOnFurnitureTriggered.emit(closest_marker.global_position, Enums.Directions.DOWN)
|
||||||
|
|||||||
@@ -4,65 +4,73 @@ extends Node
|
|||||||
signal OpeningOfOpenedChestAttempted
|
signal OpeningOfOpenedChestAttempted
|
||||||
|
|
||||||
# Exports
|
# Exports
|
||||||
|
@export var player: PlayerCharacter
|
||||||
@export var auto_connect_all_chests := true
|
@export var auto_connect_all_chests := true
|
||||||
|
|
||||||
# Private Variables
|
# Private Variables
|
||||||
var _chests_in_range: Array[BaseChest] = []
|
var _chests_in_range: Array[BaseChest] = []
|
||||||
|
|
||||||
## Private Methods
|
# Private Methods
|
||||||
#func _ready() -> void:
|
func _ready() -> void:
|
||||||
#var chests := GroupUtils.GetAllTreasureChests()
|
player.interact_scanner.area_entered.connect(_on_interact_scanned)
|
||||||
#for chest in chests:
|
player.interact_scanner.area_exited.connect(_on_interact_unscanned)
|
||||||
#chest.OpeningAnimationStarted.connect(_on_chest_opening_animation_started)
|
player.interact_scanner.InteractionActionTriggered.connect(_on_interact_triggered)
|
||||||
#
|
|
||||||
#
|
var chests := GroupUtils.GetAllTreasureChests()
|
||||||
#func _on_chest_opening_animation_started() -> void:
|
for chest in chests:
|
||||||
#player.QueueCutsceneState()
|
chest.OpeningAnimationStarted.connect(_on_chest_opening_animation_started)
|
||||||
#
|
|
||||||
#var camera_idx := children.find_custom(func(x): return x is Camera2D)
|
|
||||||
#if camera_idx == -1: return
|
func _on_chest_opening_animation_started() -> void:
|
||||||
#
|
var player := GroupUtils.GetPlayer()
|
||||||
## Zoom In
|
var children := player.get_children()
|
||||||
#var camera := children[camera_idx] as Camera2D
|
|
||||||
#var current_zoom := camera.zoom
|
player.QueueCutsceneState()
|
||||||
#await get_tree().create_tween().tween_property(camera, "zoom", current_zoom + Vector2(2, 2), 0.5).finished
|
|
||||||
#
|
var camera_idx := children.find_custom(func(x): return x is Camera2D)
|
||||||
## Player the player's chest opening animation
|
if camera_idx == -1: return
|
||||||
#player.state_machine.QueueStateChange(PlayerStateMachine.States.PLAY_ANIMATION, { "animation_name": "opening-chest-down" })
|
|
||||||
#await player.state_machine.StateChanged
|
# Zoom In
|
||||||
#var play_animation_state := player.state_machine.current_state as PlayerPlayAnimationState
|
var camera := children[camera_idx] as Camera2D
|
||||||
#await play_animation_state.AnimationFinished
|
var current_zoom := camera.zoom
|
||||||
#player.state_machine.QueueStateChange(PlayerStateMachine.States.IDLE)
|
await get_tree().create_tween().tween_property(camera, "zoom", current_zoom + Vector2(2, 2), 0.5).finished
|
||||||
#
|
|
||||||
## Zoom back out
|
# Player the player's chest opening animation
|
||||||
#await get_tree().create_tween().tween_property(camera, "zoom", current_zoom, 0.5).finished
|
player.state_machine.QueueStateChange(PlayerStateMachine.States.PLAY_ANIMATION, { "animation_name": "opening-chest-down" })
|
||||||
#
|
await player.state_machine.StateChanged
|
||||||
#
|
var play_animation_state := player.state_machine.current_state as PlayerPlayAnimationState
|
||||||
#func _on_interact_scanned(area: Area2D) -> void:
|
await play_animation_state.AnimationFinished
|
||||||
#var chest = area.get_parent()
|
player.state_machine.QueueStateChange(PlayerStateMachine.States.IDLE)
|
||||||
#if chest == null or chest is not BaseChest:
|
|
||||||
#return
|
# Zoom back out
|
||||||
#if _chests_in_range.has(chest):
|
await get_tree().create_tween().tween_property(camera, "zoom", current_zoom, 0.5).finished
|
||||||
#return
|
|
||||||
#_chests_in_range.append(chest)
|
|
||||||
#
|
func _on_interact_scanned(area: Area2D) -> void:
|
||||||
#
|
var chest = area.get_parent()
|
||||||
#func _on_interact_unscanned(area: Area2D) -> void:
|
if chest == null or chest is not BaseChest:
|
||||||
#var chest = area.get_parent()
|
return
|
||||||
#if chest == null or chest is not BaseChest:
|
if _chests_in_range.has(chest):
|
||||||
#return
|
return
|
||||||
#if !_chests_in_range.has(chest):
|
_chests_in_range.append(chest)
|
||||||
#return
|
|
||||||
#_chests_in_range.erase(chest)
|
|
||||||
#
|
func _on_interact_unscanned(area: Area2D) -> void:
|
||||||
#
|
var chest = area.get_parent()
|
||||||
#func _on_interact_triggered() -> void:
|
if chest == null or chest is not BaseChest:
|
||||||
#if _chests_in_range.is_empty():
|
return
|
||||||
#return
|
if !_chests_in_range.has(chest):
|
||||||
#
|
return
|
||||||
#var chest := _chests_in_range[0]
|
_chests_in_range.erase(chest)
|
||||||
#if !chest.is_open:
|
|
||||||
#chest.Open()
|
|
||||||
#else:
|
func _on_interact_triggered() -> void:
|
||||||
#chest.OpenAlreadyOpened()
|
if _chests_in_range.is_empty():
|
||||||
#OpeningOfOpenedChestAttempted.emit()
|
return
|
||||||
|
|
||||||
|
var chest := _chests_in_range[0]
|
||||||
|
if !chest.is_open:
|
||||||
|
chest.Open()
|
||||||
|
else:
|
||||||
|
chest.OpenAlreadyOpened()
|
||||||
|
OpeningOfOpenedChestAttempted.emit()
|
||||||
|
|||||||
@@ -1 +1,12 @@
|
|||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
|
@export var player: PlayerCharacter
|
||||||
|
|
||||||
|
# Public Methods
|
||||||
|
func OnPlayerAreaEntered(area: Area2D) -> void:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
# Private Methods
|
||||||
|
func _ready() -> void:
|
||||||
|
pass
|
||||||
|
|||||||
@@ -1,35 +1,35 @@
|
|||||||
extends Node
|
extends Node
|
||||||
#
|
|
||||||
## Exports
|
# Exports
|
||||||
#@export var player: PlayerBody
|
@export var player: PlayerCharacter
|
||||||
#
|
|
||||||
## Private Variables
|
# Private Variables
|
||||||
#var _zones_in_range: Array[InteractiveLoadingZone] = []
|
var _zones_in_range: Array[InteractiveLoadingZone] = []
|
||||||
#
|
|
||||||
## Private Methods
|
# Private Methods
|
||||||
#func _ready() -> void:
|
func _ready() -> void:
|
||||||
#player.interact_scanner.area_entered.connect(_on_interact_scanned)
|
player.interact_scanner.area_entered.connect(_on_interact_scanned)
|
||||||
#player.interact_scanner.area_exited.connect(_on_interact_unscanned)
|
player.interact_scanner.area_exited.connect(_on_interact_unscanned)
|
||||||
#player.interact_scanner.InteractionActionTriggered.connect(_on_interact_triggered)
|
player.interact_scanner.InteractionActionTriggered.connect(_on_interact_triggered)
|
||||||
#
|
|
||||||
#
|
|
||||||
#func _on_interact_scanned(area: Area2D) -> void:
|
func _on_interact_scanned(area: Area2D) -> void:
|
||||||
#if area is not InteractiveLoadingZone or _zones_in_range.has(area):
|
if area is not InteractiveLoadingZone or _zones_in_range.has(area):
|
||||||
#return
|
return
|
||||||
#
|
|
||||||
#_zones_in_range.append(area)
|
_zones_in_range.append(area)
|
||||||
#
|
|
||||||
#
|
|
||||||
#func _on_interact_unscanned(area: Area2D) -> void:
|
func _on_interact_unscanned(area: Area2D) -> void:
|
||||||
#if area is not InteractiveLoadingZone or !_zones_in_range.has(area):
|
if area is not InteractiveLoadingZone or !_zones_in_range.has(area):
|
||||||
#return
|
return
|
||||||
#
|
|
||||||
#_zones_in_range.erase(area)
|
_zones_in_range.erase(area)
|
||||||
#
|
|
||||||
#
|
|
||||||
#func _on_interact_triggered() -> void:
|
func _on_interact_triggered() -> void:
|
||||||
#if _zones_in_range.is_empty():
|
if _zones_in_range.is_empty():
|
||||||
#return
|
return
|
||||||
#
|
|
||||||
#var zone := _zones_in_range[0]
|
var zone := _zones_in_range[0]
|
||||||
#zone.Activate()
|
zone.Activate()
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
@export var player_entity: Node2D
|
@export var player: CharacterBody2D
|
||||||
@export var markers: Node2D
|
@export var markers: Node2D
|
||||||
|
|
||||||
# Public Methods
|
# Public Methods
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
var body := player_entity.get_node("Player Body") as CharacterBody2D
|
|
||||||
|
|
||||||
var marker_name := MapLoader.GetSpawnMarker()
|
var marker_name := MapLoader.GetSpawnMarker()
|
||||||
if !marker_name:
|
if !marker_name:
|
||||||
return
|
return
|
||||||
@@ -15,4 +13,4 @@ func _ready() -> void:
|
|||||||
if child.name == marker_name:
|
if child.name == marker_name:
|
||||||
var marker := child as Marker2D
|
var marker := child as Marker2D
|
||||||
var position := marker.global_position
|
var position := marker.global_position
|
||||||
body.position = position
|
player.position = position
|
||||||
|
|||||||
@@ -3,14 +3,15 @@
|
|||||||
[ext_resource type="Script" uid="uid://dbscr0b7k3rtp" path="res://Maps/Connectors/Scripts/collision_loading_zone_connector.gd" id="1_18bbf"]
|
[ext_resource type="Script" uid="uid://dbscr0b7k3rtp" path="res://Maps/Connectors/Scripts/collision_loading_zone_connector.gd" id="1_18bbf"]
|
||||||
[ext_resource type="TileSet" uid="uid://df0lg5vkqwbbt" path="res://Resources/Tilesets/home_interior.tres" id="1_rf04x"]
|
[ext_resource type="TileSet" uid="uid://df0lg5vkqwbbt" path="res://Resources/Tilesets/home_interior.tres" id="1_rf04x"]
|
||||||
[ext_resource type="Script" uid="uid://dkcsftcdqtmg" path="res://Maps/Connectors/Scripts/spawn_marker_connector.gd" id="2_16uj4"]
|
[ext_resource type="Script" uid="uid://dkcsftcdqtmg" path="res://Maps/Connectors/Scripts/spawn_marker_connector.gd" id="2_16uj4"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bbules4o3xayc" path="res://Entities/Map Objects/Loading Zone/entrance_transporter.tscn" id="3_7kg22"]
|
[ext_resource type="PackedScene" uid="uid://ca75b65eh7vv8" path="res://Entities/Map Objects/Loading Zone/collision_loading_zone.tscn" id="2_fdso5"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://6athlweutl2g" path="res://Entities/Characters/Player/player.tscn" id="2_lky26"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bbules4o3xayc" path="res://Entities/Map Objects/Loading Zone/loading_zone_transporter.tscn" id="3_7kg22"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dl2jpjtbiju34" path="res://Maps/Connectors/chest_interaction_connector.tscn" id="3_ec540"]
|
[ext_resource type="PackedScene" uid="uid://dl2jpjtbiju34" path="res://Maps/Connectors/chest_interaction_connector.tscn" id="3_ec540"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b7u4hlvuqiefn" path="res://Entities/Map Objects/Chests/Item Chests/item_chest_02 (Metal).tscn" id="4_a58cd"]
|
[ext_resource type="PackedScene" uid="uid://b7u4hlvuqiefn" path="res://Entities/Map Objects/Chests/Item Chests/item_chest_02 (Metal).tscn" id="4_a58cd"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b60nr4wfvijpf" path="res://Entities/Map Objects/Dialogue/dialogue_trigger.tscn" id="5_msu6a"]
|
[ext_resource type="PackedScene" uid="uid://b60nr4wfvijpf" path="res://Entities/Map Objects/Dialogue/dialogue_trigger.tscn" id="5_msu6a"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bm5ewxv51potl" path="res://Assets/Spritesheets/NPCs/Miner_Mike.png" id="6_x3y8m"]
|
[ext_resource type="Texture2D" uid="uid://bm5ewxv51potl" path="res://Assets/Spritesheets/NPCs/Miner_Mike.png" id="6_x3y8m"]
|
||||||
[ext_resource type="PackedScene" uid="uid://vc0dkptkr1ow" path="res://Entities/Map Objects/Triggers/on_collision_trigger.tscn" id="7_s4nwa"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://bqvnkdyhfa1yq" path="res://Maps/Forest Dungeon Entrance/Interiors/Home_01_Overlay_01.png" id="11_6xfm6"]
|
[ext_resource type="Texture2D" uid="uid://bqvnkdyhfa1yq" path="res://Maps/Forest Dungeon Entrance/Interiors/Home_01_Overlay_01.png" id="11_6xfm6"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c65cfm3t0obwq" path="res://Entities/Characters/Player/player_map_entity.tscn" id="11_s4nwa"]
|
[ext_resource type="PackedScene" uid="uid://nbkisxm2oekn" path="res://Entities/Characters/Utility/Components/movement_component.tscn" id="11_fqvwb"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_7kg22"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_7kg22"]
|
||||||
size = Vector2(32, 8)
|
size = Vector2(32, 8)
|
||||||
@@ -79,12 +80,13 @@ y_sort_enabled = true
|
|||||||
[node name="Collision Loading Zone Connector" type="Node" parent="Connectors" unique_id=483597596]
|
[node name="Collision Loading Zone Connector" type="Node" parent="Connectors" unique_id=483597596]
|
||||||
script = ExtResource("1_18bbf")
|
script = ExtResource("1_18bbf")
|
||||||
|
|
||||||
[node name="Spawn Marker Connector" type="Node" parent="Connectors" unique_id=296643918 node_paths=PackedStringArray("player_entity", "markers")]
|
[node name="Spawn Marker Connector" type="Node" parent="Connectors" unique_id=296643918 node_paths=PackedStringArray("player", "markers")]
|
||||||
script = ExtResource("2_16uj4")
|
script = ExtResource("2_16uj4")
|
||||||
player_entity = NodePath("../../Player Map Entity")
|
player = NodePath("../../Player")
|
||||||
markers = NodePath("../../Spawn Markers")
|
markers = NodePath("../../Spawn Markers")
|
||||||
|
|
||||||
[node name="Chest Interaction Connector" parent="Connectors" unique_id=625804018 instance=ExtResource("3_ec540")]
|
[node name="Chest Interaction Connector" parent="Connectors" unique_id=625804018 node_paths=PackedStringArray("player") instance=ExtResource("3_ec540")]
|
||||||
|
player = NodePath("../../Player")
|
||||||
|
|
||||||
[node name="Tilemap" type="Node2D" parent="." unique_id=894627186]
|
[node name="Tilemap" type="Node2D" parent="." unique_id=894627186]
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
@@ -114,16 +116,16 @@ locked_message_dialogue_trigger = NodePath("Locked Dialogue Trigger")
|
|||||||
[node name="Locked Dialogue Trigger" parent="Objects/Item Chest 02" unique_id=189867444 instance=ExtResource("5_msu6a")]
|
[node name="Locked Dialogue Trigger" parent="Objects/Item Chest 02" unique_id=189867444 instance=ExtResource("5_msu6a")]
|
||||||
dialogue_name = "MSG_FOREST_DUNGEON_ENTRANCE_HOME_01_LOCKED_CHEST_01"
|
dialogue_name = "MSG_FOREST_DUNGEON_ENTRANCE_HOME_01_LOCKED_CHEST_01"
|
||||||
|
|
||||||
[node name="Entrances" type="Node2D" parent="." unique_id=1862302491]
|
[node name="Loading Zones" type="Node2D" parent="." unique_id=1862302491]
|
||||||
|
|
||||||
[node name="On Collision Trigger" parent="Entrances" unique_id=895298999 instance=ExtResource("7_s4nwa")]
|
[node name="Collision Loading Zone" parent="Loading Zones" unique_id=1043800735 node_paths=PackedStringArray("loading_zone_transporter") instance=ExtResource("2_fdso5")]
|
||||||
collision_mask = 16
|
loading_zone_transporter = NodePath("Loading Zone Transporter")
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Entrances/On Collision Trigger" unique_id=2049955470]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Loading Zones/Collision Loading Zone" unique_id=2049955470]
|
||||||
position = Vector2(80, 188)
|
position = Vector2(80, 188)
|
||||||
shape = SubResource("RectangleShape2D_7kg22")
|
shape = SubResource("RectangleShape2D_7kg22")
|
||||||
|
|
||||||
[node name="Loading Zone Transporter" parent="Entrances/On Collision Trigger" unique_id=1690817663 instance=ExtResource("3_7kg22")]
|
[node name="Loading Zone Transporter" parent="Loading Zones/Collision Loading Zone" unique_id=1690817663 instance=ExtResource("3_7kg22")]
|
||||||
destination_map_id = 2
|
destination_map_id = 2
|
||||||
destination_marker_name = "Home 01 Entrance"
|
destination_marker_name = "Home 01 Entrance"
|
||||||
|
|
||||||
@@ -153,17 +155,17 @@ position = Vector2(-0.5, -4)
|
|||||||
shape = SubResource("RectangleShape2D_6xfm6")
|
shape = SubResource("RectangleShape2D_6xfm6")
|
||||||
debug_color = Color(0.7930861, 0.42714188, 7.70092e-07, 0.41960785)
|
debug_color = Color(0.7930861, 0.42714188, 7.70092e-07, 0.41960785)
|
||||||
|
|
||||||
[node name="Player Map Entity" parent="." unique_id=469362016 instance=ExtResource("11_s4nwa")]
|
|
||||||
position = Vector2(176, 133)
|
|
||||||
|
|
||||||
[node name="Camera2D" type="Camera2D" parent="." unique_id=2134984506]
|
[node name="Camera2D" type="Camera2D" parent="." unique_id=2134984506]
|
||||||
position = Vector2(127, 110)
|
position = Vector2(127, 110)
|
||||||
zoom = Vector2(3, 3)
|
zoom = Vector2(3, 3)
|
||||||
|
|
||||||
|
[node name="Player" parent="." unique_id=1502234578 instance=ExtResource("2_lky26")]
|
||||||
|
position = Vector2(108, 139)
|
||||||
|
|
||||||
|
[node name="Movement Component" parent="Player" unique_id=737644583 instance=ExtResource("11_fqvwb")]
|
||||||
|
|
||||||
[node name="Overlay" type="Sprite2D" parent="." unique_id=455840170]
|
[node name="Overlay" type="Sprite2D" parent="." unique_id=455840170]
|
||||||
position = Vector2(124, 217)
|
position = Vector2(124, 217)
|
||||||
scale = Vector2(0.25, 0.25)
|
scale = Vector2(0.25, 0.25)
|
||||||
texture = ExtResource("11_6xfm6")
|
texture = ExtResource("11_6xfm6")
|
||||||
offset = Vector2(16, -436)
|
offset = Vector2(16, -436)
|
||||||
|
|
||||||
[connection signal="body_entered" from="Entrances/On Collision Trigger" to="Entrances/On Collision Trigger/Loading Zone Transporter" method="Activate" unbinds=1]
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://303hbhqetdhy" path="res://Maps/Connectors/arrow_spawner.tscn" id="2_jtncl"]
|
[ext_resource type="PackedScene" uid="uid://303hbhqetdhy" path="res://Maps/Connectors/arrow_spawner.tscn" id="2_jtncl"]
|
||||||
[ext_resource type="PackedScene" uid="uid://divmfeqf10ri1" path="res://Maps/Connectors/bench_interaction_connector.tscn" id="3_x6da4"]
|
[ext_resource type="PackedScene" uid="uid://divmfeqf10ri1" path="res://Maps/Connectors/bench_interaction_connector.tscn" id="3_x6da4"]
|
||||||
[ext_resource type="Script" uid="uid://kfupww4frb1r" path="res://Maps/Connectors/Scripts/camera_limit_connector.gd" id="3_ycf72"]
|
[ext_resource type="Script" uid="uid://kfupww4frb1r" path="res://Maps/Connectors/Scripts/camera_limit_connector.gd" id="3_ycf72"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://6athlweutl2g" path="res://Entities/Characters/Player/player.tscn" id="4_4igim"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b03s7fw8bxdxs" path="res://Maps/Connectors/interactive_loading_zone_connector.tscn" id="4_4lnhp"]
|
[ext_resource type="PackedScene" uid="uid://b03s7fw8bxdxs" path="res://Maps/Connectors/interactive_loading_zone_connector.tscn" id="4_4lnhp"]
|
||||||
[ext_resource type="PackedScene" uid="uid://byp273amg5ji8" path="res://Entities/Map Objects/Chests/Item Chests/item_chest_01 (Wooden).tscn" id="5_bnsbe"]
|
[ext_resource type="PackedScene" uid="uid://byp273amg5ji8" path="res://Entities/Map Objects/Chests/Item Chests/item_chest_01 (Wooden).tscn" id="5_bnsbe"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bf6llktwqhs8l" path="res://Assets/Sprites/Door Fade.png" id="5_jett5"]
|
[ext_resource type="Texture2D" uid="uid://bf6llktwqhs8l" path="res://Assets/Sprites/Door Fade.png" id="5_jett5"]
|
||||||
@@ -22,13 +23,12 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://23tpba4r6ucg" path="res://Entities/Map Objects/Decorative/Outdoor/wooden_bench.tscn" id="14_kgsic"]
|
[ext_resource type="PackedScene" uid="uid://23tpba4r6ucg" path="res://Entities/Map Objects/Decorative/Outdoor/wooden_bench.tscn" id="14_kgsic"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dwbg6wca6yl5j" path="res://Entities/Map Objects/Decorative/Signs/wooden_sign_01.tscn" id="16_dc5v0"]
|
[ext_resource type="PackedScene" uid="uid://dwbg6wca6yl5j" path="res://Entities/Map Objects/Decorative/Signs/wooden_sign_01.tscn" id="16_dc5v0"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c2p8fteeqyikf" path="res://Entities/Characters/Animals/Frog/npc_frog.tscn" id="18_tfw55"]
|
[ext_resource type="PackedScene" uid="uid://c2p8fteeqyikf" path="res://Entities/Characters/Animals/Frog/npc_frog.tscn" id="18_tfw55"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bbules4o3xayc" path="res://Entities/Map Objects/Loading Zone/entrance_transporter.tscn" id="19_c5vrl"]
|
[ext_resource type="PackedScene" uid="uid://bbules4o3xayc" path="res://Entities/Map Objects/Loading Zone/loading_zone_transporter.tscn" id="19_c5vrl"]
|
||||||
[ext_resource type="PackedScene" uid="uid://coaf2ndwb6h61" path="res://Entities/Map Objects/Decorative/Signs/wooden_sign_02.tscn" id="19_jtncl"]
|
[ext_resource type="PackedScene" uid="uid://coaf2ndwb6h61" path="res://Entities/Map Objects/Decorative/Signs/wooden_sign_02.tscn" id="19_jtncl"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cla2d3gii8qda" path="res://Entities/Map Objects/Loading Zone/interactive_loading_zone.tscn" id="20_c5vrl"]
|
[ext_resource type="PackedScene" uid="uid://cla2d3gii8qda" path="res://Entities/Map Objects/Loading Zone/interactive_loading_zone.tscn" id="20_c5vrl"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b60nr4wfvijpf" path="res://Entities/Map Objects/Dialogue/dialogue_trigger.tscn" id="20_x6da4"]
|
[ext_resource type="PackedScene" uid="uid://b60nr4wfvijpf" path="res://Entities/Map Objects/Dialogue/dialogue_trigger.tscn" id="20_x6da4"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c7rjjlamkqhnw" path="res://Debug/Utility Objects/under_construction_block.tscn" id="26_4lnhp"]
|
[ext_resource type="PackedScene" uid="uid://c7rjjlamkqhnw" path="res://Debug/Utility Objects/under_construction_block.tscn" id="26_4lnhp"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c65cfm3t0obwq" path="res://Entities/Characters/Player/player_map_entity.tscn" id="27_0w1de"]
|
[ext_resource type="PackedScene" uid="uid://nbkisxm2oekn" path="res://Entities/Characters/Utility/Components/movement_component.tscn" id="28_mf3dv"]
|
||||||
[ext_resource type="Script" uid="uid://dtwxia7rlu5xt" path="res://Scripts/Utility/child_node_appender.gd" id="28_mf3dv"]
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_lwurn"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_lwurn"]
|
||||||
size = Vector2(768, 494)
|
size = Vector2(768, 494)
|
||||||
@@ -68,16 +68,21 @@ y_sort_enabled = true
|
|||||||
|
|
||||||
[node name="Map Connectors" type="Node" parent="." unique_id=1365901208]
|
[node name="Map Connectors" type="Node" parent="." unique_id=1365901208]
|
||||||
|
|
||||||
[node name="Chest Interaction Connector" parent="Map Connectors" unique_id=625804018 instance=ExtResource("1_jtncl")]
|
[node name="Chest Interaction Connector" parent="Map Connectors" unique_id=625804018 node_paths=PackedStringArray("player") instance=ExtResource("1_jtncl")]
|
||||||
|
player = NodePath("../../Player")
|
||||||
|
|
||||||
[node name="Arrow Spawner" parent="Map Connectors" unique_id=627092886 instance=ExtResource("2_jtncl")]
|
[node name="Arrow Spawner" parent="Map Connectors" unique_id=627092886 node_paths=PackedStringArray("player", "arrow_parent") instance=ExtResource("2_jtncl")]
|
||||||
|
player = NodePath("../../Player")
|
||||||
|
arrow_parent = NodePath("../../Objects/Projectiles")
|
||||||
|
|
||||||
[node name="Bench Interaction Connector" parent="Map Connectors" unique_id=541204437 instance=ExtResource("3_x6da4")]
|
[node name="Bench Interaction Connector" parent="Map Connectors" unique_id=541204437 node_paths=PackedStringArray("player") instance=ExtResource("3_x6da4")]
|
||||||
|
player = NodePath("../../Player")
|
||||||
|
|
||||||
[node name="Interactive Loading Zone Connector" parent="Map Connectors" unique_id=833475826 instance=ExtResource("4_4lnhp")]
|
[node name="Interactive Loading Zone Connector" parent="Map Connectors" unique_id=833475826 node_paths=PackedStringArray("player") instance=ExtResource("4_4lnhp")]
|
||||||
|
player = NodePath("../../Player")
|
||||||
|
|
||||||
[node name="Spawn Marker Connector" parent="Map Connectors" unique_id=807187299 node_paths=PackedStringArray("player_entity", "markers") instance=ExtResource("5_lphfo")]
|
[node name="Spawn Marker Connector" parent="Map Connectors" unique_id=807187299 node_paths=PackedStringArray("player", "markers") instance=ExtResource("5_lphfo")]
|
||||||
player_entity = NodePath("../../Player Map Entity")
|
player = NodePath("../../Player")
|
||||||
markers = NodePath("../../Spawn Markers")
|
markers = NodePath("../../Spawn Markers")
|
||||||
|
|
||||||
[node name="Persistence Connectors" type="Node" parent="." unique_id=1245900932]
|
[node name="Persistence Connectors" type="Node" parent="." unique_id=1245900932]
|
||||||
@@ -92,7 +97,7 @@ gates = Array[NodePath]([NodePath("../../Objects/Spike Gate"), NodePath("../../O
|
|||||||
collision_layer = 0
|
collision_layer = 0
|
||||||
collision_mask = 0
|
collision_mask = 0
|
||||||
script = ExtResource("3_ycf72")
|
script = ExtResource("3_ycf72")
|
||||||
camera_to_limit = NodePath("../Player Map Entity/Child Node Appender/Camera2D")
|
camera_to_limit = NodePath("../Player/Camera2D")
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Camera Limit Connector" unique_id=456404995]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Camera Limit Connector" unique_id=456404995]
|
||||||
position = Vector2(384, 408)
|
position = Vector2(384, 408)
|
||||||
@@ -345,13 +350,13 @@ destination_marker_name = "Entrance"
|
|||||||
[node name="Home 01 Entrance" type="Marker2D" parent="Spawn Markers" unique_id=1662896687]
|
[node name="Home 01 Entrance" type="Marker2D" parent="Spawn Markers" unique_id=1662896687]
|
||||||
position = Vector2(278, 474)
|
position = Vector2(278, 474)
|
||||||
|
|
||||||
[node name="Player Map Entity" parent="." unique_id=469362016 instance=ExtResource("27_0w1de")]
|
[node name="Player" parent="." unique_id=1502234578 instance=ExtResource("4_4igim")]
|
||||||
|
position = Vector2(656, 498)
|
||||||
|
|
||||||
[node name="Child Node Appender" type="Node" parent="Player Map Entity" unique_id=1527392334]
|
[node name="Movement Component" parent="Player" unique_id=737644583 instance=ExtResource("28_mf3dv")]
|
||||||
script = ExtResource("28_mf3dv")
|
|
||||||
relative_path = "Player Body"
|
|
||||||
|
|
||||||
[node name="Camera2D" type="Camera2D" parent="Player Map Entity/Child Node Appender" unique_id=1115720225]
|
[node name="Camera2D" type="Camera2D" parent="Player" unique_id=1115720225]
|
||||||
|
position = Vector2(0, 1)
|
||||||
zoom = Vector2(3, 3)
|
zoom = Vector2(3, 3)
|
||||||
position_smoothing_enabled = true
|
position_smoothing_enabled = true
|
||||||
|
|
||||||
@@ -393,6 +398,7 @@ position = Vector2(760, 312)
|
|||||||
[node name="Under Construction Block12" parent="Debug" unique_id=1005752992 instance=ExtResource("26_4lnhp")]
|
[node name="Under Construction Block12" parent="Debug" unique_id=1005752992 instance=ExtResource("26_4lnhp")]
|
||||||
position = Vector2(760, 328)
|
position = Vector2(760, 328)
|
||||||
|
|
||||||
|
[connection signal="SitOnBenchTriggered" from="Map Connectors/Bench Interaction Connector" to="Player" method="OnSitOnFurnitureTriggered"]
|
||||||
[connection signal="TargetHit" from="Objects/ArrowTarget" to="Objects/Spike Gate" method="OpenGate"]
|
[connection signal="TargetHit" from="Objects/ArrowTarget" to="Objects/Spike Gate" method="OpenGate"]
|
||||||
[connection signal="TargetHit" from="Objects/ArrowTarget" to="Objects/Spike Gate2" method="OpenGate"]
|
[connection signal="TargetHit" from="Objects/ArrowTarget" to="Objects/Spike Gate2" method="OpenGate"]
|
||||||
[connection signal="PressurePlateTripped" from="Objects/PressurePlate" to="Objects/Spike Gate" method="OpenGate"]
|
[connection signal="PressurePlateTripped" from="Objects/PressurePlate" to="Objects/Spike Gate" method="OpenGate"]
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
[ext_resource type="Script" uid="uid://qv5i4xr6pldc" path="res://Maps/Live Menus/Scripts/title_screen.gd" id="1_q1wq0"]
|
[ext_resource type="Script" uid="uid://qv5i4xr6pldc" path="res://Maps/Live Menus/Scripts/title_screen.gd" id="1_q1wq0"]
|
||||||
[ext_resource type="TileSet" uid="uid://cds2lapr3niap" path="res://Resources/Tilesets/forest_exterior.tres" id="1_x5wur"]
|
[ext_resource type="TileSet" uid="uid://cds2lapr3niap" path="res://Resources/Tilesets/forest_exterior.tres" id="1_x5wur"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bjufxlsrlcuas" path="res://Entities/Buildings/home_01.tscn" id="2_x4fat"]
|
[ext_resource type="PackedScene" uid="uid://bjufxlsrlcuas" path="res://Entities/Buildings/home_01.tscn" id="2_x4fat"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://6athlweutl2g" path="res://Entities/Characters/Player/player.tscn" id="3_kqssl"]
|
||||||
[ext_resource type="PackedScene" uid="uid://be6xfndyj4ckx" path="res://Entities/Map Objects/Trees/tree_02.tscn" id="4_gs8fo"]
|
[ext_resource type="PackedScene" uid="uid://be6xfndyj4ckx" path="res://Entities/Map Objects/Trees/tree_02.tscn" id="4_gs8fo"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bcx1d8kvp7o0h" path="res://Entities/Map Objects/Trees/tree_03.tscn" id="5_hgldw"]
|
[ext_resource type="PackedScene" uid="uid://bcx1d8kvp7o0h" path="res://Entities/Map Objects/Trees/tree_03.tscn" id="5_hgldw"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dl4bhu5o71rdv" path="res://Entities/Characters/Player/decorative_player_map_entity.tscn" id="6_gs8fo"]
|
|
||||||
|
|
||||||
[node name="TitleScreen" type="Node2D" unique_id=791312405]
|
[node name="TitleScreen" type="Node2D" unique_id=791312405]
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
@@ -61,8 +61,8 @@ position = Vector2(773, 425)
|
|||||||
[node name="Tree 03 - 2" parent="Entities/Map Objects/Trees" unique_id=1648360632 instance=ExtResource("5_hgldw")]
|
[node name="Tree 03 - 2" parent="Entities/Map Objects/Trees" unique_id=1648360632 instance=ExtResource("5_hgldw")]
|
||||||
position = Vector2(427, 307)
|
position = Vector2(427, 307)
|
||||||
|
|
||||||
[node name="Decorative Player Map Entity" parent="Entities" unique_id=2077444123 instance=ExtResource("6_gs8fo")]
|
[node name="Player" parent="." unique_id=1502234578 instance=ExtResource("3_kqssl")]
|
||||||
position = Vector2(488, 375)
|
position = Vector2(470, 358)
|
||||||
|
|
||||||
[node name="UI" type="CanvasLayer" parent="." unique_id=2020053057]
|
[node name="UI" type="CanvasLayer" parent="." unique_id=2020053057]
|
||||||
|
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
extends Node
|
|
||||||
|
|
||||||
# child_node_appender.gd
|
|
||||||
|
|
||||||
# All children of this node will be moved onto the node that is specified by
|
|
||||||
# provided path relative to the parent of this node
|
|
||||||
|
|
||||||
@export var relative_path: String
|
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
var parent := get_parent()
|
|
||||||
|
|
||||||
if parent == null:
|
|
||||||
push_error("Child Node Appender has no parent")
|
|
||||||
return
|
|
||||||
|
|
||||||
var node := parent.get_node_or_null(relative_path)
|
|
||||||
|
|
||||||
if node == null:
|
|
||||||
push_error("Provided path does not resolve to a node")
|
|
||||||
return
|
|
||||||
|
|
||||||
var children := get_children()
|
|
||||||
for child in children:
|
|
||||||
remove_child(child)
|
|
||||||
node.add_child(child)
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://dtwxia7rlu5xt
|
|
||||||
@@ -1,51 +1,55 @@
|
|||||||
extends Node
|
extends Node
|
||||||
#
|
|
||||||
## Signals
|
# Signals
|
||||||
signal DialogueTriggered(dialogue_name: String)
|
signal DialogueTriggered(dialogue_name: String)
|
||||||
#
|
|
||||||
## Exports
|
# Exports
|
||||||
#@export var dialogue_box: DialogueBox
|
@export var dialogue_box: DialogueBox
|
||||||
#
|
|
||||||
## Private Variables
|
# Private Variables
|
||||||
#var _dialogue_triggers_in_area: Array[DialogueTrigger] = []
|
var _dialogue_triggers_in_area: Array[DialogueTrigger] = []
|
||||||
#
|
|
||||||
## Private Methods
|
# Private Methods
|
||||||
#func _on_map_changed(map_id: Enums.MapIds) -> void:
|
func _on_map_changed(map_id: Enums.MapIds) -> void:
|
||||||
#var player := GroupUtils.GetPlayerBody() as PlayerBody
|
var player := GroupUtils.GetPlayer()
|
||||||
#if !player:
|
if !player:
|
||||||
#return
|
return
|
||||||
#
|
|
||||||
#dialogue_box.DialogueStarted.connect(player.QueueCutsceneState)
|
player.interact_scanner.area_entered.connect(_on_interact_scanned)
|
||||||
#dialogue_box.DialogueEnded.connect(player.QueueEndCutsceneState)
|
player.interact_scanner.area_exited.connect(_on_interact_unscanned)
|
||||||
#
|
player.interact_scanner.InteractionActionTriggered.connect(_on_interact_triggered)
|
||||||
#var dialogue_triggers := GroupUtils.GetAllDialogueTriggers()
|
|
||||||
#
|
dialogue_box.DialogueStarted.connect(player.QueueCutsceneState)
|
||||||
#for trigger in dialogue_triggers:
|
dialogue_box.DialogueEnded.connect(player.QueueEndCutsceneState)
|
||||||
#trigger.DialogueTriggered.connect(_on_dialogue_triggered)
|
|
||||||
#
|
var dialogue_triggers := GroupUtils.GetAllDialogueTriggers()
|
||||||
#
|
|
||||||
#func _on_dialogue_triggered(dialogue_name: String) -> void:
|
for trigger in dialogue_triggers:
|
||||||
## Wait one frame so we don't immediately close dialogue box
|
trigger.DialogueTriggered.connect(_on_dialogue_triggered)
|
||||||
## TODO This is stupid
|
|
||||||
#await get_tree().process_frame
|
|
||||||
#DialogueTriggered.emit(dialogue_name)
|
func _on_dialogue_triggered(dialogue_name: String) -> void:
|
||||||
#
|
# Wait one frame so we don't immediately close dialogue box
|
||||||
#
|
# TODO This is stupid
|
||||||
#func _on_interact_scanned(area: Area2D) -> void:
|
await get_tree().process_frame
|
||||||
#if area is not DialogueTrigger or _dialogue_triggers_in_area.has(area):
|
DialogueTriggered.emit(dialogue_name)
|
||||||
#return
|
|
||||||
#_dialogue_triggers_in_area.append(area)
|
|
||||||
#
|
func _on_interact_scanned(area: Area2D) -> void:
|
||||||
#
|
if area is not DialogueTrigger or _dialogue_triggers_in_area.has(area):
|
||||||
#func _on_interact_unscanned(area: Area2D) -> void:
|
return
|
||||||
#if area is not DialogueTrigger or !_dialogue_triggers_in_area.has(area):
|
_dialogue_triggers_in_area.append(area)
|
||||||
#return
|
|
||||||
#_dialogue_triggers_in_area.erase(area)
|
|
||||||
#
|
func _on_interact_unscanned(area: Area2D) -> void:
|
||||||
#
|
if area is not DialogueTrigger or !_dialogue_triggers_in_area.has(area):
|
||||||
#func _on_interact_triggered() -> void:
|
return
|
||||||
#if _dialogue_triggers_in_area.is_empty():
|
_dialogue_triggers_in_area.erase(area)
|
||||||
#return
|
|
||||||
#
|
|
||||||
#var trigger := _dialogue_triggers_in_area[0]
|
func _on_interact_triggered() -> void:
|
||||||
#trigger.Trigger()
|
if _dialogue_triggers_in_area.is_empty():
|
||||||
|
return
|
||||||
|
|
||||||
|
var trigger := _dialogue_triggers_in_area[0]
|
||||||
|
trigger.Trigger()
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
extends Node
|
|
||||||
class_name Vector2Utils
|
|
||||||
|
|
||||||
static func GetClosestDirectionVector(dv: Vector2) -> Vector2:
|
|
||||||
if dv == Vector2.ZERO:
|
|
||||||
return dv
|
|
||||||
if dv.y < 0:
|
|
||||||
return Vector2.UP
|
|
||||||
if dv.y > 0:
|
|
||||||
return Vector2.DOWN
|
|
||||||
if dv.x < 0:
|
|
||||||
return Vector2.LEFT
|
|
||||||
return Vector2.RIGHT
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://b7tucdfjejupa
|
|
||||||
@@ -77,7 +77,6 @@ locale/translations=PackedStringArray("res://Resources/Dialogue/Archipelago Game
|
|||||||
2d_physics/layer_2="Interaction"
|
2d_physics/layer_2="Interaction"
|
||||||
2d_physics/layer_3="Projectile Collision"
|
2d_physics/layer_3="Projectile Collision"
|
||||||
2d_physics/layer_4="Occlusion"
|
2d_physics/layer_4="Occlusion"
|
||||||
2d_physics/layer_5="Entrance"
|
|
||||||
|
|
||||||
[physics]
|
[physics]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user