Compare commits

...

3 Commits

55 changed files with 1313 additions and 474 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://25fd7vfy4em1"
path="res://.godot/imported/ATKincreaser1 - Copy.png-81f926f8a20d2ded005191e97e06da7b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/ATKincreaser1 - Copy.png"
dest_files=["res://.godot/imported/ATKincreaser1 - Copy.png-81f926f8a20d2ded005191e97e06da7b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bfivackn5p5ww"
path="res://.godot/imported/AirGeo - Copy.png-15b81ee4c274723fb9f3a07faf8ae600.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/AirGeo - Copy.png"
dest_files=["res://.godot/imported/AirGeo - Copy.png-15b81ee4c274723fb9f3a07faf8ae600.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bh30ncncy0cwi"
path="res://.godot/imported/DEFincreaser1 - Copy.png-e068db996d5d392343dbd4f99b681d94.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/DEFincreaser1 - Copy.png"
dest_files=["res://.godot/imported/DEFincreaser1 - Copy.png-e068db996d5d392343dbd4f99b681d94.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://1w8rtmyppinv"
path="res://.godot/imported/Geomantic Reactor1 - Copy.png-83821b5dd30650273c697837a5b4f54f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/Geomantic Reactor1 - Copy.png"
dest_files=["res://.godot/imported/Geomantic Reactor1 - Copy.png-83821b5dd30650273c697837a5b4f54f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cviym8iyjjjbq"
path="res://.godot/imported/WATER - Copy.png-c9968e567f871e7260abfba7b83e73e7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/WATER - Copy.png"
dest_files=["res://.godot/imported/WATER - Copy.png-c9968e567f871e7260abfba7b83e73e7.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cye7rpt3b8iti"
path="res://.godot/imported/ammo1 - Copy.png-151b606f1b1158ee89e62f3e1cefc5cc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/ammo1 - Copy.png"
dest_files=["res://.godot/imported/ammo1 - Copy.png-151b606f1b1158ee89e62f3e1cefc5cc.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://0jhe24xgwvaj"
path="res://.godot/imported/crosssword1 - Copy.png-c2cc070a064a03688c4f2c89486d970d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/crosssword1 - Copy.png"
dest_files=["res://.godot/imported/crosssword1 - Copy.png-c2cc070a064a03688c4f2c89486d970d.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cv30gcw82hoaf"
path="res://.godot/imported/earth - Copy.png-a935fd0b18dbd073cfe259ecb7c47bb5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/earth - Copy.png"
dest_files=["res://.godot/imported/earth - Copy.png-a935fd0b18dbd073cfe259ecb7c47bb5.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://caijviyphuan"
path="res://.godot/imported/firegeo - Copy.png-2f863742b4a3bce61a641e2603b3c3a2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/firegeo - Copy.png"
dest_files=["res://.godot/imported/firegeo - Copy.png-2f863742b4a3bce61a641e2603b3c3a2.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c2s8y73rsd1b2"
path="res://.godot/imported/flower1 - Copy.png-a2461adef98e7beaebf869c690de8ffd.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/flower1 - Copy.png"
dest_files=["res://.godot/imported/flower1 - Copy.png-a2461adef98e7beaebf869c690de8ffd.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dah2rp6iaexth"
path="res://.godot/imported/keystaff1 - Copy.png-0c479aa77de34a0379b183933c1cd5de.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/keystaff1 - Copy.png"
dest_files=["res://.godot/imported/keystaff1 - Copy.png-0c479aa77de34a0379b183933c1cd5de.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c066c7fa8ycao"
path="res://.godot/imported/knives1 - Copy.png-adfcb60fcd4121ee390ca62111eb01b5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/knives1 - Copy.png"
dest_files=["res://.godot/imported/knives1 - Copy.png-adfcb60fcd4121ee390ca62111eb01b5.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cmtosrqnl1p3m"
path="res://.godot/imported/persuader1 - Copy.png-eb3fb90ddfe9fd2a572d9afd494a3e64.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/persuader1 - Copy.png"
dest_files=["res://.godot/imported/persuader1 - Copy.png-eb3fb90ddfe9fd2a572d9afd494a3e64.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cxvxmg3i1rcgk"
path="res://.godot/imported/plasmasword1 - Copy.png-eec26489f90e2720c88a43a310e9ede2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/plasmasword1 - Copy.png"
dest_files=["res://.godot/imported/plasmasword1 - Copy.png-eec26489f90e2720c88a43a310e9ede2.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cxcy2f4iqjjpd"
path="res://.godot/imported/plastique icon1 - Copy.png-699fa0f0a4e79e2cc04780e6eef5895c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/plastique icon1 - Copy.png"
dest_files=["res://.godot/imported/plastique icon1 - Copy.png-699fa0f0a4e79e2cc04780e6eef5895c.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cc1p2cmtj5cet"
path="res://.godot/imported/spell sign - identify - Copy.PNG-39d0b4aedcb65da610ecbeb950d13978.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/items/Icons/spell sign - identify - Copy.PNG"
dest_files=["res://.godot/imported/spell sign - identify - Copy.PNG-39d0b4aedcb65da610ecbeb950d13978.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

View File

@@ -0,0 +1,37 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dld10xlpr8d17"
path="res://.godot/imported/OW_gate.glb-fe522ba9c9961b3460ab4082c3a88f94.scn"
[deps]
source_file="res://src/map/assets/OW_gate.glb"
dest_files=["res://.godot/imported/OW_gate.glb-fe522ba9c9961b3460ab4082c3a88f94.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dhivollpx6jd1"
path="res://.godot/imported/OW_gate_metal_0029_color_1k.jpg-edc9606d9c7000f69615959b28e68b89.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "5383228fb7ecb7dc4b59128edcb8a6a0"
}
[deps]
source_file="res://src/map/assets/OW_gate_metal_0029_color_1k.jpg"
dest_files=["res://.godot/imported/OW_gate_metal_0029_color_1k.jpg-edc9606d9c7000f69615959b28e68b89.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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=0

View File

@@ -1,12 +1,12 @@
[gd_scene load_steps=768 format=4 uid="uid://dvnc26rebk6o0"]
[gd_scene load_steps=769 format=4 uid="uid://dvnc26rebk6o0"]
[ext_resource type="Script" uid="uid://cuhfkyh3d7noa" path="res://src/map/dungeon/code/Overworld.cs" id="1_5hmt3"]
[ext_resource type="Texture2D" uid="uid://co6h8vyi11sl2" path="res://src/map/overworld/Models/Overworld_CLOUD_RINGS_INNER_63.png" id="2_g6b7b"]
[ext_resource type="Texture2D" uid="uid://ty5jk5c5qxyx" path="res://src/map/overworld/Overworld Fixes Models/Overworld Reexport Fixes_A1_eyeblock.png" id="2_vmdvy"]
[ext_resource type="AudioStream" uid="uid://ym4ur8a2qxhp" path="res://src/audio/AMB/amb_perlin.wav" id="2_wbbo3"]
[ext_resource type="AudioStream" uid="uid://ym4ur8a2qxhp" path="res://src/audio/amb/amb_perlin.wav" id="2_wbbo3"]
[ext_resource type="Texture2D" uid="uid://cfb626ush22mu" path="res://src/map/overworld/Overworld Fixes Models/Overworld Reexport Fixes_concrete_0025_color_1k.jpg" id="3_b6pah"]
[ext_resource type="AudioStream" uid="uid://b7wxddjx3qw5o" path="res://src/audio/AMB/amb_white_noise.wav" id="3_c2gp5"]
[ext_resource type="AudioStream" uid="uid://ddii3pi8x75xc" path="res://src/audio/AMB/amb_beach.wav" id="3_pvi8n"]
[ext_resource type="AudioStream" uid="uid://b7wxddjx3qw5o" path="res://src/audio/amb/amb_white_noise.wav" id="3_c2gp5"]
[ext_resource type="AudioStream" uid="uid://ddii3pi8x75xc" path="res://src/audio/amb/amb_beach.wav" id="3_pvi8n"]
[ext_resource type="Texture2D" uid="uid://w33fr6exryiy" path="res://src/map/overworld/Models/Overworld_CLOUD_RINGS_INNER_37.png" id="3_uyygh"]
[ext_resource type="Texture2D" uid="uid://yt43jew75oaa" path="res://src/map/overworld/Overworld Fixes Models/Overworld Reexport Fixes_carved_stone_3.png" id="4_clblw"]
[ext_resource type="Texture2D" uid="uid://dv10yaqvp3mub" path="res://src/map/overworld/Models/Overworld_CLOUD_RINGS_INNER_71.png" id="4_r8r3k"]
@@ -139,6 +139,7 @@
[ext_resource type="PackedScene" uid="uid://cjj6wabswtkk1" path="res://src/npc/Caretaker/Caretaker.tscn" id="80_8isf0"]
[ext_resource type="CompressedTexture2DArray" uid="uid://c0kjnbpgaa6bs" path="res://src/map/assets/caustics.png" id="84_r86sn"]
[ext_resource type="Texture2D" uid="uid://cbsdc4uthojov" path="res://src/map/assets/waternormal2.jpg" id="85_0u0mt"]
[ext_resource type="PackedScene" uid="uid://dld10xlpr8d17" path="res://src/map/assets/OW_gate.glb" id="109_8vsb2"]
[ext_resource type="PackedScene" uid="uid://tc5kdfoggrng" path="res://src/item_rescue/RescuedItems.tscn" id="141_b6pah"]
[ext_resource type="Texture2D" uid="uid://bd3ad0jb6emg" path="res://src/vfx/World/GREEN_FLAME.png" id="141_fmewe"]
[ext_resource type="Texture2D" uid="uid://b7kj1pxt7wx1g" path="res://src/vfx/World/BLUE_FLAME.png" id="142_8vsb2"]
@@ -18812,6 +18813,9 @@ transform = Transform3D(0.636254, 0, 0.77148, 0, 1, 0, -0.77148, 0, 0.636254, -1
mesh = SubResource("PlaneMesh_322om")
skeleton = NodePath("../../Lighting And Environment/DirectionalLight3D")
[node name="OW_gate" parent="." instance=ExtResource("109_8vsb2")]
transform = Transform3D(1.00285, 0, -4.02701, 0, 4.15, 0, 4.02701, 0, 1.00285, -473.827, 4.69893, -53.4151)
[node name="Ocean" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -53.537, 0)
mesh = SubResource("PlaneMesh_4rcfa")
@@ -19118,29 +19122,29 @@ omni_range = 60.893
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -349.863, 9.41853, 131.703)
[node name="Node3D" type="Node3D" parent="."]
[node name="Flames" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -384.577, -32.0995, 112.205)
[node name="GREEN FLAME" type="AnimatedSprite3D" parent="Node3D"]
[node name="GREEN FLAME" type="AnimatedSprite3D" parent="Flames"]
unique_name_in_owner = true
billboard = 1
texture_filter = 1
sprite_frames = SubResource("SpriteFrames_xm7ha")
frame_progress = 0.549513
[node name="BLUE FLAME" type="AnimatedSprite3D" parent="Node3D"]
[node name="BLUE FLAME" type="AnimatedSprite3D" parent="Flames"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.09073, 0, -0.809776)
billboard = 1
sprite_frames = SubResource("SpriteFrames_aqfas")
frame_progress = 0.138546
[node name="REGULAR FLAME" type="AnimatedSprite3D" parent="Node3D"]
[node name="REGULAR FLAME" type="AnimatedSprite3D" parent="Flames"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.38918, 0)
billboard = 1
sprite_frames = SubResource("SpriteFrames_yw3t6")
frame_progress = 0.180404
[node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="Node3D"]
[node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="Flames"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.42868, 1.97028, 0)
billboard = 1
sprite_frames = SubResource("SpriteFrames_cnruo")

View File

@@ -55,229 +55,229 @@ public partial class OptionsMenu : Control
public void OnReady()
{
ResolutionOptions.AddItem("Windowed");
ResolutionOptions.AddItem("Maximized");
ResolutionOptions.AddItem("Fullscreen");
ResolutionOptions.AddItem("Exclusive Fullscreen");
ResolutionOptions.Select(0);
ResolutionOptions.AddItem("Windowed");
ResolutionOptions.AddItem("Maximized");
ResolutionOptions.AddItem("Fullscreen");
ResolutionOptions.AddItem("Exclusive Fullscreen");
ResolutionOptions.Select(0);
var devices = AudioServer.GetOutputDeviceList();
foreach (var device in devices)
SoundDeviceOptions.AddItem(device);
var devices = AudioServer.GetOutputDeviceList();
foreach (var device in devices)
SoundDeviceOptions.AddItem(device);
SoundDeviceOptions.Select(0);
SoundDeviceOptions.Select(0);
SoundDeviceOptions.AllowReselect = true;
SoundDeviceOptions.Pressed += SoundDeviceOptions_Pressed;
SoundDeviceOptions.ItemSelected += ChangeAudioDevice;
SoundDeviceOptions.AllowReselect = true;
SoundDeviceOptions.Pressed += SoundDeviceOptions_Pressed;
SoundDeviceOptions.ItemSelected += ChangeAudioDevice;
OptionsData = new OptionsData()
{
MasterVolumeLevel = MasterVolumeSlider.Value,
MusicVolumeLevel = MusicVolumeSlider.Value,
SFXVolumeLevel = SFXVolumeSlider.Value,
AudioDeviceName = "Default",
ScreenResolution = ResolutionOptions.GetSelectedId(),
SkipCutscene = SkipOpeningCSCheck.ButtonPressed
};
OptionsData = new OptionsData()
{
MasterVolumeLevel = MasterVolumeSlider.Value,
MusicVolumeLevel = MusicVolumeSlider.Value,
SFXVolumeLevel = SFXVolumeSlider.Value,
AudioDeviceName = "Default",
ScreenResolution = ResolutionOptions.GetSelectedId(),
SkipCutscene = SkipOpeningCSCheck.ButtonPressed
};
SkipOpeningCSCheck.Pressed += SkipOpeningCS_Pressed;
SkipOpeningCSCheck.Pressed += SkipOpeningCS_Pressed;
DeleteSaveButton.Pressed += DeleteSaveButton_Pressed;
YesDeleteButton.Pressed += YesDeleteButton_Pressed;
NoDeleteButton.Pressed += NoDeleteButton_Pressed;
DeleteSaveButton.Pressed += DeleteSaveButton_Pressed;
YesDeleteButton.Pressed += YesDeleteButton_Pressed;
NoDeleteButton.Pressed += NoDeleteButton_Pressed;
MasterVolumeSlider.ValueChanged += MasterVolumeSlider_Changed;
MusicVolumeSlider.ValueChanged += MusicVolumeSlider_Changed;
SFXVolumeSlider.ValueChanged += SFXVolumeSlider_Changed;
MasterVolumeSlider.ValueChanged += MasterVolumeSlider_Changed;
MusicVolumeSlider.ValueChanged += MusicVolumeSlider_Changed;
SFXVolumeSlider.ValueChanged += SFXVolumeSlider_Changed;
ResolutionOptions.ItemSelected += ResolutionOptions_ItemSelected;
ResolutionOptions.ItemSelected += ResolutionOptions_ItemSelected;
_masterBusIndex = AudioServer.GetBusIndex("Master");
_musicBusIndex = AudioServer.GetBusIndex("MUSIC");
_sfxBusIndex = AudioServer.GetBusIndex("SFX");
_masterBusIndex = AudioServer.GetBusIndex("Master");
_musicBusIndex = AudioServer.GetBusIndex("MUSIC");
_sfxBusIndex = AudioServer.GetBusIndex("SFX");
GameTab.FocusEntered += Game_FocusEntered;
AudioTab.FocusEntered += Audio_FocusEntered;
ControllerTab.FocusEntered += Controller_FocusEntered;
GameTab.FocusEntered += Game_FocusEntered;
AudioTab.FocusEntered += Audio_FocusEntered;
ControllerTab.FocusEntered += Controller_FocusEntered;
SELabel.Pressed += SELabel_Pressed;
MusicLabel.Pressed += MusicLabel_Pressed;
MasterLabel.Pressed += MasterLabel_Pressed;
SELabel.Pressed += SELabel_Pressed;
MusicLabel.Pressed += MusicLabel_Pressed;
MasterLabel.Pressed += MasterLabel_Pressed;
GetViewport().GuiFocusChanged += OptionsMenu_GuiFocusChanged;
GetViewport().GuiFocusChanged += OptionsMenu_GuiFocusChanged;
}
public override void _Input(InputEvent @event)
{
if (!Visible)
return;
if (!Visible)
return;
if (Input.IsActionJustPressed(GameInputs.Interact) || Input.IsActionJustPressed(GameInputs.Attack))
{
if (SFXVolumeSlider.HasFocus())
{
SELabel.GrabFocus();
AcceptEvent();
return;
}
if (MusicVolumeSlider.HasFocus())
{
MusicLabel.GrabFocus();
AcceptEvent();
return;
}
if (MasterVolumeSlider.HasFocus())
{
MasterLabel.GrabFocus();
AcceptEvent();
return;
}
}
if (Input.IsActionJustPressed(GameInputs.Interact) || Input.IsActionJustPressed(GameInputs.Attack))
{
if (SFXVolumeSlider.HasFocus())
{
SELabel.GrabFocus();
AcceptEvent();
return;
}
if (MusicVolumeSlider.HasFocus())
{
MusicLabel.GrabFocus();
AcceptEvent();
return;
}
if (MasterVolumeSlider.HasFocus())
{
MasterLabel.GrabFocus();
AcceptEvent();
return;
}
}
if (Input.IsActionJustPressed(GameInputs.Interact) || Input.IsActionJustPressed(GameInputs.Pause))
{
if (GameTab.HasFocus() || AudioTab.HasFocus() || ControllerTab.HasFocus())
{
AcceptEvent();
SaveAndExitMenu();
}
else
{
var path = GetPathTo(_currentFocus).ToString();
if (path.Contains("Game"))
GameTab.GrabFocus();
else if (path.Contains("Audio"))
AudioTab.GrabFocus();
else if (path.Contains("Controller"))
ControllerTab.GrabFocus();
}
}
if (Input.IsActionJustPressed(GameInputs.Interact) || Input.IsActionJustPressed(GameInputs.Pause))
{
if (GameTab.HasFocus() || AudioTab.HasFocus() || ControllerTab.HasFocus())
{
AcceptEvent();
SaveAndExitMenu();
}
else
{
var path = GetPathTo(_currentFocus).ToString();
if (path.Contains("Game"))
GameTab.GrabFocus();
else if (path.Contains("Audio"))
AudioTab.GrabFocus();
else if (path.Contains("Controller"))
ControllerTab.GrabFocus();
}
}
}
private void ResolutionOptions_ItemSelected(long index)
{
var resolutionIndex = ResolutionOptions.GetSelectedId();
OptionsData.ScreenResolution = resolutionIndex;
DisplayServer.WindowSetMode(_windowModes[resolutionIndex]);
var resolutionIndex = ResolutionOptions.GetSelectedId();
OptionsData.ScreenResolution = resolutionIndex;
DisplayServer.WindowSetMode(_windowModes[resolutionIndex]);
}
private void ChangeAudioDevice(long index)
{
var i = SoundDeviceOptions.GetSelectedId();
var deviceName = SoundDeviceOptions.GetItemText(i);
AudioServer.SetOutputDevice(deviceName);
OptionsData.AudioDeviceName = deviceName;
var i = SoundDeviceOptions.GetSelectedId();
var deviceName = SoundDeviceOptions.GetItemText(i);
AudioServer.SetOutputDevice(deviceName);
OptionsData.AudioDeviceName = deviceName;
}
public void Load(OptionsData optionsData)
{
MasterVolumeSlider.Value = optionsData.MasterVolumeLevel;
MusicVolumeSlider.Value = optionsData.MusicVolumeLevel;
SFXVolumeSlider.Value = optionsData.SFXVolumeLevel;
ResolutionOptions.Select(optionsData.ScreenResolution);
var audioDevices = AudioServer.GetOutputDeviceList();
if (!audioDevices.Contains(optionsData.AudioDeviceName))
SoundDeviceOptions.Select(0);
else
{
var selectedDeviceIndex = AudioServer.GetOutputDeviceList().ToList().IndexOf(optionsData.AudioDeviceName);
SoundDeviceOptions.Select(selectedDeviceIndex);
}
SkipOpeningCSCheck.ButtonPressed = optionsData.SkipCutscene;
DisplayServer.WindowSetMode(_windowModes[optionsData.ScreenResolution]);
MasterVolumeSlider.Value = optionsData.MasterVolumeLevel;
MusicVolumeSlider.Value = optionsData.MusicVolumeLevel;
SFXVolumeSlider.Value = optionsData.SFXVolumeLevel;
ResolutionOptions.Select(optionsData.ScreenResolution);
var audioDevices = AudioServer.GetOutputDeviceList();
if (!audioDevices.Contains(optionsData.AudioDeviceName))
SoundDeviceOptions.Select(0);
else
{
var selectedDeviceIndex = AudioServer.GetOutputDeviceList().ToList().IndexOf(optionsData.AudioDeviceName);
SoundDeviceOptions.Select(selectedDeviceIndex);
}
SkipOpeningCSCheck.ButtonPressed = optionsData.SkipCutscene;
DisplayServer.WindowSetMode(_windowModes[optionsData.ScreenResolution]);
}
private void OptionsMenu_GuiFocusChanged(Control node) => _currentFocus = node;
private void MasterLabel_Pressed()
{
MasterVolumeSlider.GrabFocus();
MasterVolumeSlider.GrabFocus();
}
private void MusicLabel_Pressed()
{
MusicVolumeSlider.GrabFocus();
MusicVolumeSlider.GrabFocus();
}
private void SELabel_Pressed()
{
SFXVolumeSlider.GrabFocus();
SFXVolumeSlider.GrabFocus();
}
private void SoundDeviceOptions_Pressed()
{
var selectedItem = SoundDeviceOptions.Selected;
SoundDeviceOptions.Clear();
var selectedItem = SoundDeviceOptions.Selected;
SoundDeviceOptions.Clear();
var devices = AudioServer.GetOutputDeviceList();
foreach (var device in devices)
SoundDeviceOptions.AddItem(device);
SoundDeviceOptions.Select(selectedItem);
var devices = AudioServer.GetOutputDeviceList();
foreach (var device in devices)
SoundDeviceOptions.AddItem(device);
SoundDeviceOptions.Select(selectedItem);
}
private void SkipOpeningCS_Pressed() => OptionsData.SkipCutscene = SkipOpeningCSCheck.ButtonPressed;
private void NoDeleteButton_Pressed()
{
ReleaseFocus();
ConfirmDeletePopup.Hide();
DeleteSaveButton.GrabFocus();
ReleaseFocus();
ConfirmDeletePopup.Hide();
DeleteSaveButton.GrabFocus();
}
private void YesDeleteButton_Pressed()
{
EmitSignal(SignalName.DeleteSaveData);
ReleaseFocus();
ConfirmDeletePopup.Hide();
DeleteSaveButton.GrabFocus();
EmitSignal(SignalName.DeleteSaveData);
ReleaseFocus();
ConfirmDeletePopup.Hide();
DeleteSaveButton.GrabFocus();
}
private void DeleteSaveButton_Pressed()
{
NoDeleteButton.GrabFocus();
ConfirmDeletePopup.Show();
NoDeleteButton.GrabFocus();
ConfirmDeletePopup.Show();
}
private void SaveAndExitMenu() => EmitSignal(SignalName.OptionsMenuExited);
private void MasterVolumeSlider_Changed(double valueChanged)
{
OptionsData.MasterVolumeLevel = valueChanged;
AudioServer.SetBusVolumeDb(_masterBusIndex, Mathf.LinearToDb((float)valueChanged));
OptionsData.MasterVolumeLevel = valueChanged;
AudioServer.SetBusVolumeDb(_masterBusIndex, Mathf.LinearToDb((float)valueChanged));
}
private void MusicVolumeSlider_Changed(double valueChanged)
{
OptionsData.MusicVolumeLevel = valueChanged;
AudioServer.SetBusVolumeDb(_musicBusIndex, Mathf.LinearToDb((float)valueChanged));
OptionsData.MusicVolumeLevel = valueChanged;
AudioServer.SetBusVolumeDb(_musicBusIndex, Mathf.LinearToDb((float)valueChanged));
}
private void SFXVolumeSlider_Changed(double valueChanged)
{
OptionsData.SFXVolumeLevel = valueChanged;
AudioServer.SetBusVolumeDb(_sfxBusIndex, Mathf.LinearToDb((float)valueChanged));
OptionsData.SFXVolumeLevel = valueChanged;
AudioServer.SetBusVolumeDb(_sfxBusIndex, Mathf.LinearToDb((float)valueChanged));
}
private void Controller_FocusEntered()
{
Audio.Hide();
Controller.Show();
Game.Hide();
Audio.Hide();
Controller.Show();
Game.Hide();
}
private void Game_FocusEntered()
{
Audio.Hide();
Controller.Hide();
Game.Show();
Audio.Hide();
Controller.Hide();
Game.Show();
}
private void Audio_FocusEntered()
{
Audio.Show();
Controller.Hide();
Game.Hide();
Audio.Show();
Controller.Hide();
Game.Hide();
}
}

View File

@@ -6,11 +6,11 @@
[ext_resource type="FontFile" uid="uid://beh6d5lo5ihq0" path="res://src/ui/fonts/georgiai.ttf" id="2_n0yw3"]
[ext_resource type="LabelSettings" uid="uid://cuuo43x72xcsc" path="res://src/ui/label_settings/MainTextBold.tres" id="2_o7aaw"]
[ext_resource type="FontFile" uid="uid://cke424xtk2s0o" path="res://src/ui/fonts/ebrima.ttf" id="2_ohii5"]
[ext_resource type="LabelSettings" uid="uid://b6f8ggy3ulonb" path="res://src/ui/label_settings/GeorgiaItalic.tres" id="5_1mx8s"]
[ext_resource type="LabelSettings" path="res://src/ui/label_settings/GeorgiaItalic.tres" id="5_1mx8s"]
[ext_resource type="Texture2D" uid="uid://u255bg4nytuf" path="res://src/ui/gallery/checkbox.png" id="5_wn77p"]
[ext_resource type="Texture2D" uid="uid://2fwkphkxib7p" path="res://src/ui/gallery/Unchecked.png" id="6_ko1q6"]
[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="9_lx8gn"]
[ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="10_qvpxc"]
[ext_resource type="StyleBox" path="res://src/options/SelectedOptionsBox.tres" id="9_lx8gn"]
[ext_resource type="StyleBox" path="res://src/options/UnselectedOptionsBox.tres" id="10_qvpxc"]
[ext_resource type="Script" uid="uid://c6lw5yp8p0wb5" path="res://src/options/InputMapper.cs" id="12_776se"]
[ext_resource type="Script" uid="uid://b70br20xue678" path="res://src/options/KeyboardRemapButton.cs" id="13_rjjwr"]
[ext_resource type="Script" uid="uid://bo7vk56h1lr07" path="res://src/options/JoypadRemapButton.cs" id="14_wsiwg"]
@@ -46,6 +46,7 @@ size_flags_vertical = 3
script = ExtResource("1_jli36")
[node name="TextureRect" type="TextureRect" parent="."]
texture_filter = 2
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0

View File

@@ -107,187 +107,187 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
public void Initialize()
{
var container = new SimpleInjector.Container();
container.Register<IPlayerLogic, PlayerLogic>(Lifestyle.Singleton);
var container = new SimpleInjector.Container();
container.Register<IPlayerLogic, PlayerLogic>(Lifestyle.Singleton);
PlayerLogic = container.GetInstance<IPlayerLogic>();
PlayerLogic.Set(this as IPlayer);
PlayerLogic.Set(Settings);
PlayerLogic = container.GetInstance<IPlayerLogic>();
PlayerLogic.Set(this as IPlayer);
PlayerLogic.Set(Settings);
Inventory = new Inventory();
HealthComponent = new HealthComponent(InitialHP);
VTComponent = new VTComponent(InitialVT);
AttackComponent = new AttackComponent(InitialAttack);
DefenseComponent = new DefenseComponent(InitialDefense);
ExperiencePointsComponent = new ExperiencePointsComponent();
LuckComponent = new LuckComponent(InitialLuck);
EquipmentComponent = new EquipmentComponent();
Inventory = new Inventory();
HealthComponent = new HealthComponent(InitialHP);
VTComponent = new VTComponent(InitialVT);
AttackComponent = new AttackComponent(InitialAttack);
DefenseComponent = new DefenseComponent(InitialDefense);
ExperiencePointsComponent = new ExperiencePointsComponent();
LuckComponent = new LuckComponent(InitialLuck);
EquipmentComponent = new EquipmentComponent();
_itemReroller = new ItemReroller(ItemDatabase.Instance);
_itemReroller = new ItemReroller(ItemDatabase.Instance);
Settings = new PlayerLogic.Settings() { RotationSpeed = RotationSpeed, MoveSpeed = MoveSpeed, Acceleration = Acceleration };
Settings = new PlayerLogic.Settings() { RotationSpeed = RotationSpeed, MoveSpeed = MoveSpeed, Acceleration = Acceleration };
PlayerBinding = PlayerLogic.Bind();
PlayerBinding = PlayerLogic.Bind();
PlayerBinding
.Handle((in PlayerLogic.Output.ThrowItem output) =>
{
})
.Handle((in PlayerLogic.Output.Move output) =>
{
Move(output.delta);
});
PlayerBinding
.Handle((in PlayerLogic.Output.ThrowItem output) =>
{
})
.Handle((in PlayerLogic.Output.Move output) =>
{
Move(output.delta);
});
PlayerLogic.Start();
this.Provide();
PlayerLogic.Start();
this.Provide();
}
public void ResetPlayerData()
{
foreach (var item in Inventory.Items)
Inventory.Remove(item);
foreach (var item in Inventory.Items)
Inventory.Remove(item);
HealthComponent.Reset();
VTComponent.Reset();
AttackComponent.Reset();
DefenseComponent.Reset();
ExperiencePointsComponent.Reset();
LuckComponent.Reset();
EquipmentComponent.Reset();
HealthComponent.Reset();
VTComponent.Reset();
AttackComponent.Reset();
DefenseComponent.Reset();
ExperiencePointsComponent.Reset();
LuckComponent.Reset();
EquipmentComponent.Reset();
HealthTimer.Timeout += OnHealthTimerTimeout;
HealthTimer.Timeout += OnHealthTimerTimeout;
}
#region Initialization
public void OnReady()
{
Hitbox.AreaEntered += Hitbox_AreaEntered;
CollisionDetector.AreaEntered += CollisionDetector_AreaEntered;
HealthComponent.HealthReachedZero += Die;
HealthTimer.WaitTime = _healthTimerWaitTime;
SetProcessInput(false);
SetPhysicsProcess(false);
Hitbox.AreaEntered += Hitbox_AreaEntered;
CollisionDetector.AreaEntered += CollisionDetector_AreaEntered;
HealthComponent.HealthReachedZero += Die;
HealthTimer.WaitTime = _healthTimerWaitTime;
SetProcessInput(false);
SetPhysicsProcess(false);
}
#endregion
public void Activate()
{
SetProcessInput(true);
SetPhysicsProcess(true);
SetHealthTimerStatus(HealthTimerIsActive);
SetProcessInput(true);
SetPhysicsProcess(true);
SetHealthTimerStatus(HealthTimerIsActive);
}
public void Deactivate()
{
Velocity = Vector3.Zero;
SetProcessInput(false);
SetPhysicsProcess(false);
SetHealthTimerStatus(false);
Velocity = Vector3.Zero;
SetProcessInput(false);
SetPhysicsProcess(false);
SetHealthTimerStatus(false);
}
private void SetHealthTimerStatus(bool isActive)
{
if (isActive)
HealthTimer.Start();
else
HealthTimer.Stop();
if (isActive)
HealthTimer.Start();
else
HealthTimer.Stop();
}
public void TeleportPlayer(Transform3D newTransform)
{
Transform = newTransform;
Transform = newTransform;
}
public void TakeDamage(AttackData damage)
{
_camera3D.AddShake(1.0f);
TakeDamageAnimationPlayer.Play("take_damage");
var damageReceived = DamageCalculator.CalculateDamage(damage, DefenseComponent.CurrentDefense.Value + EquipmentComponent.BonusDefense, EquipmentComponent.ElementalResistance);
HealthComponent.Damage(damageReceived);
SfxDatabase.Instance.Play(SoundEffect.TakeDamage);
_camera3D.AddShake(1.0f);
TakeDamageAnimationPlayer.Play("take_damage");
var damageReceived = DamageCalculator.CalculateDamage(damage, DefenseComponent.CurrentDefense.Value + EquipmentComponent.BonusDefense, EquipmentComponent.ElementalResistance);
HealthComponent.Damage(damageReceived);
SfxDatabase.Instance.Play(SoundEffect.TakeDamage);
}
public void Knockback(float impulse)
{
_knockbackStrength = impulse;
_knockbackDirection = GlobalBasis.Z.Normalized();
_knockbackStrength = impulse;
_knockbackDirection = GlobalBasis.Z.Normalized();
}
public void LevelUp()
{
var rng = new RandomNumberGenerator();
rng.Randomize();
var hpIncrease = rng.RandiRange(3, 6);
HealthComponent.RaiseMaximumHP(hpIncrease);
ExperiencePointsComponent.LevelUp();
var rng = new RandomNumberGenerator();
rng.Randomize();
var hpIncrease = rng.RandiRange(3, 6);
HealthComponent.RaiseMaximumHP(hpIncrease);
ExperiencePointsComponent.LevelUp();
}
public void Die()
{
PlayerFXAnimations.Play("death");
HealthTimer.WaitTime = _healthTimerWaitTime;
HealthTimer.Timeout -= OnHealthTimerTimeout;
SetProcessInput(false);
SetPhysicsProcess(false);
PlayerDied?.Invoke();
PlayerFXAnimations.Play("death");
HealthTimer.WaitTime = _healthTimerWaitTime;
HealthTimer.Timeout -= OnHealthTimerTimeout;
SetProcessInput(false);
SetPhysicsProcess(false);
PlayerDied?.Invoke();
}
public override void _Input(InputEvent @event)
{
if (@event.IsActionPressed(GameInputs.Attack))
Attack();
if (@event.IsActionPressed(GameInputs.Sprint))
Settings.MoveSpeed *= 2;
if (@event.IsActionReleased(GameInputs.Sprint))
Settings.MoveSpeed /= 2;
if (@event.IsActionPressed(GameInputs.Attack))
Attack();
if (@event.IsActionPressed(GameInputs.Sprint))
Settings.MoveSpeed *= 2;
if (@event.IsActionReleased(GameInputs.Sprint))
Settings.MoveSpeed /= 2;
}
public void PlayTestAnimation()
{
PlayerFXAnimations.Play("test_animation");
PlayerFXAnimations.Play("test_animation");
}
public void OnPhysicsProcess(double delta)
{
PlayerLogic.Input(new PlayerLogic.Input.PhysicsTick(delta));
PlayerLogic.Input(new PlayerLogic.Input.Moved(GlobalPosition, GlobalTransform));
PlayerLogic.Input(new PlayerLogic.Input.PhysicsTick(delta));
PlayerLogic.Input(new PlayerLogic.Input.Moved(GlobalPosition, GlobalTransform));
}
public void Equip(EquipableItem equipable)
{
if (equipable.ItemTag == ItemTag.MysteryItem)
{
var rerolledItem = _itemReroller.RerollItem(equipable, Inventory);
Equip(rerolledItem);
return;
}
if (equipable.ItemTag == ItemTag.MysteryItem)
{
var rerolledItem = _itemReroller.RerollItem(equipable, Inventory);
Equip(rerolledItem);
return;
}
HealthComponent.RaiseMaximumHP(equipable.BonusHP, false);
VTComponent.RaiseMaximumVT(equipable.BonusVT, false);
HealthComponent.RaiseMaximumHP(equipable.BonusHP, false);
VTComponent.RaiseMaximumVT(equipable.BonusVT, false);
EquipmentComponent.Equip(equipable);
EquipmentComponent.Equip(equipable);
}
public void Unequip(EquipableItem equipable)
{
HealthComponent.SetMaximumHealth(HealthComponent.MaximumHP.Value - equipable.BonusHP);
VTComponent.SetMaximumVT(VTComponent.MaximumVT.Value - equipable.BonusVT);
HealthComponent.SetMaximumHealth(HealthComponent.MaximumHP.Value - equipable.BonusHP);
VTComponent.SetMaximumVT(VTComponent.MaximumVT.Value - equipable.BonusVT);
EquipmentComponent.Unequip(equipable);
EquipmentComponent.Unequip(equipable);
}
private static Vector3 GlobalInputVector
{
get
{
var rawInput = Input.GetVector(GameInputs.MoveLeft, GameInputs.MoveRight, GameInputs.MoveUp, GameInputs.MoveDown);
var input = new Vector3
{
X = rawInput.X,
Z = rawInput.Y
};
return input with { Y = 0f };
}
get
{
var rawInput = Input.GetVector(GameInputs.MoveLeft, GameInputs.MoveRight, GameInputs.MoveUp, GameInputs.MoveDown);
var input = new Vector3
{
X = rawInput.X,
Z = rawInput.Y
};
return input with { Y = 0f };
}
}
private static float LeftStrafeInputVector => Input.GetActionStrength(GameInputs.StrafeLeft);
@@ -296,143 +296,143 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
private void Attack()
{
if (PlayerIsHittingGeometry())
AnimationPlayer.Play("hit_wall");
else if (!AnimationPlayer.IsPlaying())
PlayAttackAnimation();
if (PlayerIsHittingGeometry())
AnimationPlayer.Play("hit_wall");
else if (!AnimationPlayer.IsPlaying())
PlayAttackAnimation();
}
private void ThrowItem()
{
var itemScene = GD.Load<PackedScene>("res://src/items/throwable/ThrowableItem.tscn");
var throwItem = itemScene.Instantiate<ThrowableItem>();
GetTree().Root.AddChildEx(throwItem);
throwItem.GlobalPosition = CurrentPosition + new Vector3(0, 3.5f, 0);
throwItem.GlobalRotation = GlobalRotation;
var itemScene = GD.Load<PackedScene>("res://src/items/throwable/ThrowableItem.tscn");
var throwItem = itemScene.Instantiate<ThrowableItem>();
GetTree().Root.AddChildEx(throwItem);
throwItem.GlobalPosition = CurrentPosition + new Vector3(0, 3.5f, 0);
throwItem.GlobalRotation = GlobalRotation;
}
private void PlayAttackAnimation()
{
SfxDatabase.Instance.Play(((Weapon)EquipmentComponent.EquippedWeapon.Value).SoundEffect);
var attackSpeed = ((Weapon)EquipmentComponent.EquippedWeapon.Value).AttackSpeed;
AnimationPlayer.SetSpeedScale((float)attackSpeed);
AnimationPlayer.Play("attack");
SfxDatabase.Instance.Play(((Weapon)EquipmentComponent.EquippedWeapon.Value).SoundEffect);
var attackSpeed = ((Weapon)EquipmentComponent.EquippedWeapon.Value).AttackSpeed;
AnimationPlayer.SetSpeedScale((float)attackSpeed);
AnimationPlayer.Play("attack");
}
private void OnExitTree()
{
PlayerLogic.Stop();
PlayerBinding.Dispose();
Hitbox.AreaEntered -= Hitbox_AreaEntered;
CollisionDetector.AreaEntered -= CollisionDetector_AreaEntered;
HealthComponent.HealthReachedZero -= Die;
HealthTimer.Timeout -= OnHealthTimerTimeout;
PlayerLogic.Stop();
PlayerBinding.Dispose();
Hitbox.AreaEntered -= Hitbox_AreaEntered;
CollisionDetector.AreaEntered -= CollisionDetector_AreaEntered;
HealthComponent.HealthReachedZero -= Die;
HealthTimer.Timeout -= OnHealthTimerTimeout;
}
private void Move(float delta)
{
var rawInput = GlobalInputVector;
var strafeLeftInput = LeftStrafeInputVector;
var strafeRightInput = RightStrafeInputVector;
var rawInput = GlobalInputVector;
var strafeLeftInput = LeftStrafeInputVector;
var strafeRightInput = RightStrafeInputVector;
var transform = Transform;
transform.Basis = new Basis(Vector3.Up, Settings.RotationSpeed * -rawInput.X * delta) * transform.Basis;
var moveDirection = new Vector3(strafeRightInput - strafeLeftInput, 0, rawInput.Z).Normalized();
var velocity = Basis * moveDirection * Settings.MoveSpeed * Settings.Acceleration;
_knockbackStrength *= 0.9f;
Transform = Transform with { Basis = transform.Basis };
Velocity = velocity + (_knockbackDirection * _knockbackStrength);
if (!WalkSFX.Playing && !Velocity.IsZeroApprox())
WalkSFX.Play();
else if (Velocity.IsZeroApprox())
WalkSFX.Stop();
MoveAndSlide();
var transform = Transform;
transform.Basis = new Basis(Vector3.Up, Settings.RotationSpeed * -rawInput.X * delta) * transform.Basis;
var moveDirection = new Vector3(strafeRightInput - strafeLeftInput, 0, rawInput.Z).Normalized();
var velocity = Basis * moveDirection * Settings.MoveSpeed * Settings.Acceleration;
_knockbackStrength *= 0.9f;
Transform = Transform with { Basis = transform.Basis };
Velocity = velocity + (_knockbackDirection * _knockbackStrength);
if (!WalkSFX.Playing && !Velocity.IsZeroApprox())
WalkSFX.Play();
else if (Velocity.IsZeroApprox())
WalkSFX.Stop();
MoveAndSlide();
}
private void OnPlayerPositionUpdated(Vector3 globalPosition) => GlobalPosition = globalPosition;
private void OnHealthTimerTimeout()
{
if (VTComponent.CurrentVT.Value > 0)
{
if (((Accessory)EquipmentComponent.EquippedAccessory.Value).AccessoryTag == AccessoryTag.HalfVTConsumption)
reduceOnTick = !reduceOnTick;
if (VTComponent.CurrentVT.Value > 0)
{
if (((Accessory)EquipmentComponent.EquippedAccessory.Value).AccessoryTag == AccessoryTag.HalfVTConsumption)
reduceOnTick = !reduceOnTick;
HealthComponent.Heal(1);
HealthComponent.Heal(1);
if (reduceOnTick)
VTComponent.Reduce(1);
}
else
HealthComponent.Damage(1);
if (reduceOnTick)
VTComponent.Reduce(1);
}
else
HealthComponent.Damage(1);
}
private void Hitbox_AreaEntered(Area3D area)
{
var target = area.GetOwner();
if (target is IEnemy enemy)
HitEnemy(enemy);
var target = area.GetOwner();
if (target is IEnemy enemy)
HitEnemy(enemy);
}
private void HitEnemy(IEnemy enemy)
{
var ignoreElementalResistance = (EquipmentComponent.EquippedWeapon.Value as Weapon).WeaponTag == WeaponTag.IgnoreAffinity;
var ignoreDefense = (EquipmentComponent.EquippedWeapon.Value as Weapon).WeaponTag == WeaponTag.IgnoreDefense;
var isCriticalHit = BattleExtensions.IsCriticalHit(LuckComponent.Luck.Value + EquipmentComponent.BonusLuck);
var totalDamage = AttackComponent.CurrentAttack.Value + EquipmentComponent.BonusAttack;
var element = (EquipmentComponent.EquippedWeapon.Value as Weapon).WeaponElement;
var ignoreElementalResistance = (EquipmentComponent.EquippedWeapon.Value as Weapon).WeaponTag == WeaponTag.IgnoreAffinity;
var ignoreDefense = (EquipmentComponent.EquippedWeapon.Value as Weapon).WeaponTag == WeaponTag.IgnoreDefense;
var isCriticalHit = BattleExtensions.IsCriticalHit(LuckComponent.Luck.Value + EquipmentComponent.BonusLuck);
var totalDamage = AttackComponent.CurrentAttack.Value + EquipmentComponent.BonusAttack;
var element = (EquipmentComponent.EquippedWeapon.Value as Weapon).WeaponElement;
if (isCriticalHit)
{
totalDamage += (int)(totalDamage * 0.5f);
SfxDatabase.Instance.Play(SoundEffect.Crit);
}
if (isCriticalHit)
{
totalDamage += (int)(totalDamage * 0.5f);
SfxDatabase.Instance.Play(SoundEffect.Crit);
}
var baseAttack = new AttackData(totalDamage, element, ignoreDefense, ignoreElementalResistance);
var damageDealt = DamageCalculator.CalculateDamage(baseAttack, enemy.DefenseComponent.CurrentDefense.Value, ElementalResistanceSet.None);
enemy.HealthComponent.Damage(damageDealt);
var baseAttack = new AttackData(totalDamage, element, ignoreDefense, ignoreElementalResistance);
var damageDealt = DamageCalculator.CalculateDamage(baseAttack, enemy.DefenseComponent.CurrentDefense.Value, ElementalResistanceSet.None);
enemy.HealthComponent.Damage(damageDealt);
if (((Weapon)EquipmentComponent.EquippedWeapon.Value).WeaponTag == WeaponTag.Knockback && enemy is IKnockbackable knockbackable)
knockbackable.Knockback(0.3f, -CurrentBasis.Z.Normalized());
if (((Weapon)EquipmentComponent.EquippedWeapon.Value).WeaponTag == WeaponTag.SelfDamage)
HealthComponent.Damage(5);
if (((Weapon)EquipmentComponent.EquippedWeapon.Value).WeaponTag == WeaponTag.Knockback && enemy is IKnockbackable knockbackable)
knockbackable.Knockback(0.3f, -CurrentBasis.Z.Normalized());
if (((Weapon)EquipmentComponent.EquippedWeapon.Value).WeaponTag == WeaponTag.SelfDamage)
HealthComponent.Damage(5);
}
private void CollisionDetector_AreaEntered(Area3D area)
{
if (area.GetParent() is InventoryItem inventoryItem)
{
var isAdded = Inventory.PickUpItem(inventoryItem);
if (isAdded)
inventoryItem.QueueFree();
}
if (area.GetParent() is DroppedItem droppedItem)
{
var isAdded = Inventory.PickUpItem(droppedItem.Item);
if (isAdded)
droppedItem.QueueFree();
}
if (area.GetParent() is ThrownItem thrownItem)
{
var isAdded = Inventory.PickUpItem(thrownItem.ItemThatIsThrown);
if (isAdded)
thrownItem.QueueFree();
}
if (area.GetParent() is Restorative restorative)
{
restorative.QueueFree();
}
if (area.GetParent() is InventoryItem inventoryItem)
{
var isAdded = Inventory.PickUpItem(inventoryItem);
if (isAdded)
inventoryItem.QueueFree();
}
if (area.GetParent() is DroppedItem droppedItem)
{
var isAdded = Inventory.PickUpItem(droppedItem.Item);
if (isAdded)
droppedItem.QueueFree();
}
if (area.GetParent() is ThrownItem thrownItem)
{
var isAdded = Inventory.PickUpItem(thrownItem.ItemThatIsThrown);
if (isAdded)
thrownItem.QueueFree();
}
if (area.GetParent() is Restorative restorative)
{
restorative.QueueFree();
}
}
private bool PlayerIsHittingGeometry()
{
var collisions = WallCheck.GetCollidingBodies();
return collisions.Count > 0;
var collisions = WallCheck.GetCollidingBodies();
return collisions.Count > 0;
}
private void WallCheck_BodyEntered(Node body)
{
GD.Print("Hit wall");
AnimationPlayer.Stop();
GD.Print("Hit wall");
AnimationPlayer.Stop();
}
}

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=63 format=3 uid="uid://cfecvvav8kkp6"]
[gd_scene load_steps=69 format=3 uid="uid://cfecvvav8kkp6"]
[ext_resource type="Script" uid="uid://yxmiqy7i0t7r" path="res://src/player/Player.cs" id="1_xcol5"]
[ext_resource type="PackedScene" uid="uid://didc6vnf5ftlg" path="res://src/camera/ShakeCamera.tscn" id="2_jtmj1"]
@@ -7,7 +7,9 @@
[ext_resource type="Shader" uid="uid://dfk3eps71yyyl" path="res://src/player/InvertColors.gdshader" id="4_v5qoq"]
[ext_resource type="Texture2D" uid="uid://2ig1arptr1e8" path="res://src/vfx/Items Etc/slash_2.png" id="4_v7rlw"]
[ext_resource type="Texture2D" uid="uid://qhxl3nejqlk1" path="res://src/vfx/World/DUST_1.png" id="5_v5qoq"]
[ext_resource type="Texture2D" uid="uid://b66pc64qac8g7" path="res://src/vfx/manualmessed.png" id="6_bj1ma"]
[ext_resource type="AudioStream" uid="uid://bsprdc3ka6am0" path="res://src/audio/sfx/player_steps_concrete.ogg" id="6_v7rlw"]
[ext_resource type="Shader" uid="uid://c7vqfctycv1eg" path="res://src/vfx/OnscreenEffect_Mystical.gdshader" id="9_bj1ma"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_dw45s"]
radius = 1.0
@@ -223,63 +225,29 @@ tracks/6/keys = {
"update": 0,
"values": [Vector3(1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_ebyyx"]
resource_name = "hit_wall"
length = 0.155558
step = 0.0222222
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("SubViewportContainer/SubViewport/WeaponAttack:animation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.0001),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [&"hit_wall", &"hit_wall"]
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("SubViewportContainer/SubViewport/Prosc Message:texture")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [null]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("SubViewportContainer/SubViewport/WeaponAttack:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.155556),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0, 7]
}
[sub_resource type="Animation" id="Animation_v5qoq"]
resource_name = "normal_attack"
length = 0.666669
step = 0.0222222
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("SubViewportContainer/SubViewport/WeaponAttack:animation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
tracks/8/type = "value"
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/path = NodePath("SubViewportContainer/SubViewport/Prosc Message:modulate")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [&"normal_slash"]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("SubViewportContainer/SubViewport/WeaponAttack:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.666667),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0, 30]
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_es4xk"]
@@ -346,12 +314,114 @@ tracks/4/keys = {
"values": [Vector3(1, 1, 1), Vector3(1, 1, 0)]
}
[sub_resource type="Animation" id="Animation_ebyyx"]
resource_name = "hit_wall"
length = 0.155558
step = 0.0222222
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("SubViewportContainer/SubViewport/WeaponAttack:animation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.0001),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [&"hit_wall", &"hit_wall"]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("SubViewportContainer/SubViewport/WeaponAttack:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.155556),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0, 7]
}
[sub_resource type="Animation" id="Animation_v5qoq"]
resource_name = "normal_attack"
length = 0.666669
step = 0.0222222
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("SubViewportContainer/SubViewport/WeaponAttack:animation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [&"normal_slash"]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("SubViewportContainer/SubViewport/WeaponAttack:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.666667),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0, 30]
}
[sub_resource type="Animation" id="Animation_wvcio"]
resource_name = "test_animation"
length = 5.0005
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("SubViewportContainer/SubViewport/Prosc Message:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 4.2),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [ExtResource("6_bj1ma"), ExtResource("6_bj1ma")]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("SubViewportContainer/SubViewport/Prosc Message:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.6, 1.6, 2.6, 3.6, 4.16667),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1), Color(1, 1, 1, 0.48), Color(1, 1, 1, 1), Color(1, 1, 1, 0.48), Color(1, 1, 1, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ebyyx"]
_data = {
&"RESET": SubResource("Animation_jtmj1"),
&"death": SubResource("Animation_es4xk"),
&"hit_wall": SubResource("Animation_ebyyx"),
&"normal_attack": SubResource("Animation_v5qoq")
&"normal_attack": SubResource("Animation_v5qoq"),
&"test_animation": SubResource("Animation_wvcio")
}
[sub_resource type="Animation" id="Animation_ojh85"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("SubViewportContainer/SubViewport/ColorRect:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 0)]
}
[sub_resource type="Animation" id="Animation_g183x"]
@@ -370,21 +440,6 @@ tracks/0/keys = {
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 0.623529), Color(1, 1, 1, 0)]
}
[sub_resource type="Animation" id="Animation_ojh85"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("SubViewportContainer/SubViewport/ColorRect:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ojh85"]
_data = {
&"RESET": SubResource("Animation_ojh85"),
@@ -658,6 +713,23 @@ animations = [{
"speed": 5.0
}]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_bj1ma"]
noise_type = 3
frequency = 0.2269
fractal_type = 0
fractal_lacunarity = 1.335
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_es4xk"]
seamless = true
noise = SubResource("FastNoiseLite_bj1ma")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_es4xk"]
shader = ExtResource("9_bj1ma")
shader_parameter/scale = Vector2(1, 1)
shader_parameter/strength = 0.164
shader_parameter/fps = 17.445
shader_parameter/noise = SubResource("NoiseTexture2D_es4xk")
[node name="Player" type="CharacterBody3D"]
collision_layer = 802
collision_mask = 775
@@ -816,6 +888,11 @@ grow_horizontal = 2
grow_vertical = 2
color = Color(1, 1, 1, 0)
[node name="Prosc Message" type="Sprite2D" parent="ScreenFX/SubViewportContainer/SubViewport"]
texture_filter = 1
material = SubResource("ShaderMaterial_es4xk")
position = Vector2(764, 544)
[node name="HitWallSound" type="AudioStreamPlayer" parent="."]
unique_name_in_owner = true
bus = &"SFX"

View File

@@ -31,28 +31,28 @@ public partial class DeathMenu : Control, IDeathMenu
public void OnReady()
{
Continue.Pressed += Continue_Pressed;
Exit.Pressed += Exit_Pressed;
VisibilityChanged += DeathMenu_VisibilityChanged;
Continue.Pressed += Continue_Pressed;
Exit.Pressed += Exit_Pressed;
VisibilityChanged += DeathMenu_VisibilityChanged;
}
private void DeathMenu_VisibilityChanged()
{
if (Visible)
Continue.CallDeferred(MethodName.GrabFocus, []);
else
ReleaseFocus();
if (Visible)
Continue.CallDeferred(MethodName.GrabFocus, []);
else
ReleaseFocus();
}
private void Exit_Pressed()
{
EmitSignal(SignalName.QuitGame);
EmitSignal(SignalName.QuitGame);
}
private void Continue_Pressed()
{
FadeOut();
EmitSignal(SignalName.NewGame);
FadeOut();
EmitSignal(SignalName.NewGame);
}
public void FadeIn() => AnimationPlayer.Play("fade_in");

View File

@@ -56,8 +56,8 @@ public partial class GalleryMenu : Control
public void OnReady()
{
GalleryData = new GalleryData() { PlaceholderImage1 = true };
BackButton.Pressed += BackButton_Pressed;
GalleryData = new GalleryData() { PlaceholderImage1 = true };
BackButton.Pressed += BackButton_Pressed;
}
private void BackButton_Pressed() => EmitSignal(SignalName.GalleryExited);

View File

@@ -35,6 +35,7 @@ size_flags_horizontal = 3
size_flags_vertical = 3
[node name="TextureRect" type="TextureRect" parent="Control"]
texture_filter = 2
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0

View File

@@ -40,32 +40,32 @@ public partial class LoadNextLevel : Control, IFloorClearMenu
public void OnResolved()
{
_player.ExperiencePointsComponent.Level.Sync += Level_Sync;
_player.ExperiencePointsComponent.CurrentExp.Sync += Exp_Sync;
_player.ExperiencePointsComponent.ExpToNextLevel.Sync += Exp_Sync;
_player.HealthComponent.CurrentHP.Sync += HP_Sync;
_player.HealthComponent.MaximumHP.Sync += HP_Sync;
_player.VTComponent.CurrentVT.Sync += VT_Sync;
_player.VTComponent.MaximumVT.Sync += VT_Sync;
_player.AttackComponent.CurrentAttack.Sync += Attack_Sync;
_player.AttackComponent.MaximumAttack.Sync += Attack_Sync;
_player.DefenseComponent.CurrentDefense.Sync += Defense_Sync;
_player.DefenseComponent.MaximumDefense.Sync += Defense_Sync;
_player.EquipmentComponent.EquipmentChanged += EquipmentComponent_EquipmentChanged;
_map.CurrentFloorNumber.Sync += CurrentFloorNumber_Sync;
_player.ExperiencePointsComponent.Level.Sync += Level_Sync;
_player.ExperiencePointsComponent.CurrentExp.Sync += Exp_Sync;
_player.ExperiencePointsComponent.ExpToNextLevel.Sync += Exp_Sync;
_player.HealthComponent.CurrentHP.Sync += HP_Sync;
_player.HealthComponent.MaximumHP.Sync += HP_Sync;
_player.VTComponent.CurrentVT.Sync += VT_Sync;
_player.VTComponent.MaximumVT.Sync += VT_Sync;
_player.AttackComponent.CurrentAttack.Sync += Attack_Sync;
_player.AttackComponent.MaximumAttack.Sync += Attack_Sync;
_player.DefenseComponent.CurrentDefense.Sync += Defense_Sync;
_player.DefenseComponent.MaximumDefense.Sync += Defense_Sync;
_player.EquipmentComponent.EquipmentChanged += EquipmentComponent_EquipmentChanged;
_map.CurrentFloorNumber.Sync += CurrentFloorNumber_Sync;
AnimationPlayer.AnimationFinished += AnimationPlayer_AnimationFinished;
AnimationPlayer.AnimationStarted += AnimationPlayer_AnimationStarted;
ContinueButton.Pressed += ContinueButton_Pressed;
ExitButton.Pressed += ExitButton_Pressed;
AnimationPlayer.AnimationFinished += AnimationPlayer_AnimationFinished;
AnimationPlayer.AnimationStarted += AnimationPlayer_AnimationStarted;
ContinueButton.Pressed += ContinueButton_Pressed;
ExitButton.Pressed += ExitButton_Pressed;
}
private void CurrentFloorNumber_Sync(int _) => FloorNumber.Text = _map.CurrentFloorNumber.Value.ToString("D2");
private void EquipmentComponent_EquipmentChanged(EquipableItem obj)
{
Attack_Sync(0);
Defense_Sync(0);
Attack_Sync(0);
Defense_Sync(0);
}
private void Attack_Sync(int _) => ATKLabel.Text = $"{_player.AttackComponent.CurrentAttack.Value}/{_player.AttackComponent.MaximumAttack.Value}+{_player.EquipmentComponent.BonusAttack}";
@@ -78,35 +78,35 @@ public partial class LoadNextLevel : Control, IFloorClearMenu
private void ExitButton_Pressed()
{
ContinueButton.Disabled = true;
ExitButton.Disabled = true;
FadeOut();
Exit?.Invoke();
ContinueButton.Disabled = true;
ExitButton.Disabled = true;
FadeOut();
Exit?.Invoke();
}
private void ContinueButton_Pressed()
{
ContinueButton.Disabled = true;
ExitButton.Disabled = true;
GoToNextFloor?.Invoke();
ContinueButton.Disabled = true;
ExitButton.Disabled = true;
GoToNextFloor?.Invoke();
}
private void AnimationPlayer_AnimationStarted(StringName animName)
{
if (animName == "fade_in")
ContinueButton.CallDeferred(MethodName.GrabFocus);
if (animName == "fade_out")
CallDeferred(MethodName.ReleaseFocus);
if (animName == "fade_in")
ContinueButton.CallDeferred(MethodName.GrabFocus);
if (animName == "fade_out")
CallDeferred(MethodName.ReleaseFocus);
}
private void AnimationPlayer_AnimationFinished(StringName animName)
{
if (animName == "fade_in")
{
ContinueButton.Disabled = false;
ExitButton.Disabled = false;
}
if (animName == "fade_out")
TransitionCompleted?.Invoke();
if (animName == "fade_in")
{
ContinueButton.Disabled = false;
ExitButton.Disabled = false;
}
if (animName == "fade_out")
TransitionCompleted?.Invoke();
}
}

View File

@@ -37,38 +37,38 @@ public partial class PlayerInfoUI : Control, IPlayerInfoUI
public void Activate()
{
Player.HealthComponent.CurrentHP.Sync += HPSync;
Player.HealthComponent.MaximumHP.Sync += HPSync;
Player.HealthComponent.CurrentHP.Sync += HPSync;
Player.HealthComponent.MaximumHP.Sync += HPSync;
Player.VTComponent.CurrentVT.Sync += VTSync;
Player.VTComponent.MaximumVT.Sync += VTSync;
Player.VTComponent.CurrentVT.Sync += VTSync;
Player.VTComponent.MaximumVT.Sync += VTSync;
Player.ExperiencePointsComponent.Level.Sync += CurrentLevel_Sync;
Player.ExperiencePointsComponent.CurrentExp.Sync += ExpSync;
Player.ExperiencePointsComponent.ExpToNextLevel.Sync += ExpSync;
Player.ExperiencePointsComponent.Level.Sync += CurrentLevel_Sync;
Player.ExperiencePointsComponent.CurrentExp.Sync += ExpSync;
Player.ExperiencePointsComponent.ExpToNextLevel.Sync += ExpSync;
}
private void CurrentLevel_Sync(int obj)
{
LevelNumber.Text = $"{obj}";
LevelNumber.Text = $"{obj}";
}
private void VTSync(int obj)
{
VTNumber.Text = $"{Player.VTComponent.CurrentVT.Value}/{Player.VTComponent.MaximumVT.Value}";
VTProgressBar.Value = Player.VTComponent.CurrentVT.Value;
VTProgressBar.MaxValue = Player.VTComponent.MaximumVT.Value;
VTNumber.Text = $"{Player.VTComponent.CurrentVT.Value}/{Player.VTComponent.MaximumVT.Value}";
VTProgressBar.Value = Player.VTComponent.CurrentVT.Value;
VTProgressBar.MaxValue = Player.VTComponent.MaximumVT.Value;
}
private void HPSync(int obj)
{
HPNumber.Text = $"{Player.HealthComponent.CurrentHP.Value}/{Player.HealthComponent.MaximumHP.Value}";
HPProgressBar.Value = Player.HealthComponent.CurrentHP.Value;
HPProgressBar.MaxValue = Player.HealthComponent.MaximumHP.Value;
HPNumber.Text = $"{Player.HealthComponent.CurrentHP.Value}/{Player.HealthComponent.MaximumHP.Value}";
HPProgressBar.Value = Player.HealthComponent.CurrentHP.Value;
HPProgressBar.MaxValue = Player.HealthComponent.MaximumHP.Value;
}
private void ExpSync(int obj)
{
EXPNumber.Text = $"{Player.ExperiencePointsComponent.CurrentExp.Value}/{Player.ExperiencePointsComponent.ExpToNextLevel.Value}";
EXPNumber.Text = $"{Player.ExperiencePointsComponent.CurrentExp.Value}/{Player.ExperiencePointsComponent.ExpToNextLevel.Value}";
}
}

View File

@@ -0,0 +1,19 @@
shader_type canvas_item;
uniform float time:hint_range(0.0, 1.57, 0.001) = 1.0;
uniform vec2 custom_resolution = vec2(100,100);
float rand(vec2 co){
return fract(sin(dot(co.xy ,vec2(12.9898,96.233))) * 43758.5453);
}
void fragment()
{
vec2 within_texture_pixel=vec2(floor(UV * custom_resolution));
vec4 color= texture(TEXTURE,UV);
if(sin(time) > rand(within_texture_pixel))
COLOR = color;
else
COLOR = vec4(0.0,0.0,0.0,0.0);
}

View File

@@ -0,0 +1 @@
uid://bbagt253uq4mq

View File

@@ -0,0 +1,38 @@
shader_type canvas_item;
render_mode world_vertex_coords;
group_uniforms Squiggle;
/**
* Noise texture scale
* By default, the noise texture's size in world coordinates is set by its resolution
*/
uniform vec2 scale = vec2(1.0);
uniform float strength = 1.0;
/**
* Number of squiggle frames per second
*/
uniform float fps = 6.0;
uniform sampler2D noise : filter_linear, repeat_enable;
group_uniforms;
varying vec4 modulate;
varying vec2 noise_uv;
void vertex() {
modulate = COLOR;
// Use world coordinates for scale-independent squiggles, offset by position to keep pattern attached to object
noise_uv = (VERTEX - MODEL_MATRIX[3].xy) / (vec2(textureSize(noise, 0)) * scale);
}
// Use irrational constants for unique squiggles every frame
#define offset_multiplier vec2(PI, E)
void fragment() {
vec2 noise_offset = vec2(floor(TIME * fps)) * offset_multiplier;
float noise_sample = texture(noise, noise_uv + noise_offset).r * 4.0 * PI;
vec2 direction = vec2(cos(noise_sample), sin(noise_sample));
vec2 squiggle_uv = UV + direction * strength * 0.005;
COLOR = texture(TEXTURE, squiggle_uv) * modulate;
}

View File

@@ -0,0 +1 @@
uid://c7vqfctycv1eg

View File

@@ -0,0 +1,11 @@
[gd_resource type="VisualShader" format=3 uid="uid://ce7t1f7ywglsb"]
[resource]
code = "shader_type canvas_item;
render_mode blend_mix;
"
mode = 1
flags/light_only = false

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b66pc64qac8g7"
path="res://.godot/imported/manualmessed.png-071e01a678f588204ea954a5ded169d5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/vfx/manualmessed.png"
dest_files=["res://.godot/imported/manualmessed.png-071e01a678f588204ea954a5ded169d5.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://wy3dim216kqx"
path="res://.godot/imported/testpro.png-eb7f36e4299c216e5faff4e26f714759.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/vfx/testpro.png"
dest_files=["res://.godot/imported/testpro.png-eb7f36e4299c216e5faff4e26f714759.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0