Compare commits
2 Commits
beta-1.6/p
...
8264533cf5
| Author | SHA1 | Date | |
|---|---|---|---|
| 8264533cf5 | |||
| 8bcf406576 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -17,6 +17,3 @@ mono_crash.*.json
|
||||
|
||||
# Android build files
|
||||
/android/
|
||||
|
||||
# Rider files
|
||||
.idea
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 MiB |
@@ -1,40 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bo1utikr0r2q1"
|
||||
path="res://.godot/imported/64x64.png-129f36e07b18bd0408477af73ef87a83.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Spritesheets/Icons/UI/64x64.png"
|
||||
dest_files=["res://.godot/imported/64x64.png-129f36e07b18bd0408477af73ef87a83.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@@ -1,28 +0,0 @@
|
||||
extends Node
|
||||
class_name BaseTestRunner
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
var methods := self.get_method_list()
|
||||
for method in methods:
|
||||
var method_name: String = method["name"]
|
||||
if method_name.left(5).to_lower() != "test_":
|
||||
continue
|
||||
|
||||
var return_dict: Dictionary = method["return"]
|
||||
var return_type: int = return_dict["type"]
|
||||
|
||||
if return_type != 1:
|
||||
print_rich("[color=yellow]Skipping Unit Test Method '%s'. Reason: Return type is not bool[/color]" % method_name)
|
||||
continue
|
||||
|
||||
var args: Array = method["args"]
|
||||
if not args.is_empty():
|
||||
print_rich("[color=yellow]Skipping Unit Test Method '%s', Reason: Method requires arguments.[/color]" % method_name)
|
||||
continue
|
||||
|
||||
var result: bool = call(method_name)
|
||||
if result:
|
||||
print_rich("[color=green]%s: Success![/color]" % method_name)
|
||||
else:
|
||||
print_rich("[color=red]%s: Failure...[/color]" % method_name)
|
||||
@@ -1 +0,0 @@
|
||||
uid://bsewsmjxlup47
|
||||
@@ -1,3 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://rl2o7alqg7w4"]
|
||||
|
||||
[node name="BaseTestRunner" type="Node" unique_id=1916529975]
|
||||
@@ -1,14 +0,0 @@
|
||||
extends BaseTestRunner
|
||||
|
||||
|
||||
func Test_1() -> bool:
|
||||
var json_string = "{\"Key\": false}"
|
||||
var json = JSON.new()
|
||||
var parse_result := json.parse(json_string)
|
||||
if parse_result != OK:
|
||||
return false
|
||||
return true
|
||||
|
||||
|
||||
func Test_2() -> String:
|
||||
return ''
|
||||
@@ -1 +0,0 @@
|
||||
uid://xrexdmk7d1qx
|
||||
@@ -1,6 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://c23ct3b1nmih7"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://xrexdmk7d1qx" path="res://Debug/Unit Testing/Scripts/json_parsing_tests.gd" id="1_beu12"]
|
||||
|
||||
[node name="JsonParsingTests" type="Node" unique_id=2014332517]
|
||||
script = ExtResource("1_beu12")
|
||||
@@ -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")
|
||||
@@ -1,56 +0,0 @@
|
||||
class_name BaseState
|
||||
extends Node
|
||||
|
||||
@export var state_machine: PlayerStateMachine
|
||||
|
||||
var _subscribed_events: Array[String] = []
|
||||
var _subscribed_events_callables: Array[Callable] = []
|
||||
|
||||
func GetStateEnum() -> PlayerStateMachine.States:
|
||||
push_error("Unimplemented Method: BaseState.GetStateEnum")
|
||||
return PlayerStateMachine.States.IDLE
|
||||
|
||||
|
||||
func GetAnimationBaseName() -> String:
|
||||
var state: String = PlayerStateMachine.States.keys()[GetStateEnum()]
|
||||
return state.to_lower()
|
||||
|
||||
|
||||
func Enter(_extra_parameters: Dictionary) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func Exit() -> void:
|
||||
pass
|
||||
|
||||
|
||||
func Update(_delta: float) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func IsActive() -> bool:
|
||||
return state_machine.GetCurrentStateEnum() == GetStateEnum()
|
||||
|
||||
|
||||
func IsStateActionable() -> bool:
|
||||
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 +0,0 @@
|
||||
extends BaseState
|
||||
|
||||
# idle_state.gd
|
||||
|
||||
func _ready() -> void:
|
||||
SubscribeToEvent("MovementQueued", OnMovementQueued)
|
||||
|
||||
|
||||
func OnMovementQueued(dv: Vector2) -> void:
|
||||
state_machine.QueueStateChange(PlayerStateMachine.States.WALKING, {"dv": dv})
|
||||
|
||||
|
||||
func GetStateEnum() -> PlayerStateMachine.States:
|
||||
return PlayerStateMachine.States.IDLE
|
||||
@@ -1,40 +0,0 @@
|
||||
extends BaseState
|
||||
|
||||
# walking_state.gd
|
||||
|
||||
signal StartedWalking
|
||||
|
||||
@export var walking_speed := 100
|
||||
@export var body: CharacterBody2D
|
||||
|
||||
var _queued_dv: Vector2
|
||||
|
||||
func _ready() -> void:
|
||||
SubscribeToEvent("MovementQueued", OnMovementQueued)
|
||||
SubscribeToEvent("NoMovementQueued", OnNoMovementQueued)
|
||||
|
||||
|
||||
func Enter(_extra_parameters: Dictionary) -> void:
|
||||
_queued_dv = _extra_parameters["dv"]
|
||||
StartedWalking.emit()
|
||||
|
||||
|
||||
func Update(_delta: float) -> void:
|
||||
if _queued_dv == Vector2.ZERO:
|
||||
state_machine.QueueStateChange(PlayerStateMachine.States.IDLE)
|
||||
return
|
||||
|
||||
body.velocity = _queued_dv * walking_speed
|
||||
body.move_and_slide()
|
||||
|
||||
|
||||
func OnMovementQueued(dv: Vector2) -> void:
|
||||
_queued_dv = dv
|
||||
|
||||
|
||||
func OnNoMovementQueued() -> void:
|
||||
_queued_dv = Vector2.ZERO
|
||||
|
||||
|
||||
func GetStateEnum() -> PlayerStateMachine.States:
|
||||
return PlayerStateMachine.States.WALKING
|
||||
@@ -1,4 +0,0 @@
|
||||
extends CharacterBody2D
|
||||
|
||||
# PlayerBody.gd:
|
||||
# Represents the player's actual CharacterBody (collision)
|
||||
@@ -1,3 +0,0 @@
|
||||
extends AnimatedSprite2D
|
||||
|
||||
# sprite.gd
|
||||
@@ -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,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")]
|
||||
@@ -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"]
|
||||
@@ -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 +0,0 @@
|
||||
[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"]
|
||||
|
||||
[node name="Movement Component" type="Node" unique_id=737644583]
|
||||
script = ExtResource("1_b2nib")
|
||||
@@ -1 +0,0 @@
|
||||
uid://ba0nsd76er3xa
|
||||
@@ -1,21 +0,0 @@
|
||||
extends Node
|
||||
#extends Node
|
||||
#
|
||||
## Exports
|
||||
#@export var arrow_parent: Node2D
|
||||
#
|
||||
## Preloads
|
||||
#const wooden_arrow_scene: PackedScene = preload("uid://b2wq5m01b68rx")
|
||||
#
|
||||
## Private Methods
|
||||
#func _ready() -> void:
|
||||
#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
|
||||
#wooden_arrow.SetProjectileStartAndDirection(fire_position, direction)
|
||||
#
|
||||
#if arrow_parent == null:
|
||||
#return
|
||||
#arrow_parent.add_child(wooden_arrow)
|
||||
@@ -1 +0,0 @@
|
||||
uid://bqedrioybnvi5
|
||||
@@ -1,8 +0,0 @@
|
||||
extends Area2D
|
||||
class_name InteractiveEntrance
|
||||
|
||||
@export var entrance_transporter: EntranceTransporter
|
||||
|
||||
# Public Methods
|
||||
func Activate() -> void:
|
||||
entrance_transporter.Activate()
|
||||
@@ -1 +0,0 @@
|
||||
uid://csspyy43sohfl
|
||||
@@ -1,6 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://dq6ifketavnfu"]
|
||||
|
||||
[node name="Collision Loading Zone" type="Area2D" unique_id=1043800735 groups=["Collision Loading Zone Group"]]
|
||||
collision_layer = 0
|
||||
|
||||
[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")
|
||||
@@ -1,7 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://dpwm1tn0mbr3l"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://vmyfl4obus88" path="res://Entities/Map Objects/Trees/Effects/Scripts/leaf_spawner.gd" id="1_l7yxv"]
|
||||
|
||||
[node name="Leaf Spawner" type="Node2D" unique_id=986945632]
|
||||
y_sort_enabled = true
|
||||
script = ExtResource("1_l7yxv")
|
||||
@@ -1,102 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://cc3qat6un2323"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://xygpf7c886pj" path="res://Assets/Spritesheets/Trees/Medium_Oak_Tree.png" id="1_i2ia5"]
|
||||
[ext_resource type="PackedScene" uid="uid://d24gcv3umq60k" path="res://Entities/Characters/Utility/Occlusion/occlusion_culler.tscn" id="1_jbed0"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_jbed0"]
|
||||
radius = 12.0
|
||||
|
||||
[sub_resource type="Shader" id="Shader_jbed0"]
|
||||
code = "shader_type canvas_item;
|
||||
|
||||
uniform bool render_noise = false;
|
||||
uniform sampler2D noise_texture : repeat_enable; // set in inspector
|
||||
uniform float amplitude : hint_range(0.0, 0.5, 0.01) = 0.2;
|
||||
uniform float time_scale : hint_range(0.0, 5.0, 0.01) = 0.04;
|
||||
uniform float noise_scale : hint_range(0.0, 2.0, 0.0001) = 0.001;
|
||||
uniform float rotation_strength : hint_range(0.0, 5.0, 0.1) = 1;
|
||||
uniform vec2 rotation_pivot = vec2(0.5, 1);
|
||||
varying vec2 world_position;
|
||||
|
||||
void vertex(){
|
||||
world_position = (MODEL_MATRIX * vec4(VERTEX, 0.0, 1.0)).xy;
|
||||
}
|
||||
|
||||
vec2 get_sample_pos(vec2 pos, float scale, float offset) {
|
||||
pos *= scale;
|
||||
pos += offset;
|
||||
return pos;
|
||||
}
|
||||
|
||||
vec2 rotate_vec(vec2 vec, vec2 pivot, float rotation) {
|
||||
float cosa = cos(rotation);
|
||||
float sina = sin(rotation);
|
||||
vec -= pivot;
|
||||
return vec2(
|
||||
cosa * vec.x - sina * vec.y,
|
||||
cosa * vec.y + sina * vec.x
|
||||
) + pivot;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
// get noise from texture
|
||||
vec2 noise_sample_pos = get_sample_pos(world_position, noise_scale, TIME * time_scale);
|
||||
float noise_amount = texture(noise_texture, noise_sample_pos).r - 0.5f;
|
||||
|
||||
// get rotation position around a pivot
|
||||
float rotation = amplitude * noise_amount;
|
||||
vec2 rotated_uvs = rotate_vec(UV, rotation_pivot, rotation);
|
||||
|
||||
// blend original uvs and rotated uvs based on distance to pivot
|
||||
float dist = distance(UV, rotation_pivot) * rotation_strength;
|
||||
vec2 result_uvs = mix(UV, rotated_uvs, dist);
|
||||
|
||||
// output color
|
||||
COLOR = texture(TEXTURE, result_uvs);
|
||||
|
||||
// optional, preview noise texture for debugging
|
||||
if (render_noise) {
|
||||
vec4 noise_color = texture(noise_texture, noise_sample_pos);
|
||||
COLOR = noise_color;
|
||||
}
|
||||
}"
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_o0u4i"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_b23hf"]
|
||||
shader = SubResource("Shader_jbed0")
|
||||
shader_parameter/render_noise = false
|
||||
shader_parameter/noise_texture = SubResource("NoiseTexture2D_o0u4i")
|
||||
shader_parameter/amplitude = 0.05999999865888
|
||||
shader_parameter/time_scale = 0.04
|
||||
shader_parameter/noise_scale = 0.001
|
||||
shader_parameter/rotation_strength = 1.0
|
||||
shader_parameter/rotation_pivot = Vector2(0.5, 1)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5otsd"]
|
||||
atlas = ExtResource("1_i2ia5")
|
||||
region = Rect2(32, 0, 32, 48)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0srx6"]
|
||||
size = Vector2(6, 3)
|
||||
|
||||
[node name="Tree 01" type="StaticBody2D" unique_id=2046930104]
|
||||
y_sort_enabled = true
|
||||
|
||||
[node name="Occlusion Culler" parent="." unique_id=1362480066 node_paths=PackedStringArray("nodes_to_occlude") instance=ExtResource("1_jbed0")]
|
||||
nodes_to_occlude = [NodePath("../Sprite2D")]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Occlusion Culler" unique_id=731605527]
|
||||
position = Vector2(0, -10)
|
||||
shape = SubResource("CircleShape2D_jbed0")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1420512565]
|
||||
y_sort_enabled = true
|
||||
material = SubResource("ShaderMaterial_b23hf")
|
||||
position = Vector2(0, 8)
|
||||
texture = SubResource("AtlasTexture_5otsd")
|
||||
offset = Vector2(0, -8)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=870152657]
|
||||
position = Vector2(0, 6.5)
|
||||
shape = SubResource("RectangleShape2D_0srx6")
|
||||
@@ -1,4 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://vc0dkptkr1ow"]
|
||||
|
||||
[node name="On Collision Trigger" type="Area2D" unique_id=895298999]
|
||||
collision_layer = 0
|
||||
BIN
Game Icon.png
BIN
Game Icon.png
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
@@ -1,40 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ckbsqf4p5xu44"
|
||||
path="res://.godot/imported/Game Icon.png-1ecac6caff9b7691e845293f1a955d2a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Game Icon.png"
|
||||
dest_files=["res://.godot/imported/Game Icon.png-1ecac6caff9b7691e845293f1a955d2a.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@@ -1,8 +0,0 @@
|
||||
extends Node
|
||||
|
||||
# Public Methods
|
||||
func GetMovementComponent(container: Node) -> MovementComponent:
|
||||
for node in container.get_children():
|
||||
if node is MovementComponent:
|
||||
return node
|
||||
return null
|
||||
@@ -1 +0,0 @@
|
||||
uid://cf5j2r4gpceng
|
||||
@@ -1,3 +0,0 @@
|
||||
extends CanvasLayer
|
||||
|
||||
const MAP_UI = preload("uid://ce6ix6ca6js5f")
|
||||
@@ -1,26 +0,0 @@
|
||||
extends Node2D
|
||||
|
||||
enum StartOptions {
|
||||
TitleScreen,
|
||||
InitialMap
|
||||
}
|
||||
|
||||
@export var starting_scene := StartOptions.TitleScreen
|
||||
|
||||
@onready var map_transitioner: Node = $"Map Transitioner"
|
||||
@onready var map_ui: Control = $"Gui/Map UI"
|
||||
|
||||
# Private Methods
|
||||
func _ready() -> void:
|
||||
match starting_scene:
|
||||
StartOptions.TitleScreen:
|
||||
map_transitioner.call_deferred("InstantiateTitleScreen")
|
||||
StartOptions.InitialMap:
|
||||
map_transitioner.call_deferred("InstantiateInitialMap")
|
||||
|
||||
|
||||
func _on_map_changed(map_id: Enums.MapIds) -> void:
|
||||
if map_id != Enums.MapIds.TITLE_SCREEN:
|
||||
map_ui.set_deferred("visible", true)
|
||||
else:
|
||||
map_ui.set_deferred("visible", false)
|
||||
@@ -1,6 +0,0 @@
|
||||
extends Node
|
||||
|
||||
# Public Methods
|
||||
func OnGameStarted() -> void:
|
||||
print("Loading from disk")
|
||||
PersistenceManager.LoadFromDisk(PersistenceManager.DEFAULT_SAVE_FILE_PATH)
|
||||
@@ -1 +0,0 @@
|
||||
uid://bkvsdwn7swt1p
|
||||
@@ -1,54 +0,0 @@
|
||||
extends Node
|
||||
#class_name BenchInteractionConnector
|
||||
#
|
||||
## Signals
|
||||
#signal SitOnBenchTriggered(position: Vector2, sitting_direction: Enums.Directions)
|
||||
#
|
||||
## Exports
|
||||
#@export var player: PlayerBody
|
||||
#
|
||||
## Private Variables
|
||||
#var _benches_in_range: Array[WoodenBench] = []
|
||||
#
|
||||
## Private Methods
|
||||
#func _ready() -> void:
|
||||
#player.interact_scanner.area_entered.connect(_on_interact_scanned)
|
||||
#player.interact_scanner.area_exited.connect(_on_interact_unscanned)
|
||||
#player.interact_scanner.InteractionActionTriggered.connect(_on_interact_triggered)
|
||||
#
|
||||
#
|
||||
#func _on_interact_scanned(area: Area2D) -> void:
|
||||
#var parent := area.get_parent()
|
||||
#if parent == null or parent is not WoodenBench or _benches_in_range.has(parent):
|
||||
#return
|
||||
#_benches_in_range.append(parent)
|
||||
#
|
||||
#
|
||||
#func _on_interact_unscanned(area: Area2D) -> void:
|
||||
#var parent: Node = area.get_parent()
|
||||
#if parent == null or parent is not WoodenBench or !_benches_in_range.has(parent):
|
||||
#return
|
||||
#_benches_in_range.erase(parent)
|
||||
#
|
||||
#
|
||||
#func _on_interact_triggered() -> void:
|
||||
#if _benches_in_range.is_empty():
|
||||
#return
|
||||
#
|
||||
#var bench := _benches_in_range[0]
|
||||
#var sitting_spots_container := bench.get_node("Sitting Spots") as Node2D
|
||||
#var sitting_spot_markers := sitting_spots_container.get_children()
|
||||
#
|
||||
#var closest_marker: Marker2D
|
||||
#var distance_to_player := 9999.0
|
||||
#for node in sitting_spot_markers:
|
||||
#var marker := node as Marker2D
|
||||
#var distance := marker.global_position.distance_to(player.global_position)
|
||||
#if distance < distance_to_player:
|
||||
#closest_marker = marker
|
||||
#distance_to_player = distance
|
||||
#
|
||||
#if !closest_marker:
|
||||
#return
|
||||
#
|
||||
#player.SitOnFurnitureTriggered.emit(closest_marker.global_position, Enums.Directions.DOWN)
|
||||
@@ -1,68 +0,0 @@
|
||||
extends Node
|
||||
|
||||
# Signals
|
||||
signal OpeningOfOpenedChestAttempted
|
||||
|
||||
# Exports
|
||||
@export var auto_connect_all_chests := true
|
||||
|
||||
# Private Variables
|
||||
var _chests_in_range: Array[BaseChest] = []
|
||||
|
||||
## Private Methods
|
||||
#func _ready() -> void:
|
||||
#var chests := GroupUtils.GetAllTreasureChests()
|
||||
#for chest in chests:
|
||||
#chest.OpeningAnimationStarted.connect(_on_chest_opening_animation_started)
|
||||
#
|
||||
#
|
||||
#func _on_chest_opening_animation_started() -> void:
|
||||
#player.QueueCutsceneState()
|
||||
#
|
||||
#var camera_idx := children.find_custom(func(x): return x is Camera2D)
|
||||
#if camera_idx == -1: return
|
||||
#
|
||||
## Zoom In
|
||||
#var camera := children[camera_idx] as Camera2D
|
||||
#var current_zoom := camera.zoom
|
||||
#await get_tree().create_tween().tween_property(camera, "zoom", current_zoom + Vector2(2, 2), 0.5).finished
|
||||
#
|
||||
## Player the player's chest opening animation
|
||||
#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
|
||||
#await play_animation_state.AnimationFinished
|
||||
#player.state_machine.QueueStateChange(PlayerStateMachine.States.IDLE)
|
||||
#
|
||||
## Zoom back out
|
||||
#await get_tree().create_tween().tween_property(camera, "zoom", current_zoom, 0.5).finished
|
||||
#
|
||||
#
|
||||
#func _on_interact_scanned(area: Area2D) -> void:
|
||||
#var chest = area.get_parent()
|
||||
#if chest == null or chest is not BaseChest:
|
||||
#return
|
||||
#if _chests_in_range.has(chest):
|
||||
#return
|
||||
#_chests_in_range.append(chest)
|
||||
#
|
||||
#
|
||||
#func _on_interact_unscanned(area: Area2D) -> void:
|
||||
#var chest = area.get_parent()
|
||||
#if chest == null or chest is not BaseChest:
|
||||
#return
|
||||
#if !_chests_in_range.has(chest):
|
||||
#return
|
||||
#_chests_in_range.erase(chest)
|
||||
#
|
||||
#
|
||||
#func _on_interact_triggered() -> void:
|
||||
#if _chests_in_range.is_empty():
|
||||
#return
|
||||
#
|
||||
#var chest := _chests_in_range[0]
|
||||
#if !chest.is_open:
|
||||
#chest.Open()
|
||||
#else:
|
||||
#chest.OpenAlreadyOpened()
|
||||
#OpeningOfOpenedChestAttempted.emit()
|
||||
@@ -1 +0,0 @@
|
||||
extends Node
|
||||
@@ -1,35 +0,0 @@
|
||||
extends Node
|
||||
#
|
||||
## Exports
|
||||
#@export var player: PlayerBody
|
||||
#
|
||||
## Private Variables
|
||||
#var _zones_in_range: Array[InteractiveLoadingZone] = []
|
||||
#
|
||||
## Private Methods
|
||||
#func _ready() -> void:
|
||||
#player.interact_scanner.area_entered.connect(_on_interact_scanned)
|
||||
#player.interact_scanner.area_exited.connect(_on_interact_unscanned)
|
||||
#player.interact_scanner.InteractionActionTriggered.connect(_on_interact_triggered)
|
||||
#
|
||||
#
|
||||
#func _on_interact_scanned(area: Area2D) -> void:
|
||||
#if area is not InteractiveLoadingZone or _zones_in_range.has(area):
|
||||
#return
|
||||
#
|
||||
#_zones_in_range.append(area)
|
||||
#
|
||||
#
|
||||
#func _on_interact_unscanned(area: Area2D) -> void:
|
||||
#if area is not InteractiveLoadingZone or !_zones_in_range.has(area):
|
||||
#return
|
||||
#
|
||||
#_zones_in_range.erase(area)
|
||||
#
|
||||
#
|
||||
#func _on_interact_triggered() -> void:
|
||||
#if _zones_in_range.is_empty():
|
||||
#return
|
||||
#
|
||||
#var zone := _zones_in_range[0]
|
||||
#zone.Activate()
|
||||
File diff suppressed because one or more lines are too long
@@ -1,7 +0,0 @@
|
||||
extends Node2D
|
||||
|
||||
signal GameStarted
|
||||
|
||||
# Private Methods
|
||||
func _on_start_game_button_pressed() -> void:
|
||||
GameStarted.emit()
|
||||
@@ -1 +0,0 @@
|
||||
uid://qv5i4xr6pldc
|
||||
File diff suppressed because one or more lines are too long
@@ -1,20 +0,0 @@
|
||||
extends Node
|
||||
|
||||
@export var chests: Array[NodePath]
|
||||
|
||||
# Private Methods
|
||||
func _ready() -> void:
|
||||
for relative_node_path in chests:
|
||||
var chest: BaseChest = get_node(relative_node_path)
|
||||
var node_path := chest.get_path()
|
||||
chest.ChestOpened.connect(func(): _on_chest_opened(chest))
|
||||
|
||||
if PersistenceManager.HasData(node_path):
|
||||
var chest_opened: bool = PersistenceManager.GetData(node_path)
|
||||
if chest_opened:
|
||||
chest.call_deferred("SetOpenedFromLoad")
|
||||
|
||||
|
||||
func _on_chest_opened(chest: BaseChest) -> void:
|
||||
var node_path := chest.get_path()
|
||||
PersistenceManager.UpdateData(node_path, true)
|
||||
@@ -1 +0,0 @@
|
||||
uid://75g2fysjrqji
|
||||
@@ -1,39 +0,0 @@
|
||||
extends Node
|
||||
|
||||
@export var gates: Array[NodePath]
|
||||
|
||||
# Private Methods
|
||||
func _ready() -> void:
|
||||
for node_path in gates:
|
||||
_handle_spike_gate(node_path)
|
||||
|
||||
|
||||
func _handle_spike_gate(node_path: NodePath) -> bool:
|
||||
var node := get_node(node_path)
|
||||
node_path = node.get_path()
|
||||
if not node.name.begins_with("Spike Gate"):
|
||||
return false
|
||||
|
||||
# Connect Signal
|
||||
node.connect("Opened", func(): _on_spike_gate_opened(node))
|
||||
|
||||
if not PersistenceManager.HasData(node_path):
|
||||
return true
|
||||
|
||||
var is_open: bool = PersistenceManager.GetData(node_path)
|
||||
if not is_open:
|
||||
return true
|
||||
|
||||
var collision_shape: CollisionShape2D = node.get_node("CollisionShape2D")
|
||||
var animated_sprite: AnimatedSprite2D = node.get_node("AnimatedSprite2D")
|
||||
|
||||
node.set_deferred("is_open", true)
|
||||
collision_shape.set_deferred("disabled", true)
|
||||
animated_sprite.call_deferred("play", "open")
|
||||
|
||||
return true
|
||||
|
||||
|
||||
func _on_spike_gate_opened(node: Node) -> void:
|
||||
var path := node.get_path()
|
||||
PersistenceManager.UpdateData(path, true)
|
||||
@@ -1 +0,0 @@
|
||||
uid://brsiegtrne15y
|
||||
@@ -1,6 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://w4mh31se58f4"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://75g2fysjrqji" path="res://Persistence/Connectors/Scripts/chest_persistence_connector.gd" id="1_hytou"]
|
||||
|
||||
[node name="Chest Persistence Connector" type="Node" unique_id=281805027]
|
||||
script = ExtResource("1_hytou")
|
||||
@@ -1,6 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://c5ymu08jotbfp"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://brsiegtrne15y" path="res://Persistence/Connectors/Scripts/gate_persistence_connector.gd" id="1_0smsr"]
|
||||
|
||||
[node name="GatePersistenceConnector" type="Node" unique_id=1082904286]
|
||||
script = ExtResource("1_0smsr")
|
||||
@@ -1,66 +0,0 @@
|
||||
extends Node
|
||||
|
||||
const DEFAULT_SAVE_FILE_PATH = "user://savegame.save"
|
||||
|
||||
var _save_file_path: String
|
||||
var _save_dictionary: Dictionary = {}
|
||||
|
||||
# Public Methods
|
||||
func UpdateData(key: String, value: Variant) -> void:
|
||||
_save_dictionary[key] = value
|
||||
|
||||
|
||||
func UpdateNode(node_path: NodePath, value: Variant) -> void:
|
||||
UpdateData(str(node_path), value)
|
||||
|
||||
|
||||
func GetData(key: String) -> Variant:
|
||||
if not _save_dictionary.has(key):
|
||||
return null
|
||||
return _save_dictionary[key]
|
||||
|
||||
|
||||
func GetNode(node_path: NodePath) -> Variant:
|
||||
var key := str(node_path)
|
||||
return GetData(key)
|
||||
|
||||
|
||||
func HasData(node_path: NodePath) -> bool:
|
||||
return _save_dictionary.has(node_path)
|
||||
|
||||
|
||||
func SaveToDisk() -> void:
|
||||
if !_save_file_path:
|
||||
return
|
||||
|
||||
var save_file := FileAccess.open(_save_file_path, FileAccess.WRITE)
|
||||
var json := JSON.stringify(_save_dictionary)
|
||||
|
||||
save_file.store_line(json)
|
||||
|
||||
|
||||
func LoadFromDisk(save_file_path: String) -> void:
|
||||
_save_file_path = save_file_path
|
||||
|
||||
if not FileAccess.file_exists(save_file_path):
|
||||
print_rich("[color=yellow]Save file at path %s does not exist, creating new save file...[/color]" % save_file_path)
|
||||
return
|
||||
|
||||
var save_file := FileAccess.open(save_file_path, FileAccess.READ)
|
||||
print("Loading save file from path: %s" % save_file.get_path_absolute())
|
||||
|
||||
if save_file.get_position() >= save_file.get_length():
|
||||
print("Save file was empty...")
|
||||
return
|
||||
|
||||
var line := save_file.get_line()
|
||||
var json = JSON.new()
|
||||
var parse_result := json.parse(line)
|
||||
if parse_result != OK:
|
||||
print("Parsing result when loading file: [%s] in %s at line %d" % [json.get_error_message(), line, json.get_error_line()])
|
||||
return
|
||||
|
||||
print("JSON data parsed: [%d]" % typeof(json.data))
|
||||
|
||||
var data_dict: Dictionary = json.data
|
||||
_save_dictionary = data_dict
|
||||
@@ -1 +0,0 @@
|
||||
uid://dl2kg1qu0ymi7
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_resource type="ShaderMaterial" format=3 uid="uid://1shsptwu7rdt"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://me4246fesuy5" path="res://Resources/Shaders/Objects/Trees/tree.gdshader" id="1_bv5u3"]
|
||||
[ext_resource type="Shader" uid="uid://me4246fesuy5" path="res://Resources/Shaders/Objects/Trees/tree_01_code.gdshader" id="1_bv5u3"]
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_pv2vp"]
|
||||
|
||||
|
||||
@@ -782,72 +782,6 @@ texture = ExtResource("8_8d5h8")
|
||||
1:1/animation_frame_6/duration = 0.3
|
||||
1:1/animation_frame_7/duration = 0.3
|
||||
1:1/0 = 0
|
||||
0:3/animation_columns = 8
|
||||
0:3/animation_separation = Vector2i(2, 0)
|
||||
0:3/animation_frame_0/duration = 0.3
|
||||
0:3/animation_frame_1/duration = 0.3
|
||||
0:3/animation_frame_2/duration = 0.3
|
||||
0:3/animation_frame_3/duration = 0.3
|
||||
0:3/animation_frame_4/duration = 0.3
|
||||
0:3/animation_frame_5/duration = 0.3
|
||||
0:3/animation_frame_6/duration = 0.3
|
||||
0:3/animation_frame_7/duration = 0.3
|
||||
0:3/0 = 0
|
||||
0:4/animation_columns = 8
|
||||
0:4/animation_separation = Vector2i(2, 0)
|
||||
0:4/animation_frame_0/duration = 0.3
|
||||
0:4/animation_frame_1/duration = 0.3
|
||||
0:4/animation_frame_2/duration = 0.3
|
||||
0:4/animation_frame_3/duration = 0.3
|
||||
0:4/animation_frame_4/duration = 0.3
|
||||
0:4/animation_frame_5/duration = 0.3
|
||||
0:4/animation_frame_6/duration = 0.3
|
||||
0:4/animation_frame_7/duration = 0.3
|
||||
0:4/0 = 0
|
||||
1:4/animation_columns = 8
|
||||
1:4/animation_separation = Vector2i(2, 0)
|
||||
1:4/animation_frame_0/duration = 0.3
|
||||
1:4/animation_frame_1/duration = 0.3
|
||||
1:4/animation_frame_2/duration = 0.3
|
||||
1:4/animation_frame_3/duration = 0.3
|
||||
1:4/animation_frame_4/duration = 0.3
|
||||
1:4/animation_frame_5/duration = 0.3
|
||||
1:4/animation_frame_6/duration = 0.3
|
||||
1:4/animation_frame_7/duration = 0.3
|
||||
1:4/0 = 0
|
||||
1:3/animation_columns = 8
|
||||
1:3/animation_separation = Vector2i(2, 0)
|
||||
1:3/animation_frame_0/duration = 0.3
|
||||
1:3/animation_frame_1/duration = 0.3
|
||||
1:3/animation_frame_2/duration = 0.3
|
||||
1:3/animation_frame_3/duration = 0.3
|
||||
1:3/animation_frame_4/duration = 0.3
|
||||
1:3/animation_frame_5/duration = 0.3
|
||||
1:3/animation_frame_6/duration = 0.3
|
||||
1:3/animation_frame_7/duration = 0.3
|
||||
1:3/0 = 0
|
||||
2:3/animation_columns = 8
|
||||
2:3/animation_separation = Vector2i(2, 0)
|
||||
2:3/animation_frame_0/duration = 0.3
|
||||
2:3/animation_frame_1/duration = 0.3
|
||||
2:3/animation_frame_2/duration = 0.3
|
||||
2:3/animation_frame_3/duration = 0.3
|
||||
2:3/animation_frame_4/duration = 0.3
|
||||
2:3/animation_frame_5/duration = 0.3
|
||||
2:3/animation_frame_6/duration = 0.3
|
||||
2:3/animation_frame_7/duration = 0.3
|
||||
2:3/0 = 0
|
||||
2:4/animation_columns = 8
|
||||
2:4/animation_separation = Vector2i(2, 0)
|
||||
2:4/animation_frame_0/duration = 0.3
|
||||
2:4/animation_frame_1/duration = 0.3
|
||||
2:4/animation_frame_2/duration = 0.3
|
||||
2:4/animation_frame_3/duration = 0.3
|
||||
2:4/animation_frame_4/duration = 0.3
|
||||
2:4/animation_frame_5/duration = 0.3
|
||||
2:4/animation_frame_6/duration = 0.3
|
||||
2:4/animation_frame_7/duration = 0.3
|
||||
2:4/0 = 0
|
||||
|
||||
[resource]
|
||||
physics_layer_0/collision_layer = 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://clqfyxjtn67m"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c5pt6iroi01si" path="res://Entities/Characters/Animals/Chicken/Scripts/npc_chicken.gd" id="1_etrql"]
|
||||
[ext_resource type="Script" uid="uid://c5pt6iroi01si" path="res://Scripts/Characters/Chicken/npc_chicken.gd" id="1_etrql"]
|
||||
[ext_resource type="Texture2D" uid="uid://d4lf74neoqf4p" path="res://Assets/Spritesheets/Animals/Chickens/Chicken_01.png" id="1_hjr72"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_etrql"]
|
||||
135
Scenes/Characters/Player/player.tscn
Normal file
135
Scenes/Characters/Player/player.tscn
Normal file
@@ -0,0 +1,135 @@
|
||||
[gd_scene format=3 uid="uid://6athlweutl2g"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://uyl0s1e67x6s" path="res://Scenes/Characters/Player/sprite.tscn" id="1_27cb7"]
|
||||
[ext_resource type="PackedScene" uid="uid://c2ydbmmvnfca6" path="res://Scenes/Characters/Player/state_machine.tscn" id="1_lyjr2"]
|
||||
[ext_resource type="Script" uid="uid://dacvayqstkvws" path="res://Scripts/Characters/Player/player.gd" id="1_qqvsf"]
|
||||
[ext_resource type="Script" uid="uid://b0l02v61if6k8" path="res://Scripts/Components/facing_direction_component.gd" id="1_siygm"]
|
||||
[ext_resource type="Script" uid="uid://dwclkwbig1uii" path="res://Scripts/Characters/Player/movement_component.gd" id="4_apx8m"]
|
||||
[ext_resource type="Script" uid="uid://dkmc1t43gomdb" path="res://Scripts/Characters/Player/States/idle_state.gd" id="4_dxcao"]
|
||||
[ext_resource type="Script" uid="uid://ckn7gmtc23b8l" path="res://Scripts/Characters/Player/States/using_item_a_state.gd" id="5_1mdwi"]
|
||||
[ext_resource type="Script" uid="uid://bwmmah30t3m0u" path="res://Scripts/Characters/Player/States/walking_state.gd" id="5_cscr0"]
|
||||
[ext_resource type="Script" uid="uid://brlisuoocwehh" path="res://Scripts/Characters/Player/interact_scanner.gd" id="6_fu1fx"]
|
||||
[ext_resource type="Script" uid="uid://bnp1vowmu15lg" path="res://Scripts/Characters/Player/States/drawing_bow_state.gd" id="7_cscr0"]
|
||||
[ext_resource type="Script" uid="uid://cd2ewadcm8oi5" path="res://Scripts/Characters/Player/States/firing_arrow_state.gd" id="8_plevq"]
|
||||
[ext_resource type="Script" uid="uid://bx1a35al4yiej" path="res://Scripts/Characters/Player/States/sitting_state.gd" id="9_sdxbo"]
|
||||
[ext_resource type="Script" uid="uid://bnontuqj3cnom" path="res://Scripts/Characters/Player/States/cutscene_state.gd" id="10_p06rw"]
|
||||
[ext_resource type="Script" uid="uid://wfdtd3xlgrvm" path="res://Scripts/Characters/Player/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="MovementComponent" type="Node" parent="Components" unique_id=1773880772 node_paths=PackedStringArray("body")]
|
||||
script = ExtResource("4_apx8m")
|
||||
body = NodePath("../..")
|
||||
|
||||
[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("movement_component", "state_machine")]
|
||||
script = ExtResource("4_dxcao")
|
||||
movement_component = NodePath("../../../Components/MovementComponent")
|
||||
state_machine = NodePath("../..")
|
||||
|
||||
[node name="Walking State" type="Node" parent="State Machine/States" unique_id=1661048365 node_paths=PackedStringArray("movement_component", "direction_component", "body", "state_machine")]
|
||||
script = ExtResource("5_cscr0")
|
||||
movement_component = NodePath("../../../Components/MovementComponent")
|
||||
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("movement_componenent", "body", "state_machine")]
|
||||
script = ExtResource("7_cscr0")
|
||||
movement_componenent = NodePath("../../../Components/MovementComponent")
|
||||
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"]
|
||||
1756
Scenes/Characters/Player/sprite.tscn
Normal file
1756
Scenes/Characters/Player/sprite.tscn
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://c2ydbmmvnfca6"]
|
||||
|
||||
[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://Scripts/Characters/Player/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")
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://303hbhqetdhy"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dvgd5ejerauqm" path="res://Entities/Map Objects/Entity Spawners/arrow_spawner.gd" id="1_dsltu"]
|
||||
[ext_resource type="Script" uid="uid://dvgd5ejerauqm" path="res://Scripts/Entity Spawners/arrow_spawner.gd" id="1_dsltu"]
|
||||
|
||||
[node name="Arrow Spawner" type="Node" unique_id=627092886 node_paths=PackedStringArray("arrow_parent")]
|
||||
script = ExtResource("1_dsltu")
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://divmfeqf10ri1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c5yjcjk51l4bd" path="res://Maps/Connectors/Scripts/bench_interaction_connector.gd" id="1_34r4h"]
|
||||
[ext_resource type="Script" uid="uid://c5yjcjk51l4bd" path="res://Scripts/Maps/Connectors/bench_interaction_connector.gd" id="1_34r4h"]
|
||||
|
||||
[node name="Bench Interaction Connector" type="Node" unique_id=541204437]
|
||||
script = ExtResource("1_34r4h")
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://dl2jpjtbiju34"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dw76slp457s1v" path="res://Maps/Connectors/Scripts/chest_interaction_connector.gd" id="1_aitih"]
|
||||
[ext_resource type="Script" uid="uid://dw76slp457s1v" path="res://Scripts/Maps/Connectors/chest_interaction_connector.gd" id="1_aitih"]
|
||||
|
||||
[node name="Chest Interaction Connector" type="Node" unique_id=625804018]
|
||||
script = ExtResource("1_aitih")
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://b03s7fw8bxdxs"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d3hhbegfxdnqq" path="res://Maps/Connectors/Scripts/interactive_loading_zone_connector.gd" id="1_2sjeq"]
|
||||
[ext_resource type="Script" uid="uid://d3hhbegfxdnqq" path="res://Scripts/Maps/Connectors/interactive_loading_zone_connector.gd" id="1_2sjeq"]
|
||||
|
||||
[node name="Interactive Loading Zone Connector" type="Node" unique_id=833475826]
|
||||
script = ExtResource("1_2sjeq")
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://did853bh5xeic"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dkcsftcdqtmg" path="res://Maps/Connectors/Scripts/spawn_marker_connector.gd" id="1_kb3a7"]
|
||||
[ext_resource type="Script" uid="uid://dkcsftcdqtmg" path="res://Scripts/Maps/Connectors/spawn_marker_connector.gd" id="1_kb3a7"]
|
||||
|
||||
[node name="Spawn Marker Connector" type="Node" unique_id=807187299 node_paths=PackedStringArray("player", "markers")]
|
||||
script = ExtResource("1_kb3a7")
|
||||
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
@@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bqvnkdyhfa1yq"
|
||||
path="res://.godot/imported/Home_01_Overlay_01.png-26fde7ad2be3b256e0075725eafecc1c.ctex"
|
||||
path="res://.godot/imported/Home_01_Overlay_01.png-5522c04136136f6c0c2aaf9e86a5116f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Maps/Forest Dungeon Entrance/Interiors/Home_01_Overlay_01.png"
|
||||
dest_files=["res://.godot/imported/Home_01_Overlay_01.png-26fde7ad2be3b256e0075725eafecc1c.ctex"]
|
||||
source_file="res://Scenes/Maps/Forest Dungeon Entrance/Interiors/Home_01_Overlay_01.png"
|
||||
dest_files=["res://.godot/imported/Home_01_Overlay_01.png-5522c04136136f6c0c2aaf9e86a5116f.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
[gd_scene format=4 uid="uid://laxewy7irxno"]
|
||||
|
||||
[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://Scripts/Maps/Connectors/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="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://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://b60nr4wfvijpf" path="res://Entities/Map Objects/Dialogue/dialogue_trigger.tscn" id="5_msu6a"]
|
||||
[ext_resource type="Script" uid="uid://dkcsftcdqtmg" path="res://Scripts/Maps/Connectors/spawn_marker_connector.gd" id="2_16uj4"]
|
||||
[ext_resource type="PackedScene" uid="uid://ca75b65eh7vv8" path="res://Scenes/Objects/Loading Zone/collision_loading_zone.tscn" id="2_fdso5"]
|
||||
[ext_resource type="PackedScene" uid="uid://6athlweutl2g" path="res://Scenes/Characters/Player/player.tscn" id="2_lky26"]
|
||||
[ext_resource type="PackedScene" uid="uid://bbules4o3xayc" path="res://Scenes/Objects/Loading Zone/loading_zone_transporter.tscn" id="3_7kg22"]
|
||||
[ext_resource type="PackedScene" uid="uid://dl2jpjtbiju34" path="res://Scenes/Maps/Connectors/chest_interaction_connector.tscn" id="3_ec540"]
|
||||
[ext_resource type="PackedScene" uid="uid://b7u4hlvuqiefn" path="res://Scenes/Objects/Chests/Item Chests/item_chest_02 (Metal).tscn" id="4_a58cd"]
|
||||
[ext_resource type="PackedScene" uid="uid://b60nr4wfvijpf" path="res://Scenes/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="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="PackedScene" uid="uid://c65cfm3t0obwq" path="res://Entities/Characters/Player/player_map_entity.tscn" id="11_s4nwa"]
|
||||
[ext_resource type="Texture2D" uid="uid://bqvnkdyhfa1yq" path="res://Scenes/Maps/Forest Dungeon Entrance/Interiors/Home_01_Overlay_01.png" id="11_6xfm6"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_7kg22"]
|
||||
size = Vector2(32, 8)
|
||||
@@ -79,12 +79,13 @@ y_sort_enabled = true
|
||||
[node name="Collision Loading Zone Connector" type="Node" parent="Connectors" unique_id=483597596]
|
||||
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")
|
||||
player_entity = NodePath("../../Player Map Entity")
|
||||
player = NodePath("../../Player")
|
||||
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]
|
||||
y_sort_enabled = true
|
||||
@@ -114,17 +115,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")]
|
||||
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")]
|
||||
collision_mask = 16
|
||||
[node name="Collision Loading Zone" parent="Loading Zones" unique_id=1043800735 node_paths=PackedStringArray("loading_zone_transporter") instance=ExtResource("2_fdso5")]
|
||||
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)
|
||||
shape = SubResource("RectangleShape2D_7kg22")
|
||||
|
||||
[node name="Loading Zone Transporter" parent="Entrances/On Collision Trigger" unique_id=1690817663 instance=ExtResource("3_7kg22")]
|
||||
destination_map_id = 2
|
||||
[node name="Loading Zone Transporter" parent="Loading Zones/Collision Loading Zone" unique_id=1690817663 instance=ExtResource("3_7kg22")]
|
||||
destination_marker_name = "Home 01 Entrance"
|
||||
|
||||
[node name="Spawn Markers" type="Node2D" parent="." unique_id=1756787676]
|
||||
@@ -153,17 +153,15 @@ position = Vector2(-0.5, -4)
|
||||
shape = SubResource("RectangleShape2D_6xfm6")
|
||||
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]
|
||||
position = Vector2(127, 110)
|
||||
zoom = Vector2(3, 3)
|
||||
|
||||
[node name="Player" parent="." unique_id=1502234578 instance=ExtResource("2_lky26")]
|
||||
position = Vector2(108, 139)
|
||||
|
||||
[node name="Overlay" type="Sprite2D" parent="." unique_id=455840170]
|
||||
position = Vector2(124, 217)
|
||||
scale = Vector2(0.25, 0.25)
|
||||
texture = ExtResource("11_6xfm6")
|
||||
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]
|
||||
@@ -1,34 +1,31 @@
|
||||
[gd_scene format=4 uid="uid://b07m0k40dh042"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dl2jpjtbiju34" path="res://Maps/Connectors/chest_interaction_connector.tscn" id="1_jtncl"]
|
||||
[ext_resource type="PackedScene" uid="uid://dl2jpjtbiju34" path="res://Scenes/Maps/Connectors/chest_interaction_connector.tscn" id="1_jtncl"]
|
||||
[ext_resource type="TileSet" uid="uid://cds2lapr3niap" path="res://Resources/Tilesets/forest_exterior.tres" id="1_qup1q"]
|
||||
[ext_resource type="PackedScene" uid="uid://b8m08wroe1qu2" path="res://Entities/Map Objects/Mechanisms/arrow_target.tscn" id="2_8tx2j"]
|
||||
[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="Script" uid="uid://kfupww4frb1r" path="res://Maps/Connectors/Scripts/camera_limit_connector.gd" id="3_ycf72"]
|
||||
[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://b8m08wroe1qu2" path="res://Scenes/Objects/Mechanisms/arrow_target.tscn" id="2_8tx2j"]
|
||||
[ext_resource type="PackedScene" uid="uid://303hbhqetdhy" path="res://Scenes/Maps/Connectors/arrow_spawner.tscn" id="2_jtncl"]
|
||||
[ext_resource type="PackedScene" uid="uid://divmfeqf10ri1" path="res://Scenes/Maps/Connectors/bench_interaction_connector.tscn" id="3_x6da4"]
|
||||
[ext_resource type="Script" uid="uid://kfupww4frb1r" path="res://Scripts/Maps/Connectors/camera_limit_connector.gd" id="3_ycf72"]
|
||||
[ext_resource type="PackedScene" uid="uid://6athlweutl2g" path="res://Scenes/Characters/Player/player.tscn" id="4_4igim"]
|
||||
[ext_resource type="PackedScene" uid="uid://b03s7fw8bxdxs" path="res://Scenes/Maps/Connectors/interactive_loading_zone_connector.tscn" id="4_4lnhp"]
|
||||
[ext_resource type="PackedScene" uid="uid://byp273amg5ji8" path="res://Scenes/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="PackedScene" uid="uid://did853bh5xeic" path="res://Maps/Connectors/spawn_marker_connector.tscn" id="5_lphfo"]
|
||||
[ext_resource type="PackedScene" uid="uid://w4mh31se58f4" path="res://Persistence/Connectors/chest_persistence_connector.tscn" id="6_l5trr"]
|
||||
[ext_resource type="PackedScene" uid="uid://c5ymu08jotbfp" path="res://Persistence/Connectors/gate_persistence_connector.tscn" id="7_0w1de"]
|
||||
[ext_resource type="PackedScene" uid="uid://be6xfndyj4ckx" path="res://Entities/Map Objects/Trees/tree_02.tscn" id="7_ycf72"]
|
||||
[ext_resource type="PackedScene" uid="uid://cc3qat6un2323" path="res://Entities/Map Objects/Trees/tree_01.tscn" id="8_yab5j"]
|
||||
[ext_resource type="PackedScene" uid="uid://bcx1d8kvp7o0h" path="res://Entities/Map Objects/Trees/tree_03.tscn" id="9_lwurn"]
|
||||
[ext_resource type="PackedScene" uid="uid://da4qqruhldc6b" path="res://Entities/Map Objects/Gates/Spike Gate/spike_gate.tscn" id="11_bscbg"]
|
||||
[ext_resource type="PackedScene" uid="uid://bjufxlsrlcuas" path="res://Entities/Buildings/home_01.tscn" id="11_pbyx1"]
|
||||
[ext_resource type="PackedScene" uid="uid://clqfyxjtn67m" path="res://Entities/Characters/Animals/Chicken/npc_chicken.tscn" id="13_gtagr"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5t4h63xhuods" path="res://Entities/Map Objects/Mechanisms/pressure_plate.tscn" id="13_j80dg"]
|
||||
[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://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://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://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://c65cfm3t0obwq" path="res://Entities/Characters/Player/player_map_entity.tscn" id="27_0w1de"]
|
||||
[ext_resource type="Script" uid="uid://dtwxia7rlu5xt" path="res://Scripts/Utility/child_node_appender.gd" id="28_mf3dv"]
|
||||
[ext_resource type="PackedScene" uid="uid://did853bh5xeic" path="res://Scenes/Maps/Connectors/spawn_marker_connector.tscn" id="5_lphfo"]
|
||||
[ext_resource type="PackedScene" uid="uid://be6xfndyj4ckx" path="res://Scenes/Objects/Trees/tree_02.tscn" id="7_ycf72"]
|
||||
[ext_resource type="PackedScene" uid="uid://cc3qat6un2323" path="res://Scenes/Objects/Trees/tree_01.tscn" id="8_yab5j"]
|
||||
[ext_resource type="PackedScene" uid="uid://bcx1d8kvp7o0h" path="res://Scenes/Objects/Trees/tree_03.tscn" id="9_lwurn"]
|
||||
[ext_resource type="PackedScene" uid="uid://da4qqruhldc6b" path="res://Scenes/Objects/Gates/Spike Gate/spike_gate.tscn" id="11_bscbg"]
|
||||
[ext_resource type="PackedScene" uid="uid://bjufxlsrlcuas" path="res://Scenes/Objects/Buildings/home_01.tscn" id="11_pbyx1"]
|
||||
[ext_resource type="PackedScene" uid="uid://clqfyxjtn67m" path="res://Scenes/Characters/Chicken/npc_chicken.tscn" id="13_gtagr"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5t4h63xhuods" path="res://Scenes/Objects/Mechanisms/pressure_plate.tscn" id="13_j80dg"]
|
||||
[ext_resource type="PackedScene" uid="uid://23tpba4r6ucg" path="res://Scenes/Objects/Decorative/Outdoor/wooden_bench.tscn" id="14_kgsic"]
|
||||
[ext_resource type="PackedScene" uid="uid://dwbg6wca6yl5j" path="res://Scenes/Objects/Decorative/Signs/wooden_sign_01.tscn" id="16_dc5v0"]
|
||||
[ext_resource type="PackedScene" uid="uid://c2p8fteeqyikf" path="res://Scenes/Characters/Frog/npc_frog.tscn" id="18_tfw55"]
|
||||
[ext_resource type="PackedScene" uid="uid://bbules4o3xayc" path="res://Scenes/Objects/Loading Zone/loading_zone_transporter.tscn" id="19_c5vrl"]
|
||||
[ext_resource type="PackedScene" uid="uid://coaf2ndwb6h61" path="res://Scenes/Objects/Decorative/Signs/wooden_sign_02.tscn" id="19_jtncl"]
|
||||
[ext_resource type="PackedScene" uid="uid://cla2d3gii8qda" path="res://Scenes/Objects/Loading Zone/interactive_loading_zone.tscn" id="20_c5vrl"]
|
||||
[ext_resource type="PackedScene" uid="uid://b60nr4wfvijpf" path="res://Scenes/Objects/Dialogue/dialogue_trigger.tscn" id="20_x6da4"]
|
||||
[ext_resource type="PackedScene" uid="uid://c7rjjlamkqhnw" path="res://Scenes/Debug/under_construction_block.tscn" id="26_4lnhp"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_lwurn"]
|
||||
size = Vector2(768, 494)
|
||||
@@ -66,33 +63,30 @@ size = Vector2(10, 7)
|
||||
[node name="Map 01" type="Node2D" unique_id=411453136]
|
||||
y_sort_enabled = true
|
||||
|
||||
[node name="Map Connectors" type="Node" parent="." unique_id=1365901208]
|
||||
[node name="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="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="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="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="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")]
|
||||
player_entity = NodePath("../../Player Map Entity")
|
||||
[node name="Spawn Marker Connector" parent="Connectors" unique_id=807187299 node_paths=PackedStringArray("player", "markers") instance=ExtResource("5_lphfo")]
|
||||
player = NodePath("../../Player")
|
||||
markers = NodePath("../../Spawn Markers")
|
||||
|
||||
[node name="Persistence Connectors" type="Node" parent="." unique_id=1245900932]
|
||||
|
||||
[node name="Chest Persistence Connector" parent="Persistence Connectors" unique_id=281805027 instance=ExtResource("6_l5trr")]
|
||||
chests = Array[NodePath]([NodePath("../../Objects/Chests/Item Chest 01 - 1"), NodePath("../../Objects/Chests/Item Chest 01 - 2"), NodePath("../../Objects/Chests/Item Chest 01 - 3")])
|
||||
|
||||
[node name="GatePersistenceConnector" parent="Persistence Connectors" unique_id=1082904286 instance=ExtResource("7_0w1de")]
|
||||
gates = Array[NodePath]([NodePath("../../Objects/Spike Gate"), NodePath("../../Objects/Spike Gate2")])
|
||||
|
||||
[node name="Camera Limit Connector" type="Area2D" parent="." unique_id=1290795384 node_paths=PackedStringArray("camera_to_limit")]
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
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]
|
||||
position = Vector2(384, 408)
|
||||
@@ -337,7 +331,7 @@ position = Vector2(-1, -0.5)
|
||||
shape = SubResource("RectangleShape2D_xrhbk")
|
||||
|
||||
[node name="Loading Zone Transporter" parent="Loading Zones/Shop Door" unique_id=1690817663 instance=ExtResource("19_c5vrl")]
|
||||
destination_map_id = 3
|
||||
destination_map_id = 1
|
||||
destination_marker_name = "Entrance"
|
||||
|
||||
[node name="Spawn Markers" type="Node2D" parent="." unique_id=1420428815]
|
||||
@@ -345,13 +339,11 @@ destination_marker_name = "Entrance"
|
||||
[node name="Home 01 Entrance" type="Marker2D" parent="Spawn Markers" unique_id=1662896687]
|
||||
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(89, 450)
|
||||
|
||||
[node name="Child Node Appender" type="Node" parent="Player Map Entity" unique_id=1527392334]
|
||||
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)
|
||||
position_smoothing_enabled = true
|
||||
|
||||
@@ -393,6 +385,7 @@ position = Vector2(760, 312)
|
||||
[node name="Under Construction Block12" parent="Debug" unique_id=1005752992 instance=ExtResource("26_4lnhp")]
|
||||
position = Vector2(760, 328)
|
||||
|
||||
[connection signal="SitOnBenchTriggered" from="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 Gate2" method="OpenGate"]
|
||||
[connection signal="PressurePlateTripped" from="Objects/PressurePlate" to="Objects/Spike Gate" method="OpenGate"]
|
||||
8
Scenes/Maps/base_map.tscn
Normal file
8
Scenes/Maps/base_map.tscn
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_scene format=3 uid="uid://cb7es4u3xy5hw"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://da5dg36wink7x" path="res://Scripts/Maps/base_map.gd" id="1_71ugn"]
|
||||
|
||||
[node name="BaseMap" type="Node2D" unique_id=94057185]
|
||||
script = ExtResource("1_71ugn")
|
||||
|
||||
[node name="Connectors" type="Node" parent="." unique_id=226687733]
|
||||
@@ -1,16 +1,16 @@
|
||||
[gd_scene format=4 uid="uid://bwt0ijoq4qmhn"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://btg630l3xo16w" path="res://Maps/Common/Scripts/shop.gd" id="1_83xsp"]
|
||||
[ext_resource type="Script" uid="uid://btg630l3xo16w" path="res://Scripts/Maps/shop.gd" id="1_83xsp"]
|
||||
[ext_resource type="TileSet" uid="uid://df0lg5vkqwbbt" path="res://Resources/Tilesets/home_interior.tres" id="2_kt7c3"]
|
||||
[ext_resource type="Script" uid="uid://cpr710p4wdgx" path="res://Maps/Connectors/Scripts/shop_item_label_connector.gd" id="2_r8s0p"]
|
||||
[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://cpr710p4wdgx" path="res://Scripts/Maps/Connectors/shop_item_label_connector.gd" id="2_r8s0p"]
|
||||
[ext_resource type="PackedScene" uid="uid://ddgeo3vwebqeg" path="res://Scenes/Objects/shop_item.tscn" id="3_7ftpj"]
|
||||
[ext_resource type="Script" uid="uid://dkcsftcdqtmg" path="res://Scripts/Maps/Connectors/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="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://Scenes/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="PackedScene" uid="uid://bbules4o3xayc" path="res://Entities/Map Objects/Loading Zone/entrance_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="PackedScene" uid="uid://bbules4o3xayc" path="res://Scenes/Objects/Loading Zone/loading_zone_transporter.tscn" id="6_t8w5b"]
|
||||
[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://Scenes/Objects/Loading Zone/collision_loading_zone.tscn" id="9_kp1fr"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fdj0q"]
|
||||
atlas = ExtResource("4_r8s0p")
|
||||
@@ -42,8 +42,9 @@ script = ExtResource("1_83xsp")
|
||||
[node name="Shop Item Notification Connector" type="Node" parent="." unique_id=1088308326]
|
||||
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")
|
||||
player = NodePath("../Player")
|
||||
markers = NodePath("../Spawn Markers")
|
||||
|
||||
[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="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)
|
||||
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"
|
||||
|
||||
[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]
|
||||
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)
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="." unique_id=1684491254]
|
||||
@@ -144,4 +146,5 @@ position = Vector2(224, 232)
|
||||
scale = Vector2(2, 1)
|
||||
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,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://cd3iyspcdg8m"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://0fsmtp1umvmp" path="res://Entities/Map Objects/Chests/Scripts/Bases/chest_base.gd" id="1_6u2sl"]
|
||||
[ext_resource type="Script" uid="uid://0fsmtp1umvmp" path="res://Scripts/Objects/Chests/Bases/chest_base.gd" id="1_6u2sl"]
|
||||
|
||||
[node name="Base Chest" type="StaticBody2D" unique_id=975880832 groups=["Treasure Chest Group"]]
|
||||
y_sort_enabled = true
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://cncm0c4dmosgs"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dbuc0f87m24xf" path="res://Entities/Map Objects/Chests/Scripts/Bases/item_chest.gd" id="1_mkt0u"]
|
||||
[ext_resource type="Script" uid="uid://dbuc0f87m24xf" path="res://Scripts/Objects/Chests/Bases/item_chest.gd" id="1_mkt0u"]
|
||||
|
||||
[node name="Base Item Chest" type="StaticBody2D" unique_id=991903258]
|
||||
script = ExtResource("1_mkt0u")
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene format=3 uid="uid://byp273amg5ji8"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bvq13h8uyx572" path="res://Entities/Map Objects/Chests/Scripts/item_chest_01.gd" id="1_lp0kr"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3rqn611axsfk" path="res://Entities/Map Objects/Chests/Sprites/chest01_sprite.tscn" id="2_iwcc8"]
|
||||
[ext_resource type="Script" uid="uid://bvq13h8uyx572" path="res://Scripts/Objects/Chests/item_chest_01.gd" id="1_lp0kr"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3rqn611axsfk" path="res://Scenes/Animated Sprites/chest01_sprite.tscn" id="2_iwcc8"]
|
||||
[ext_resource type="Texture2D" uid="uid://crf23tc55dxu" path="res://Assets/Spritesheets/Treasure Chests/Chest_Anim.png" id="3_iwcc8"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_y3ooa"]
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene format=3 uid="uid://b7u4hlvuqiefn"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bvq13h8uyx572" path="res://Entities/Map Objects/Chests/Scripts/item_chest_01.gd" id="1_77oue"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3rqn611axsfk" path="res://Entities/Map Objects/Chests/Sprites/chest01_sprite.tscn" id="2_jpeii"]
|
||||
[ext_resource type="Script" uid="uid://bvq13h8uyx572" path="res://Scripts/Objects/Chests/item_chest_01.gd" id="1_77oue"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3rqn611axsfk" path="res://Scenes/Animated Sprites/chest01_sprite.tscn" id="2_jpeii"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcbk854sc3uud" path="res://Assets/Spritesheets/Home Decor/Metal_Chest_Anim.png" id="3_jpeii"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_y3ooa"]
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene format=3 uid="uid://23tpba4r6ucg"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://nocnsf1xr3ap" path="res://Assets/Spritesheets/Outdoor Decor/Benches.png" id="1_jlu4v"]
|
||||
[ext_resource type="Script" uid="uid://c6n652dy18xbm" path="res://Entities/Map Objects/Decorative/Outdoor/Scripts/wooden_bench.gd" id="1_nv27i"]
|
||||
[ext_resource type="Script" uid="uid://c6n652dy18xbm" path="res://Scripts/Objects/Decorative/Outdoor/wooden_bench.gd" id="1_nv27i"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_nv27i"]
|
||||
size = Vector2(30, 11)
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://b60nr4wfvijpf"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cfsfx0sahh5t7" path="res://Entities/Map Objects/Dialogue/Scripts/dialogue_trigger.gd" id="1_dyjvr"]
|
||||
[ext_resource type="Script" uid="uid://cfsfx0sahh5t7" path="res://Scripts/Objects/Dialogue/dialogue_trigger.gd" id="1_dyjvr"]
|
||||
|
||||
[node name="Dialogue Trigger" type="Area2D" unique_id=189867444 groups=["Dialog Trigger Group"]]
|
||||
collision_layer = 2
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene format=3 uid="uid://da4qqruhldc6b"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://1kmd0qww3368" path="res://Assets/Spritesheets/Outdoor Objects/Spike_Gate_anim.png" id="1_5ttkm"]
|
||||
[ext_resource type="Script" uid="uid://8erg53skow38" path="res://Entities/Map Objects/Gates/Spike Gate/Scripts/spike_gate.gd" id="1_kye8r"]
|
||||
[ext_resource type="Script" uid="uid://8erg53skow38" path="res://Scripts/Objects/Gates/Spike Gate/spike_gate.gd" id="1_kye8r"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_5ttkm"]
|
||||
size = Vector2(29, 4)
|
||||
@@ -395,6 +395,6 @@ shape = SubResource("RectangleShape2D_5ttkm")
|
||||
y_sort_enabled = true
|
||||
position = Vector2(0, 15)
|
||||
sprite_frames = SubResource("SpriteFrames_pki7h")
|
||||
animation = &"open"
|
||||
animation = &"closed"
|
||||
autoplay = "closed"
|
||||
offset = Vector2(0, -15)
|
||||
9
Scenes/Objects/Loading Zone/collision_loading_zone.tscn
Normal file
9
Scenes/Objects/Loading Zone/collision_loading_zone.tscn
Normal file
@@ -0,0 +1,9 @@
|
||||
[gd_scene format=3 uid="uid://ca75b65eh7vv8"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://g0r5waf50gp5" path="res://Scripts/Objects/Loading Zone/collision_loading_zone.gd" id="1_pb5hg"]
|
||||
|
||||
[node name="Collision Loading Zone" type="Area2D" unique_id=1043800735 groups=["Collision Loading Zone Group"]]
|
||||
collision_layer = 0
|
||||
script = ExtResource("1_pb5hg")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://cla2d3gii8qda"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://csspyy43sohfl" path="res://Entities/Map Objects/Loading Zone/Scripts/interactive_loading_zone.gd" id="1_7bdbd"]
|
||||
[ext_resource type="Script" uid="uid://dla7fe0nsbdvv" path="res://Scripts/Objects/Loading Zone/interactive_loading_zone.gd" id="1_7bdbd"]
|
||||
|
||||
[node name="Interactive Loading Zone" type="Area2D" unique_id=1427014981 groups=["Interactive Loading Zone Group"]]
|
||||
collision_layer = 2
|
||||
@@ -0,0 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://bbules4o3xayc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cshtpe5n2iubh" path="res://Scripts/Objects/Loading Zone/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,7 +1,7 @@
|
||||
[gd_scene format=3 uid="uid://b8m08wroe1qu2"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://k2htcxstdj5v" path="res://Assets/Spritesheets/Outdoor Objects/Arrow Target-Sheet.png" id="1_b0s8y"]
|
||||
[ext_resource type="Script" uid="uid://6jls1eokv2to" path="res://Entities/Map Objects/Mechanisms/Scripts/arrow_target.gd" id="1_uhut5"]
|
||||
[ext_resource type="Script" uid="uid://6jls1eokv2to" path="res://Scripts/Objects/arrow_target.gd" id="1_uhut5"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_uhut5"]
|
||||
radius = 8.0
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://b5t4h63xhuods"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cxt7ht66jiac8" path="res://Entities/Map Objects/Mechanisms/Scripts/pressure_plate.gd" id="1_po2h8"]
|
||||
[ext_resource type="Script" uid="uid://cxt7ht66jiac8" path="res://Scripts/Objects/Mechanisms/pressure_plate.gd" id="1_po2h8"]
|
||||
[ext_resource type="Texture2D" uid="uid://dhtolttw5h33" path="res://Assets/Spritesheets/Mechanisms/Pressure Plate.png" id="1_ulio5"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ulio5"]
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://d24gcv3umq60k"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ba0nsd76er3xa" path="res://Entities/Characters/Utility/Occlusion/Scripts/occlusion_culler.gd" id="1_4550i"]
|
||||
[ext_resource type="Script" uid="uid://d4g6s63d0bh4o" path="res://Scripts/Objects/Occlusion/occlusion_culler.gd" id="1_4550i"]
|
||||
|
||||
[node name="Occlusion Culler" type="Area2D" unique_id=1362480066]
|
||||
collision_layer = 0
|
||||
36
Scenes/Objects/Trees/tree_01.tscn
Normal file
36
Scenes/Objects/Trees/tree_01.tscn
Normal file
@@ -0,0 +1,36 @@
|
||||
[gd_scene format=3 uid="uid://cc3qat6un2323"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://xygpf7c886pj" path="res://Assets/Spritesheets/Trees/Medium_Oak_Tree.png" id="1_i2ia5"]
|
||||
[ext_resource type="PackedScene" uid="uid://d24gcv3umq60k" path="res://Scenes/Objects/Occlusion/occlusion_culler.tscn" id="1_jbed0"]
|
||||
[ext_resource type="Material" uid="uid://1shsptwu7rdt" path="res://Resources/Materials/tree_sway.tres" id="2_o0u4i"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_jbed0"]
|
||||
radius = 12.0
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5otsd"]
|
||||
atlas = ExtResource("1_i2ia5")
|
||||
region = Rect2(32, 0, 32, 48)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0srx6"]
|
||||
size = Vector2(6, 3)
|
||||
|
||||
[node name="Tree 01" type="StaticBody2D" unique_id=2046930104]
|
||||
y_sort_enabled = true
|
||||
|
||||
[node name="Occlusion Culler" parent="." unique_id=1362480066 node_paths=PackedStringArray("nodes_to_occlude") instance=ExtResource("1_jbed0")]
|
||||
nodes_to_occlude = [NodePath("../Sprite2D")]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Occlusion Culler" unique_id=731605527]
|
||||
position = Vector2(0, -10)
|
||||
shape = SubResource("CircleShape2D_jbed0")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1420512565]
|
||||
y_sort_enabled = true
|
||||
material = ExtResource("2_o0u4i")
|
||||
position = Vector2(0, 8)
|
||||
texture = SubResource("AtlasTexture_5otsd")
|
||||
offset = Vector2(0, -8)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=870152657]
|
||||
position = Vector2(0, 6.5)
|
||||
shape = SubResource("RectangleShape2D_0srx6")
|
||||
@@ -1,83 +1,19 @@
|
||||
[gd_scene format=3 uid="uid://be6xfndyj4ckx"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://d24gcv3umq60k" path="res://Entities/Characters/Utility/Occlusion/occlusion_culler.tscn" id="1_ijlg6"]
|
||||
[ext_resource type="PackedScene" uid="uid://d24gcv3umq60k" path="res://Scenes/Objects/Occlusion/occlusion_culler.tscn" id="1_ijlg6"]
|
||||
[ext_resource type="Texture2D" uid="uid://c6cddkuevr4hl" path="res://Assets/Spritesheets/Trees/Big_Oak_Tree-Isolated.png" id="2_mxye4"]
|
||||
[ext_resource type="PackedScene" uid="uid://dpwm1tn0mbr3l" path="res://Entities/Map Objects/Trees/Effects/leaf_spawner.tscn" id="3_n7ubj"]
|
||||
[ext_resource type="Texture2D" uid="uid://dv2qcpyn2rk5s" path="res://Assets/Spritesheets/Trees/Oak_Leaf_Particle.png" id="4_xq3h5"]
|
||||
[ext_resource type="Material" uid="uid://1shsptwu7rdt" path="res://Resources/Materials/tree_sway.tres" id="2_pv2vp"]
|
||||
[ext_resource type="Script" uid="uid://vmyfl4obus88" path="res://Scripts/Objects/Trees/leaf_spawner.gd" id="3_mxye4"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_ijlg6"]
|
||||
radius = 23.021729
|
||||
|
||||
[sub_resource type="Shader" id="Shader_mxye4"]
|
||||
code = "shader_type canvas_item;
|
||||
|
||||
uniform bool render_noise = false;
|
||||
uniform sampler2D noise_texture : repeat_enable; // set in inspector
|
||||
uniform float amplitude : hint_range(0.0, 0.5, 0.01) = 0.2;
|
||||
uniform float time_scale : hint_range(0.0, 5.0, 0.01) = 0.04;
|
||||
uniform float noise_scale : hint_range(0.0, 2.0, 0.0001) = 0.001;
|
||||
uniform float rotation_strength : hint_range(0.0, 5.0, 0.1) = 1;
|
||||
uniform vec2 rotation_pivot = vec2(0.5, 1);
|
||||
varying vec2 world_position;
|
||||
|
||||
void vertex(){
|
||||
world_position = (MODEL_MATRIX * vec4(VERTEX, 0.0, 1.0)).xy;
|
||||
}
|
||||
|
||||
vec2 get_sample_pos(vec2 pos, float scale, float offset) {
|
||||
pos *= scale;
|
||||
pos += offset;
|
||||
return pos;
|
||||
}
|
||||
|
||||
vec2 rotate_vec(vec2 vec, vec2 pivot, float rotation) {
|
||||
float cosa = cos(rotation);
|
||||
float sina = sin(rotation);
|
||||
vec -= pivot;
|
||||
return vec2(
|
||||
cosa * vec.x - sina * vec.y,
|
||||
cosa * vec.y + sina * vec.x
|
||||
) + pivot;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
// get noise from texture
|
||||
vec2 noise_sample_pos = get_sample_pos(world_position, noise_scale, TIME * time_scale);
|
||||
float noise_amount = texture(noise_texture, noise_sample_pos).r - 0.5f;
|
||||
|
||||
// get rotation position around a pivot
|
||||
float rotation = amplitude * noise_amount;
|
||||
vec2 rotated_uvs = rotate_vec(UV, rotation_pivot, rotation);
|
||||
|
||||
// blend original uvs and rotated uvs based on distance to pivot
|
||||
float dist = distance(UV, rotation_pivot) * rotation_strength;
|
||||
vec2 result_uvs = mix(UV, rotated_uvs, dist);
|
||||
|
||||
// output color
|
||||
COLOR = texture(TEXTURE, result_uvs);
|
||||
|
||||
// optional, preview noise texture for debugging
|
||||
if (render_noise) {
|
||||
vec4 noise_color = texture(noise_texture, noise_sample_pos);
|
||||
COLOR = noise_color;
|
||||
}
|
||||
}"
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_pv2vp"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ocj51"]
|
||||
shader = SubResource("Shader_mxye4")
|
||||
shader_parameter/render_noise = false
|
||||
shader_parameter/noise_texture = SubResource("NoiseTexture2D_pv2vp")
|
||||
shader_parameter/amplitude = 0.1999999955296
|
||||
shader_parameter/time_scale = 0.04
|
||||
shader_parameter/noise_scale = 0.001
|
||||
shader_parameter/rotation_strength = 1.0
|
||||
shader_parameter/rotation_pivot = Vector2(0.5, 1)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0srx6"]
|
||||
size = Vector2(16, 10)
|
||||
|
||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_mxye4"]
|
||||
load_path = "res://.godot/imported/Oak_Leaf_Particle.png-90b4e62cf0b626a461440019d7b31cd8.ctex"
|
||||
|
||||
[node name="Tree 02" type="StaticBody2D" unique_id=2046930104]
|
||||
y_sort_enabled = true
|
||||
|
||||
@@ -90,7 +26,7 @@ shape = SubResource("CircleShape2D_ijlg6")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1420512565]
|
||||
y_sort_enabled = true
|
||||
material = SubResource("ShaderMaterial_ocj51")
|
||||
material = ExtResource("2_pv2vp")
|
||||
position = Vector2(0, 24)
|
||||
texture = ExtResource("2_mxye4")
|
||||
offset = Vector2(0, -24)
|
||||
@@ -99,8 +35,10 @@ offset = Vector2(0, -24)
|
||||
position = Vector2(0, 19)
|
||||
shape = SubResource("RectangleShape2D_0srx6")
|
||||
|
||||
[node name="Leaf Spawner" parent="." unique_id=986945632 node_paths=PackedStringArray("spawn_markers", "destination_markers") instance=ExtResource("3_n7ubj")]
|
||||
leaf_texture = ExtResource("4_xq3h5")
|
||||
[node name="Leaf Spawner" type="Node2D" parent="." unique_id=1908114650 node_paths=PackedStringArray("spawn_markers", "destination_markers")]
|
||||
y_sort_enabled = true
|
||||
script = ExtResource("3_mxye4")
|
||||
leaf_texture = SubResource("CompressedTexture2D_mxye4")
|
||||
spawn_markers = NodePath("Spawn Markers")
|
||||
destination_markers = NodePath("Destination Markers")
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[gd_scene format=3 uid="uid://bcx1d8kvp7o0h"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bhdecga15imvk" path="res://Assets/Spritesheets/Trees/Big_Spruce_tree.png" id="1_xun88"]
|
||||
[ext_resource type="PackedScene" uid="uid://d24gcv3umq60k" path="res://Entities/Characters/Utility/Occlusion/occlusion_culler.tscn" id="2_45i4c"]
|
||||
[ext_resource type="PackedScene" uid="uid://dpwm1tn0mbr3l" path="res://Entities/Map Objects/Trees/Effects/leaf_spawner.tscn" id="3_nua4y"]
|
||||
[ext_resource type="PackedScene" uid="uid://d24gcv3umq60k" path="res://Scenes/Objects/Occlusion/occlusion_culler.tscn" id="2_45i4c"]
|
||||
[ext_resource type="Material" uid="uid://1shsptwu7rdt" path="res://Resources/Materials/tree_sway.tres" id="2_bbkr4"]
|
||||
[ext_resource type="Script" uid="uid://vmyfl4obus88" path="res://Scripts/Objects/Trees/leaf_spawner.gd" id="3_13veg"]
|
||||
[ext_resource type="Texture2D" uid="uid://ckvfo6bl606hp" path="res://Assets/Spritesheets/Trees/Spruce_Needle_Particle.png" id="4_34ibr"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_13veg"]
|
||||
@@ -14,73 +15,6 @@ radius = 8.0
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_bbkr4"]
|
||||
radius = 3.0
|
||||
|
||||
[sub_resource type="Shader" id="Shader_34ibr"]
|
||||
code = "shader_type canvas_item;
|
||||
|
||||
uniform bool render_noise = false;
|
||||
uniform sampler2D noise_texture : repeat_enable; // set in inspector
|
||||
uniform float amplitude : hint_range(0.0, 0.5, 0.01) = 0.2;
|
||||
uniform float time_scale : hint_range(0.0, 5.0, 0.01) = 0.04;
|
||||
uniform float noise_scale : hint_range(0.0, 2.0, 0.0001) = 0.001;
|
||||
uniform float rotation_strength : hint_range(0.0, 5.0, 0.1) = 1;
|
||||
uniform vec2 rotation_pivot = vec2(0.5, 1);
|
||||
varying vec2 world_position;
|
||||
|
||||
void vertex(){
|
||||
world_position = (MODEL_MATRIX * vec4(VERTEX, 0.0, 1.0)).xy;
|
||||
}
|
||||
|
||||
vec2 get_sample_pos(vec2 pos, float scale, float offset) {
|
||||
pos *= scale;
|
||||
pos += offset;
|
||||
return pos;
|
||||
}
|
||||
|
||||
vec2 rotate_vec(vec2 vec, vec2 pivot, float rotation) {
|
||||
float cosa = cos(rotation);
|
||||
float sina = sin(rotation);
|
||||
vec -= pivot;
|
||||
return vec2(
|
||||
cosa * vec.x - sina * vec.y,
|
||||
cosa * vec.y + sina * vec.x
|
||||
) + pivot;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
// get noise from texture
|
||||
vec2 noise_sample_pos = get_sample_pos(world_position, noise_scale, TIME * time_scale);
|
||||
float noise_amount = texture(noise_texture, noise_sample_pos).r - 0.5f;
|
||||
|
||||
// get rotation position around a pivot
|
||||
float rotation = amplitude * noise_amount;
|
||||
vec2 rotated_uvs = rotate_vec(UV, rotation_pivot, rotation);
|
||||
|
||||
// blend original uvs and rotated uvs based on distance to pivot
|
||||
float dist = distance(UV, rotation_pivot) * rotation_strength;
|
||||
vec2 result_uvs = mix(UV, rotated_uvs, dist);
|
||||
|
||||
// output color
|
||||
COLOR = texture(TEXTURE, result_uvs);
|
||||
|
||||
// optional, preview noise texture for debugging
|
||||
if (render_noise) {
|
||||
vec4 noise_color = texture(noise_texture, noise_sample_pos);
|
||||
COLOR = noise_color;
|
||||
}
|
||||
}"
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_bbkr4"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_b4y2c"]
|
||||
shader = SubResource("Shader_34ibr")
|
||||
shader_parameter/render_noise = false
|
||||
shader_parameter/noise_texture = SubResource("NoiseTexture2D_bbkr4")
|
||||
shader_parameter/amplitude = 0.03999999910592
|
||||
shader_parameter/time_scale = 0.04
|
||||
shader_parameter/noise_scale = 0.001
|
||||
shader_parameter/rotation_strength = 1.0
|
||||
shader_parameter/rotation_pivot = Vector2(0.5, 1)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5otsd"]
|
||||
atlas = ExtResource("1_xun88")
|
||||
region = Rect2(64, 0, 64, 80)
|
||||
@@ -107,7 +41,7 @@ shape = SubResource("CircleShape2D_bbkr4")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1420512565]
|
||||
y_sort_enabled = true
|
||||
material = SubResource("ShaderMaterial_b4y2c")
|
||||
material = ExtResource("2_bbkr4")
|
||||
position = Vector2(0, 24)
|
||||
texture = SubResource("AtlasTexture_5otsd")
|
||||
offset = Vector2(0, -24)
|
||||
@@ -116,7 +50,8 @@ offset = Vector2(0, -24)
|
||||
position = Vector2(0, 19)
|
||||
shape = SubResource("RectangleShape2D_0srx6")
|
||||
|
||||
[node name="Leaf Spawner" parent="." unique_id=986945632 node_paths=PackedStringArray("spawn_markers", "destination_markers") instance=ExtResource("3_nua4y")]
|
||||
[node name="Leaf Spawner" type="Node2D" parent="." unique_id=1308634781 node_paths=PackedStringArray("spawn_markers", "destination_markers")]
|
||||
script = ExtResource("3_13veg")
|
||||
leaf_texture = ExtResource("4_34ibr")
|
||||
spawn_markers = NodePath("Spawn Markers")
|
||||
destination_markers = NodePath("Destination Markers")
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user