update to godot v4
This commit is contained in:
parent
95c7976f14
commit
67e71181f6
|
@ -1,8 +1,9 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/escher_convex_concave.jpg-aad7b984721eed80e7b3645478172e11.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://suyulwtqoyec"
|
||||
path="res://.godot/imported/escher_convex_concave.jpg-aad7b984721eed80e7b3645478172e11.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
@ -10,25 +11,24 @@ metadata={
|
|||
[deps]
|
||||
|
||||
source_file="res://assets/artworks/escher_convex_concave.jpg"
|
||||
dest_files=[ "res://.import/escher_convex_concave.jpg-aad7b984721eed80e7b3645478172e11.stex" ]
|
||||
dest_files=["res://.godot/imported/escher_convex_concave.jpg-aad7b984721eed80e7b3645478172e11.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
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/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
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 +1,9 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/escher_lizards.jpg-6d8ffd09737747dd30c293cf429cf003.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b87nwpig87ssi"
|
||||
path="res://.godot/imported/escher_lizards.jpg-6d8ffd09737747dd30c293cf429cf003.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
@ -10,25 +11,24 @@ metadata={
|
|||
[deps]
|
||||
|
||||
source_file="res://assets/artworks/escher_lizards.jpg"
|
||||
dest_files=[ "res://.import/escher_lizards.jpg-6d8ffd09737747dd30c293cf429cf003.stex" ]
|
||||
dest_files=["res://.godot/imported/escher_lizards.jpg-6d8ffd09737747dd30c293cf429cf003.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
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/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
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 +1,9 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/hokusai.jpg-e34bef5c2c01e91fd3f7fbd65bf1bb63.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ch448afhj21kn"
|
||||
path="res://.godot/imported/hokusai.jpg-e34bef5c2c01e91fd3f7fbd65bf1bb63.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
@ -10,25 +11,24 @@ metadata={
|
|||
[deps]
|
||||
|
||||
source_file="res://assets/artworks/hokusai.jpg"
|
||||
dest_files=[ "res://.import/hokusai.jpg-e34bef5c2c01e91fd3f7fbd65bf1bb63.stex" ]
|
||||
dest_files=["res://.godot/imported/hokusai.jpg-e34bef5c2c01e91fd3f7fbd65bf1bb63.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
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/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
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,6 +1,6 @@
|
|||
[gd_resource type="DynamicFont" load_steps=2 format=2]
|
||||
[gd_resource type="FontFile" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://assets/fonts/Montserrat-ExtraBold.otf" type="DynamicFontData" id=1]
|
||||
[ext_resource path="res://assets/fonts/Montserrat-ExtraBold.otf" type="FontFile" id=1]
|
||||
|
||||
[resource]
|
||||
size = 36
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,8 +1,9 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon_folder.png-b3a2a9bdd4c609fb3eeaba30c71ceb5a.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://divxq2g2ymkta"
|
||||
path="res://.godot/imported/icon_folder.png-b3a2a9bdd4c609fb3eeaba30c71ceb5a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
@ -10,25 +11,24 @@ metadata={
|
|||
[deps]
|
||||
|
||||
source_file="res://assets/icon_folder.png"
|
||||
dest_files=[ "res://.import/icon_folder.png-b3a2a9bdd4c609fb3eeaba30c71ceb5a.stex" ]
|
||||
dest_files=["res://.godot/imported/icon_folder.png-b3a2a9bdd4c609fb3eeaba30c71ceb5a.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
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/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
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 +1,9 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon_parent_folder.png-28fe9c21193d111a87cc30b6d49f5418.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cv2p52ibv3gwm"
|
||||
path="res://.godot/imported/icon_parent_folder.png-28fe9c21193d111a87cc30b6d49f5418.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
@ -10,25 +11,24 @@ metadata={
|
|||
[deps]
|
||||
|
||||
source_file="res://assets/icon_parent_folder.png"
|
||||
dest_files=[ "res://.import/icon_parent_folder.png-28fe9c21193d111a87cc30b6d49f5418.stex" ]
|
||||
dest_files=["res://.godot/imported/icon_parent_folder.png-28fe9c21193d111a87cc30b6d49f5418.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
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/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
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 +1,9 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/logo.svg-f0fea7f4c0900e3cf3563bd5e43c48d1.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://doxhwehu0cjd8"
|
||||
path="res://.godot/imported/logo.svg-f0fea7f4c0900e3cf3563bd5e43c48d1.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
@ -10,25 +11,27 @@ metadata={
|
|||
[deps]
|
||||
|
||||
source_file="res://assets/logo/logo.svg"
|
||||
dest_files=[ "res://.import/logo.svg-f0fea7f4c0900e3cf3563bd5e43c48d1.stex" ]
|
||||
dest_files=["res://.godot/imported/logo.svg-f0fea7f4c0900e3cf3563bd5e43c48d1.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
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/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/logo_512.png-52e0380d6068282002ce7e4da540a4c8.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b4tk1p7iwg8ev"
|
||||
path="res://.godot/imported/logo_512.png-52e0380d6068282002ce7e4da540a4c8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
@ -10,25 +11,24 @@ metadata={
|
|||
[deps]
|
||||
|
||||
source_file="res://assets/logo/logo_512.png"
|
||||
dest_files=[ "res://.import/logo_512.png-52e0380d6068282002ce7e4da540a4c8.stex" ]
|
||||
dest_files=["res://.godot/imported/logo_512.png-52e0380d6068282002ce7e4da540a4c8.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
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/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
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 +1,9 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/logo_android_192.png-d1092f8bdc9b8ae234b5684d3089068d.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dtcqacnu1f0y6"
|
||||
path="res://.godot/imported/logo_android_192.png-d1092f8bdc9b8ae234b5684d3089068d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
@ -10,25 +11,24 @@ metadata={
|
|||
[deps]
|
||||
|
||||
source_file="res://assets/logo/logo_android_192.png"
|
||||
dest_files=[ "res://.import/logo_android_192.png-d1092f8bdc9b8ae234b5684d3089068d.stex" ]
|
||||
dest_files=["res://.godot/imported/logo_android_192.png-d1092f8bdc9b8ae234b5684d3089068d.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
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/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
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 +1,9 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/logo_android_bg_432.png-bed8240198b34da49346f00ca02dd189.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cmcuio5kms1w7"
|
||||
path="res://.godot/imported/logo_android_bg_432.png-bed8240198b34da49346f00ca02dd189.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
@ -10,25 +11,24 @@ metadata={
|
|||
[deps]
|
||||
|
||||
source_file="res://assets/logo/logo_android_bg_432.png"
|
||||
dest_files=[ "res://.import/logo_android_bg_432.png-bed8240198b34da49346f00ca02dd189.stex" ]
|
||||
dest_files=["res://.godot/imported/logo_android_bg_432.png-bed8240198b34da49346f00ca02dd189.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
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/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
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 +1,9 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/logo_android_fg_432.png-41c23e93a296f808ef139e74532dbbec.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bded64ix0xlha"
|
||||
path="res://.godot/imported/logo_android_fg_432.png-41c23e93a296f808ef139e74532dbbec.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
@ -10,25 +11,24 @@ metadata={
|
|||
[deps]
|
||||
|
||||
source_file="res://assets/logo/logo_android_fg_432.png"
|
||||
dest_files=[ "res://.import/logo_android_fg_432.png-41c23e93a296f808ef139e74532dbbec.stex" ]
|
||||
dest_files=["res://.godot/imported/logo_android_fg_432.png-41c23e93a296f808ef139e74532dbbec.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
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/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
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,13 +1,14 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/PM_BBI_Bullet_Impact_Hit_Body_Flesh_2.wav-b392178f8c17e091ceb27ba6c6715408.sample"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bucgw5g1qhd25"
|
||||
path="res://.godot/imported/PM_BBI_Bullet_Impact_Hit_Body_Flesh_2.wav-b392178f8c17e091ceb27ba6c6715408.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/PM_BBI_Bullet_Impact_Hit_Body_Flesh_2.wav"
|
||||
dest_files=[ "res://.import/PM_BBI_Bullet_Impact_Hit_Body_Flesh_2.wav-b392178f8c17e091ceb27ba6c6715408.sample" ]
|
||||
dest_files=["res://.godot/imported/PM_BBI_Bullet_Impact_Hit_Body_Flesh_2.wav-b392178f8c17e091ceb27ba6c6715408.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
@ -17,5 +18,7 @@ force/max_rate=false
|
|||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/button_down.wav-42814080afc0d5a0c8dc6a3e923f8da2.sample"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://6prruwyafod2"
|
||||
path="res://.godot/imported/button_down.wav-42814080afc0d5a0c8dc6a3e923f8da2.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/button_down.wav"
|
||||
dest_files=[ "res://.import/button_down.wav-42814080afc0d5a0c8dc6a3e923f8da2.sample" ]
|
||||
dest_files=["res://.godot/imported/button_down.wav-42814080afc0d5a0c8dc6a3e923f8da2.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
@ -17,5 +18,7 @@ force/max_rate=false
|
|||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/button_up.wav-ec2800f415eaeb69cc2da5cd45fee5fc.sample"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://d2bcr15fhsxig"
|
||||
path="res://.godot/imported/button_up.wav-ec2800f415eaeb69cc2da5cd45fee5fc.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/button_up.wav"
|
||||
dest_files=[ "res://.import/button_up.wav-ec2800f415eaeb69cc2da5cd45fee5fc.sample" ]
|
||||
dest_files=["res://.godot/imported/button_up.wav-ec2800f415eaeb69cc2da5cd45fee5fc.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
@ -17,5 +18,7 @@ force/max_rate=false
|
|||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/lock_01.wav-54ccea9628672d8dd2a49ea43a3b9c4b.sample"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bknild65hxpvb"
|
||||
path="res://.godot/imported/lock_01.wav-54ccea9628672d8dd2a49ea43a3b9c4b.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/lock_01.wav"
|
||||
dest_files=[ "res://.import/lock_01.wav-54ccea9628672d8dd2a49ea43a3b9c4b.sample" ]
|
||||
dest_files=["res://.godot/imported/lock_01.wav-54ccea9628672d8dd2a49ea43a3b9c4b.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
@ -17,5 +18,7 @@ force/max_rate=false
|
|||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
||||
|
|
|
@ -1,62 +1,62 @@
|
|||
[gd_resource type="Theme" load_steps=8 format=2]
|
||||
[gd_resource type="Theme" load_steps=8 format=3 uid="uid://b7gu1bjpj8ixp"]
|
||||
|
||||
[ext_resource path="res://assets/fonts/OpenSans-SemiBold-24.tres" type="DynamicFont" id=1]
|
||||
[ext_resource type="FontFile" uid="uid://dys5hkbvmolh2" path="res://assets/fonts/OpenSans-SemiBold-24.tres" id="1"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
bg_color = Color( 0.12549, 0.235294, 0.337255, 1 )
|
||||
[sub_resource type="StyleBoxFlat" id="1"]
|
||||
bg_color = Color(0.12549, 0.235294, 0.337255, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=2]
|
||||
bg_color = Color( 0.12549, 0.235294, 0.337255, 1 )
|
||||
[sub_resource type="StyleBoxFlat" id="2"]
|
||||
bg_color = Color(0.12549, 0.235294, 0.337255, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=3]
|
||||
bg_color = Color( 0.12549, 0.235294, 0.337255, 1 )
|
||||
[sub_resource type="StyleBoxFlat" id="3"]
|
||||
bg_color = Color(0.12549, 0.235294, 0.337255, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=4]
|
||||
bg_color = Color( 0.0509804, 0.168627, 0.270588, 1 )
|
||||
[sub_resource type="StyleBoxFlat" id="4"]
|
||||
bg_color = Color(0.0509804, 0.168627, 0.270588, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=5]
|
||||
bg_color = Color( 1, 0.831373, 0.639216, 1 )
|
||||
[sub_resource type="StyleBoxFlat" id="5"]
|
||||
bg_color = Color(1, 0.831373, 0.639216, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=6]
|
||||
bg_color = Color( 1, 0.831373, 0.639216, 1 )
|
||||
[sub_resource type="StyleBoxFlat" id="6"]
|
||||
bg_color = Color(1, 0.831373, 0.639216, 1)
|
||||
border_width_left = 4
|
||||
border_width_top = 4
|
||||
border_width_right = 4
|
||||
border_width_bottom = 4
|
||||
border_color = Color( 0.12549, 0.235294, 0.337255, 1 )
|
||||
border_color = Color(0.12549, 0.235294, 0.337255, 1)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
shadow_size = 5
|
||||
shadow_offset = Vector2( 0, 5 )
|
||||
shadow_offset = Vector2(0, 5)
|
||||
|
||||
[resource]
|
||||
default_font = ExtResource( 1 )
|
||||
Button/colors/font_color = Color( 0.815686, 0.505882, 0.34902, 1 )
|
||||
Button/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 )
|
||||
Button/colors/font_color_hover = Color( 1, 0.92549, 0.839216, 1 )
|
||||
Button/colors/font_color_pressed = Color( 1, 0.92549, 0.839216, 1 )
|
||||
default_font = ExtResource("1")
|
||||
Button/colors/font_color = Color(0.815686, 0.505882, 0.34902, 1)
|
||||
Button/colors/font_color_disabled = Color(0.9, 0.9, 0.9, 0.2)
|
||||
Button/colors/font_color_hover = Color(1, 0.92549, 0.839216, 1)
|
||||
Button/colors/font_color_pressed = Color(1, 0.92549, 0.839216, 1)
|
||||
Button/constants/hseparation = 2
|
||||
Button/fonts/font = null
|
||||
Button/fonts/font = ExtResource("1")
|
||||
Button/styles/disabled = null
|
||||
Button/styles/focus = SubResource( 1 )
|
||||
Button/styles/hover = SubResource( 2 )
|
||||
Button/styles/normal = SubResource( 3 )
|
||||
Button/styles/pressed = SubResource( 4 )
|
||||
LineEdit/colors/clear_button_color = Color( 0.88, 0.88, 0.88, 1 )
|
||||
LineEdit/colors/clear_button_color_pressed = Color( 1, 1, 1, 1 )
|
||||
LineEdit/colors/cursor_color = Color( 0.94, 0.94, 0.94, 1 )
|
||||
LineEdit/colors/font_color = Color( 0.88, 0.88, 0.88, 1 )
|
||||
LineEdit/colors/font_color_selected = Color( 0, 0, 0, 1 )
|
||||
LineEdit/colors/font_color_uneditable = Color( 0.88, 0.88, 0.88, 0.5 )
|
||||
LineEdit/colors/selection_color = Color( 0.49, 0.49, 0.49, 1 )
|
||||
Button/styles/focus = SubResource("1")
|
||||
Button/styles/hover = SubResource("2")
|
||||
Button/styles/normal = SubResource("3")
|
||||
Button/styles/pressed = SubResource("4")
|
||||
LineEdit/colors/clear_button_color = Color(0.88, 0.88, 0.88, 1)
|
||||
LineEdit/colors/clear_button_color_pressed = Color(1, 1, 1, 1)
|
||||
LineEdit/colors/cursor_color = Color(0.94, 0.94, 0.94, 1)
|
||||
LineEdit/colors/font_color = Color(0.88, 0.88, 0.88, 1)
|
||||
LineEdit/colors/font_color_selected = Color(0, 0, 0, 1)
|
||||
LineEdit/colors/font_color_uneditable = Color(0.88, 0.88, 0.88, 0.5)
|
||||
LineEdit/colors/selection_color = Color(0.49, 0.49, 0.49, 1)
|
||||
LineEdit/constants/minimum_spaces = 8
|
||||
LineEdit/fonts/font = null
|
||||
LineEdit/fonts/font = ExtResource("1")
|
||||
LineEdit/icons/clear = null
|
||||
LineEdit/styles/focus = null
|
||||
LineEdit/styles/normal = null
|
||||
LineEdit/styles/read_only = null
|
||||
Panel/styles/panel = SubResource( 5 )
|
||||
PopupPanel/styles/panel = SubResource( 6 )
|
||||
Panel/styles/panel = SubResource("5")
|
||||
PopupPanel/styles/panel = SubResource("6")
|
||||
SpinBox/icons/updown = null
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[gd_resource type="Environment" load_steps=2 format=2]
|
||||
[gd_resource type="Environment" load_steps=2 format=3 uid="uid://67k71jff03ue"]
|
||||
|
||||
[sub_resource type="ProceduralSky" id=1]
|
||||
[sub_resource type="Sky" id="1"]
|
||||
|
||||
[resource]
|
||||
background_mode = 2
|
||||
background_sky = SubResource( 1 )
|
||||
sky = SubResource("1")
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dhn5unukdotkl"
|
||||
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
@ -10,25 +11,24 @@ metadata={
|
|||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
|
||||
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
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/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
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
|
||||
|
|
|
@ -6,46 +6,13 @@
|
|||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=4
|
||||
|
||||
_global_script_classes=[ {
|
||||
"base": "Control",
|
||||
"class": "DepthButton",
|
||||
"language": "GDScript",
|
||||
"path": "res://src/DepthButton.gd"
|
||||
}, {
|
||||
"base": "Panel",
|
||||
"class": "ImagePicker",
|
||||
"language": "GDScript",
|
||||
"path": "res://src/ImagePicker.gd"
|
||||
}, {
|
||||
"base": "PopupPanel",
|
||||
"class": "NewGamePanel",
|
||||
"language": "GDScript",
|
||||
"path": "res://src/NewGamePanel.gd"
|
||||
}, {
|
||||
"base": "Node2D",
|
||||
"class": "Piece",
|
||||
"language": "GDScript",
|
||||
"path": "res://src/Piece.gd"
|
||||
}, {
|
||||
"base": "Control",
|
||||
"class": "Taquin",
|
||||
"language": "GDScript",
|
||||
"path": "res://src/Taquin.gd"
|
||||
} ]
|
||||
_global_script_class_icons={
|
||||
"DepthButton": "",
|
||||
"ImagePicker": "",
|
||||
"NewGamePanel": "",
|
||||
"Piece": "",
|
||||
"Taquin": ""
|
||||
}
|
||||
config_version=5
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Taqin"
|
||||
run/main_scene="res://src/Main.tscn"
|
||||
config/features=PackedStringArray("4.3")
|
||||
config/icon="res://assets/logo/logo_512.png"
|
||||
|
||||
[autoload]
|
||||
|
@ -55,13 +22,12 @@ Styles="*res://src/Styles.gd"
|
|||
[display]
|
||||
|
||||
window/size/resizable=false
|
||||
window/size/test_width=600
|
||||
window/size/test_height=1200
|
||||
window/dpi/allow_hidpi=true
|
||||
window/size/window_width_override=600
|
||||
window/size/window_height_override=1200
|
||||
window/energy_saving/keep_screen_on=false
|
||||
window/handheld/orientation="portrait"
|
||||
window/size/width.mobile=600
|
||||
window/size/height.mobile=1200
|
||||
window/size/viewport_width.mobile=600
|
||||
window/size/viewport_height.mobile=1200
|
||||
window/stretch/aspect.mobile="expand"
|
||||
window/stretch/mode.mobile="2d"
|
||||
|
||||
|
@ -71,8 +37,8 @@ import/open_asset_import/use_fbx=false
|
|||
|
||||
[gui]
|
||||
|
||||
theme/use_hidpi=true
|
||||
theme/custom="res://assets/taqin_theme.tres"
|
||||
theme/use_hidpi=true
|
||||
|
||||
[input_devices]
|
||||
|
||||
|
@ -80,4 +46,4 @@ pointing/emulate_touch_from_mouse=true
|
|||
|
||||
[rendering]
|
||||
|
||||
environment/default_environment="res://default_env.tres"
|
||||
environment/defaults/default_environment="res://default_env.tres"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tool
|
||||
@tool
|
||||
class_name DepthButton
|
||||
extends Control
|
||||
|
||||
|
@ -7,37 +7,37 @@ signal button_down()
|
|||
signal button_up()
|
||||
signal toggled()
|
||||
|
||||
export var text := ""
|
||||
export(Styles.CornerType) var corner_type = Styles.CornerType.SINGLE
|
||||
export var corner_radius := 10
|
||||
export var depth := 10
|
||||
export var toggle_mode := false
|
||||
export var group: ButtonGroup
|
||||
@export var text := ""
|
||||
@export var corner_type = Styles.CornerType.SINGLE # (Styles.CornerType)
|
||||
@export var corner_radius := 10
|
||||
@export var depth := 10
|
||||
@export var toggle_mode := false
|
||||
@export var group: ButtonGroup
|
||||
|
||||
var pressed setget set_pressed, is_pressed
|
||||
var pressed : get = is_pressed, set = set_pressed
|
||||
|
||||
var _pressed_depth := 4
|
||||
var _toggled := false
|
||||
var _toggled_depth := _pressed_depth + 3
|
||||
|
||||
onready var background := $Background
|
||||
onready var button: Button = $Button
|
||||
@onready var background := $Background
|
||||
@onready var button: Button = $Button
|
||||
|
||||
func _ready():
|
||||
assert(_toggled_depth > _pressed_depth)
|
||||
|
||||
button.text = text
|
||||
button.margin_bottom = -depth
|
||||
button.offset_bottom = -depth
|
||||
button.toggle_mode = toggle_mode
|
||||
button.group = group
|
||||
button.rect_size.y = rect_size.y - depth
|
||||
button.size.y = size.y - depth
|
||||
|
||||
#
|
||||
# Styles
|
||||
#
|
||||
var background_style := Styles.get_stylebox_flat(background.get_stylebox("panel", "panel"), "button_background", corner_type)
|
||||
background_style.set_bg_color(Color(0.73, 0.35, 0.13))
|
||||
background.set('custom_styles/panel', background_style)
|
||||
background.set('theme_override_styles/panel', background_style)
|
||||
match corner_type:
|
||||
Styles.CornerType.SINGLE:
|
||||
background_style.corner_radius_bottom_left = corner_radius
|
||||
|
@ -91,15 +91,15 @@ func set_pressed(value: bool) -> void:
|
|||
# Signals
|
||||
#
|
||||
func _on_Button_button_down():
|
||||
button.rect_position.y = depth - _pressed_depth
|
||||
button.position.y = depth - _pressed_depth
|
||||
$AudioDown.play()
|
||||
emit_signal("button_down")
|
||||
|
||||
func _on_Button_button_up():
|
||||
if _toggled:
|
||||
button.rect_position.y = depth - _toggled_depth
|
||||
button.position.y = depth - _toggled_depth
|
||||
else:
|
||||
button.rect_position.y = 0
|
||||
button.position.y = 0
|
||||
$AudioUp.play()
|
||||
emit_signal("button_up")
|
||||
|
||||
|
@ -108,9 +108,9 @@ func _on_Button_toggled(button_pressed):
|
|||
return
|
||||
|
||||
if button_pressed:
|
||||
button.rect_position.y = depth - _toggled_depth
|
||||
button.position.y = depth - _toggled_depth
|
||||
else:
|
||||
button.rect_position.y = 0
|
||||
button.position.y = 0
|
||||
|
||||
_toggled = button_pressed
|
||||
emit_signal("toggled", _toggled)
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
[node name="DepthButton" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_right = -732.0
|
||||
margin_bottom = -452.0
|
||||
rect_min_size = Vector2( 200, 80 )
|
||||
offset_right = -732.0
|
||||
offset_bottom = -452.0
|
||||
custom_minimum_size = Vector2( 200, 80 )
|
||||
theme = ExtResource( 1 )
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
|
@ -30,7 +30,7 @@ __meta__ = {
|
|||
[node name="Button" type="Button" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_bottom = -10.0
|
||||
offset_bottom = -10.0
|
||||
text = "Press Me"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
|
@ -5,16 +5,16 @@ signal texture_selected(texture)
|
|||
|
||||
var _parent_display_name := "<parent directory>"
|
||||
var _sep := "/"
|
||||
var _dir := Directory.new()
|
||||
var _dir := DirAccess.new()
|
||||
|
||||
export var root_dir: String
|
||||
export var walkable := false
|
||||
export var folder_texture: Texture = null
|
||||
export var parent_folder_texture: Texture = null
|
||||
@export var root_dir: String
|
||||
@export var walkable := false
|
||||
@export var folder_texture: Texture2D = null
|
||||
@export var parent_folder_texture: Texture2D = null
|
||||
|
||||
func _ready():
|
||||
print_debug("root dir: ", root_dir)
|
||||
if root_dir != null and not root_dir.empty():
|
||||
if root_dir != null and not root_dir.is_empty():
|
||||
populate(root_dir)
|
||||
|
||||
func populate(dir: String) -> void:
|
||||
|
@ -26,7 +26,7 @@ func populate(dir: String) -> void:
|
|||
assert(false)
|
||||
return
|
||||
|
||||
_dir.list_dir_begin()
|
||||
_dir.list_dir_begin() # TODOConverter3To4 fill missing arguments https://github.com/godotengine/godot/pull/40547
|
||||
var file_name := _dir.get_next()
|
||||
while file_name != "":
|
||||
if _dir.current_is_dir():
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://src/FileList.gd" type="Script" id=1]
|
||||
[ext_resource path="res://assets/icon_parent_folder.png" type="Texture" id=2]
|
||||
[ext_resource path="res://assets/icon_folder.png" type="Texture" id=3]
|
||||
[ext_resource path="res://assets/icon_parent_folder.png" type="Texture2D" id=2]
|
||||
[ext_resource path="res://assets/icon_folder.png" type="Texture2D" id=3]
|
||||
|
||||
[node name="FileList" type="ItemList"]
|
||||
anchor_right = 1.0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tool
|
||||
@tool
|
||||
class_name ImagePicker
|
||||
extends Panel
|
||||
|
||||
|
@ -8,7 +8,7 @@ signal canceled()
|
|||
|
||||
var _fs_tab_index := 1
|
||||
|
||||
onready var fs_list := $VBoxContainer/TabContainer/Filesystem/FileList
|
||||
@onready var fs_list := $VBoxContainer/TabContainer/Filesystem/FileList
|
||||
|
||||
func _ready():
|
||||
# TODO: fix Android
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
[ext_resource path="res://src/ImagePicker.gd" type="Script" id=1]
|
||||
[ext_resource path="res://src/FileList.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://assets/artworks/hokusai.jpg" type="Texture" id=3]
|
||||
[ext_resource path="res://assets/artworks/escher_convex_concave.jpg" type="Texture" id=4]
|
||||
[ext_resource path="res://assets/artworks/escher_lizards.jpg" type="Texture" id=5]
|
||||
[ext_resource path="res://assets/artworks/hokusai.jpg" type="Texture2D" id=3]
|
||||
[ext_resource path="res://assets/artworks/escher_convex_concave.jpg" type="Texture2D" id=4]
|
||||
[ext_resource path="res://assets/artworks/escher_lizards.jpg" type="Texture2D" id=5]
|
||||
|
||||
[node name="ImagePicker" type="Panel"]
|
||||
anchor_right = 1.0
|
||||
|
@ -17,29 +17,29 @@ __meta__ = {
|
|||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_clip_content = true
|
||||
clip_contents = true
|
||||
alignment = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="TabContainer" type="TabContainer" parent="VBoxContainer"]
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 512.0
|
||||
offset_right = 1024.0
|
||||
offset_bottom = 512.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="App" type="Tabs" parent="VBoxContainer/TabContainer"]
|
||||
[node name="App" type="TabBar" parent="VBoxContainer/TabContainer"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 8.0
|
||||
margin_top = 61.0
|
||||
margin_right = -8.0
|
||||
margin_bottom = -8.0
|
||||
rect_clip_content = true
|
||||
offset_left = 8.0
|
||||
offset_top = 61.0
|
||||
offset_right = -8.0
|
||||
offset_bottom = -8.0
|
||||
clip_contents = true
|
||||
|
||||
[node name="FileList" parent="VBoxContainer/TabContainer/App" instance=ExtResource( 2 )]
|
||||
items = [ "", ExtResource( 4 ), false, "", ExtResource( 5 ), false, "", ExtResource( 3 ), false ]
|
||||
|
@ -47,24 +47,24 @@ root_dir = ""
|
|||
folder_texture = null
|
||||
parent_folder_texture = null
|
||||
|
||||
[node name="Filesystem" type="Tabs" parent="VBoxContainer/TabContainer"]
|
||||
[node name="Filesystem" type="TabBar" parent="VBoxContainer/TabContainer"]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 8.0
|
||||
margin_top = 61.0
|
||||
margin_right = -8.0
|
||||
margin_bottom = -8.0
|
||||
offset_left = 8.0
|
||||
offset_top = 61.0
|
||||
offset_right = -8.0
|
||||
offset_bottom = -8.0
|
||||
|
||||
[node name="FileList" parent="VBoxContainer/TabContainer/Filesystem" instance=ExtResource( 2 )]
|
||||
root_dir = ""
|
||||
walkable = true
|
||||
|
||||
[node name="Cancel" type="Button" parent="VBoxContainer"]
|
||||
margin_top = 520.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
rect_min_size = Vector2( 0, 80 )
|
||||
offset_top = 520.0
|
||||
offset_right = 1024.0
|
||||
offset_bottom = 600.0
|
||||
custom_minimum_size = Vector2( 0, 80 )
|
||||
text = "Cancel"
|
||||
flat = true
|
||||
__meta__ = {
|
||||
|
|
18
src/Main.gd
18
src/Main.gd
|
@ -1,12 +1,12 @@
|
|||
extends Control
|
||||
|
||||
onready var container = $GridContainer
|
||||
onready var taquin = $GridContainer/Taquin
|
||||
@onready var container = $GridContainer
|
||||
@onready var taquin = $GridContainer/Taquin
|
||||
|
||||
var _first_popup_call := true
|
||||
|
||||
func _ready():
|
||||
taquin.rect_min_size = get_viewport().get_visible_rect().size * (2.0 / 3.0)
|
||||
taquin.custom_minimum_size = get_viewport().get_visible_rect().size * (2.0 / 3.0)
|
||||
layout_reflow()
|
||||
if not load_game():
|
||||
start_fresh()
|
||||
|
@ -25,7 +25,7 @@ func layout_reflow():
|
|||
if container == null:
|
||||
return
|
||||
|
||||
if container.rect_size.x < container.rect_size.y:
|
||||
if container.size.x < container.size.y:
|
||||
# portrait
|
||||
container.columns = 1
|
||||
else:
|
||||
|
@ -51,7 +51,7 @@ func save_game():
|
|||
node_data["path"] = node.get_path()
|
||||
|
||||
# Store the save dictionary as a new line in the save file
|
||||
save_game.store_line(to_json(node_data))
|
||||
save_game.store_line(JSON.new().stringify(node_data))
|
||||
save_game.close()
|
||||
|
||||
func load_game():
|
||||
|
@ -62,9 +62,11 @@ func load_game():
|
|||
# Load the file line by line and process that dictionary to restore
|
||||
# the object it represents.
|
||||
save_game.open("user://savegame.save", File.READ)
|
||||
while save_game.get_position() < save_game.get_len():
|
||||
while save_game.get_position() < save_game.get_length():
|
||||
# Get the saved dictionary from the next line in the save file
|
||||
var node_data = parse_json(save_game.get_line())
|
||||
var test_json_conv = JSON.new()
|
||||
test_json_conv.parse(save_game.get_line())
|
||||
var node_data = test_json_conv.get_data()
|
||||
|
||||
# Call the node's save function
|
||||
var node = get_node(node_data["path"])
|
||||
|
@ -92,7 +94,7 @@ func _on_Taquin_state_changed(previous, new):
|
|||
pass
|
||||
|
||||
func _on_New_game_pressed():
|
||||
$NewGamePanel.rect_position = Vector2.ZERO
|
||||
$NewGamePanel.position = Vector2.ZERO
|
||||
if _first_popup_call:
|
||||
# We only call popup_centered() once, otherwise the popup shifts to the
|
||||
# bottom right after each call.
|
||||
|
|
|
@ -1,85 +1,64 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://cj4uqgtnylppu"]
|
||||
|
||||
[ext_resource path="res://src/Main.gd" type="Script" id=1]
|
||||
[ext_resource path="res://src/Taquin.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://src/NewGamePanel.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://src/DepthButton.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://assets/taqin_theme.tres" type="Theme" id=5]
|
||||
[ext_resource type="Script" path="res://src/Main.gd" id="1"]
|
||||
[ext_resource type="PackedScene" path="res://src/Taquin.tscn" id="2"]
|
||||
[ext_resource type="PackedScene" path="res://src/NewGamePanel.tscn" id="3"]
|
||||
[ext_resource type="PackedScene" path="res://src/DepthButton.tscn" id="4"]
|
||||
[ext_resource type="Theme" path="res://assets/taqin_theme.tres" id="5"]
|
||||
|
||||
[node name="Main" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
theme = ExtResource( 5 )
|
||||
script = ExtResource( 1 )
|
||||
theme = ExtResource("5")
|
||||
script = ExtResource("1")
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Background" type="Panel" parent="."]
|
||||
layout_mode = 0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
theme = ExtResource( 5 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
theme = ExtResource("5")
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="."]
|
||||
layout_mode = 0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 20.0
|
||||
margin_top = 20.0
|
||||
margin_right = -20.0
|
||||
margin_bottom = -20.0
|
||||
offset_left = 20.0
|
||||
offset_top = 20.0
|
||||
offset_right = -20.0
|
||||
offset_bottom = -20.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_constants/vseparation = 10
|
||||
custom_constants/hseparation = 10
|
||||
theme_override_constants/h_separation = 10
|
||||
theme_override_constants/v_separation = 10
|
||||
columns = 2
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Taquin" parent="GridContainer" groups=[
|
||||
"Persist",
|
||||
] instance=ExtResource( 2 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 540.0
|
||||
margin_bottom = 560.0
|
||||
[node name="Taquin" parent="GridContainer" groups=["Persist"] instance=ExtResource("2")]
|
||||
layout_mode = 2
|
||||
autoload_fresh_game = false
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="GridContainer"]
|
||||
margin_left = 550.0
|
||||
margin_right = 984.0
|
||||
margin_bottom = 560.0
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
alignment = 1
|
||||
|
||||
[node name="New Game" parent="GridContainer/VBoxContainer" instance=ExtResource( 4 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 206.0
|
||||
margin_right = 434.0
|
||||
margin_bottom = 276.0
|
||||
rect_min_size = Vector2( 0, 70 )
|
||||
[node name="New Game" parent="GridContainer/VBoxContainer" instance=ExtResource("4")]
|
||||
custom_minimum_size = Vector2(0, 70)
|
||||
layout_mode = 2
|
||||
text = "New Game"
|
||||
|
||||
[node name="Hints" parent="GridContainer/VBoxContainer" instance=ExtResource( 4 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 284.0
|
||||
margin_right = 434.0
|
||||
margin_bottom = 354.0
|
||||
rect_min_size = Vector2( 0, 70 )
|
||||
[node name="Hints" parent="GridContainer/VBoxContainer" instance=ExtResource("4")]
|
||||
custom_minimum_size = Vector2(0, 70)
|
||||
layout_mode = 2
|
||||
text = "Hints"
|
||||
|
||||
[node name="NewGamePanel" parent="." instance=ExtResource( 3 )]
|
||||
rect_pivot_offset = Vector2( 4, 4 )
|
||||
[connection signal="state_changed" from="GridContainer/Taquin" to="." method="_on_Taquin_state_changed"]
|
||||
[connection signal="pressed" from="GridContainer/VBoxContainer/New Game" to="." method="_on_New_game_pressed"]
|
||||
[connection signal="button_down" from="GridContainer/VBoxContainer/Hints" to="GridContainer/Taquin" method="_on_Hints_button_down"]
|
||||
[connection signal="button_up" from="GridContainer/VBoxContainer/Hints" to="GridContainer/Taquin" method="_on_Hints_button_up"]
|
||||
[connection signal="about_to_show" from="NewGamePanel" to="." method="_on_NewGamePanel_about_to_show"]
|
||||
[node name="NewGamePanel" parent="." instance=ExtResource("3")]
|
||||
pivot_offset = Vector2(4, 4)
|
||||
|
||||
[connection signal="about_to_popup" from="NewGamePanel" to="." method="_on_NewGamePanel_about_to_show"]
|
||||
[connection signal="popup_hide" from="NewGamePanel" to="." method="_on_NewGamePanel_popup_hide"]
|
||||
[connection signal="start_triggered" from="NewGamePanel" to="GridContainer/Taquin" method="_on_NewGamePanel_start_triggered"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tool
|
||||
@tool
|
||||
class_name NewGamePanel
|
||||
extends PopupPanel
|
||||
|
||||
|
@ -19,36 +19,36 @@ const hard_iterations := 30
|
|||
|
||||
const Utils = preload("res://src/Utils.gd")
|
||||
|
||||
export var window_scale_factor = 0.9 # how big the popup will be compared to screen
|
||||
export var default_artwork_texture: Texture
|
||||
@export var window_scale_factor = 0.9 # how big the popup will be compared to screen
|
||||
@export var default_artwork_texture: Texture2D
|
||||
|
||||
var preferences = ConfigFile.new()
|
||||
var fade_duration = 0.2
|
||||
var fade_scale_factor = 0.9
|
||||
var flip_duration = 0.4
|
||||
|
||||
onready var popup = $"."
|
||||
onready var panel = $Panel
|
||||
onready var edit_panel = $EditPanel
|
||||
onready var tween = $Tween
|
||||
@onready var popup = $"."
|
||||
@onready var panel = $Panel
|
||||
@onready var edit_panel = $EditPanel
|
||||
@onready var tween = $Tween
|
||||
|
||||
onready var difficulty_container = $Panel/VBoxContainer/Difficulty
|
||||
onready var easy_button = $Panel/VBoxContainer/Difficulty/Easy
|
||||
onready var normal_button = $Panel/VBoxContainer/Difficulty/Normal
|
||||
onready var hard_button = $Panel/VBoxContainer/Difficulty/Hard
|
||||
onready var custom_button = $Panel/VBoxContainer/HBoxContainer/Custom
|
||||
@onready var difficulty_container = $Panel/VBoxContainer/Difficulty
|
||||
@onready var easy_button = $Panel/VBoxContainer/Difficulty/Easy
|
||||
@onready var normal_button = $Panel/VBoxContainer/Difficulty/Normal
|
||||
@onready var hard_button = $Panel/VBoxContainer/Difficulty/Hard
|
||||
@onready var custom_button = $Panel/VBoxContainer/HBoxContainer/Custom
|
||||
|
||||
onready var preview = $Panel/VBoxContainer/ArtworkSource/Preview
|
||||
@onready var preview = $Panel/VBoxContainer/ArtworkSource/Preview
|
||||
|
||||
onready var columns_spinbox = $EditPanel/VBoxContainer/Columns/SpinBox
|
||||
onready var rows_spinbox = $EditPanel/VBoxContainer/Rows/SpinBox
|
||||
onready var iterations_spinbox = $EditPanel/VBoxContainer/Iterations/SpinBox
|
||||
@onready var columns_spinbox = $EditPanel/VBoxContainer/Columns/SpinBox
|
||||
@onready var rows_spinbox = $EditPanel/VBoxContainer/Rows/SpinBox
|
||||
@onready var iterations_spinbox = $EditPanel/VBoxContainer/Iterations/SpinBox
|
||||
|
||||
func _init():
|
||||
var err = preferences.load(pref_path)
|
||||
|
||||
func _ready():
|
||||
rect_pivot_offset = rect_size / 2
|
||||
pivot_offset = size / 2
|
||||
|
||||
assert(popup.theme != null)
|
||||
var popup_style : = popup.get_stylebox("panel", "PopupPanel") as StyleBoxFlat
|
||||
|
@ -60,29 +60,29 @@ func _ready():
|
|||
modified_panel_style.corner_radius_bottom_right = popup_style.corner_radius_bottom_right
|
||||
modified_panel_style.corner_radius_top_left = popup_style.corner_radius_top_left
|
||||
modified_panel_style.corner_radius_top_right = popup_style.corner_radius_top_right
|
||||
panel.set("custom_styles/panel", modified_panel_style)
|
||||
edit_panel.set("custom_styles/panel", modified_panel_style)
|
||||
panel.set("theme_override_styles/panel", modified_panel_style)
|
||||
edit_panel.set("theme_override_styles/panel", modified_panel_style)
|
||||
panel.show()
|
||||
edit_panel.hide()
|
||||
edit_panel.hide()
|
||||
|
||||
var button_max_width: int = $EditPanel/VBoxContainer.rect_size.x / 3.5
|
||||
var button_max_width: int = $EditPanel/VBoxContainer.size.x / 3.5
|
||||
var button_width := min(200, button_max_width)
|
||||
print_debug("button max width = ", button_max_width)
|
||||
easy_button.rect_min_size.x = button_width
|
||||
normal_button.rect_min_size.x = button_width
|
||||
hard_button.rect_min_size.x = button_width
|
||||
custom_button.rect_min_size.x = button_width
|
||||
easy_button.custom_minimum_size.x = button_width
|
||||
normal_button.custom_minimum_size.x = button_width
|
||||
hard_button.custom_minimum_size.x = button_width
|
||||
custom_button.custom_minimum_size.x = button_width
|
||||
|
||||
func fade_in():
|
||||
tween.remove_all()
|
||||
tween.interpolate_property(self, "rect_scale", Vector2(fade_scale_factor, fade_scale_factor), Vector2.ONE, fade_duration, Tween.TRANS_LINEAR, Tween.EASE_IN)
|
||||
tween.interpolate_property(self, "scale", Vector2(fade_scale_factor, fade_scale_factor), Vector2.ONE, fade_duration, Tween.TRANS_LINEAR, Tween.EASE_IN)
|
||||
tween.interpolate_property(self, "modulate:a", 0.0, 1.0, fade_duration, Tween.TRANS_LINEAR, Tween.EASE_IN)
|
||||
tween.start()
|
||||
|
||||
func fade_out():
|
||||
tween.remove_all()
|
||||
tween.interpolate_property(self, "rect_scale", Vector2.ONE, Vector2(fade_scale_factor, fade_scale_factor), fade_duration, Tween.TRANS_LINEAR, Tween.EASE_IN)
|
||||
tween.interpolate_property(self, "scale", Vector2.ONE, Vector2(fade_scale_factor, fade_scale_factor), fade_duration, Tween.TRANS_LINEAR, Tween.EASE_IN)
|
||||
tween.interpolate_property(self, "modulate:a", 1.0, 0.0, fade_duration, Tween.TRANS_LINEAR, Tween.EASE_IN)
|
||||
tween.interpolate_callback(self, fade_duration, "hide")
|
||||
tween.start()
|
||||
|
@ -90,20 +90,20 @@ func fade_out():
|
|||
func flip_over(new_panel: Panel) -> void:
|
||||
tween.remove_all()
|
||||
var mid_duration = flip_duration / 2.0
|
||||
tween.interpolate_property(self, "rect_scale:x", 1.0, 0.0, mid_duration)
|
||||
tween.interpolate_property(self, "scale:x", 1.0, 0.0, mid_duration)
|
||||
tween.interpolate_callback($Panel, mid_duration, "hide")
|
||||
tween.interpolate_callback(new_panel, mid_duration, "show")
|
||||
tween.interpolate_property(self, "rect_scale:x", 0.0, 1.0, mid_duration, Tween.TRANS_LINEAR, Tween.EASE_IN, mid_duration)
|
||||
tween.interpolate_property(self, "scale:x", 0.0, 1.0, mid_duration, Tween.TRANS_LINEAR, Tween.EASE_IN, mid_duration)
|
||||
tween.start()
|
||||
|
||||
func flip_back(previous_panel: Panel) -> void:
|
||||
_update_description()
|
||||
tween.remove_all()
|
||||
var mid_duration = flip_duration / 2.0
|
||||
tween.interpolate_property(self, "rect_scale:x", 1.0, 0.0, mid_duration)
|
||||
tween.interpolate_property(self, "scale:x", 1.0, 0.0, mid_duration)
|
||||
tween.interpolate_callback($Panel, mid_duration, "show")
|
||||
tween.interpolate_callback(previous_panel, mid_duration, "hide")
|
||||
tween.interpolate_property(self, "rect_scale:x", 0.0, 1.0, mid_duration, Tween.TRANS_LINEAR, Tween.EASE_IN, mid_duration)
|
||||
tween.interpolate_property(self, "scale:x", 0.0, 1.0, mid_duration, Tween.TRANS_LINEAR, Tween.EASE_IN, mid_duration)
|
||||
tween.start()
|
||||
|
||||
func _update_description():
|
||||
|
@ -131,7 +131,7 @@ func _update_description():
|
|||
# $Panel/Description.text = "Dimension: %d x %d\nIterations: %d" % [columns, rows, iterations]
|
||||
desc.clear()
|
||||
|
||||
desc.push_align(RichTextLabel.ALIGN_CENTER)
|
||||
desc.push_align(RichTextLabel.ALIGNMENT_CENTER)
|
||||
desc.add_text("Board: ")
|
||||
|
||||
desc.push_bold()
|
||||
|
@ -152,7 +152,7 @@ func _update_description():
|
|||
desc.add_text("%d" % [iterations])
|
||||
desc.pop()
|
||||
|
||||
func _set_artwork(tex: Texture) -> void:
|
||||
func _set_artwork(tex: Texture2D) -> void:
|
||||
preview.texture = tex
|
||||
|
||||
var file = File.new()
|
||||
|
@ -196,10 +196,10 @@ func _on_Start_pressed():
|
|||
|
||||
func _on_NewGamePanel_about_to_show():
|
||||
var difficulty = preferences.get_value("game", "difficulty", "normal")
|
||||
easy_button.pressed = difficulty == "easy"
|
||||
normal_button.pressed = difficulty == "normal"
|
||||
hard_button.pressed = difficulty == "hard"
|
||||
custom_button.pressed = difficulty == "custom"
|
||||
easy_button.button_pressed = difficulty == "easy"
|
||||
normal_button.button_pressed = difficulty == "normal"
|
||||
hard_button.button_pressed = difficulty == "hard"
|
||||
custom_button.button_pressed = difficulty == "custom"
|
||||
|
||||
columns_spinbox.value = preferences.get_value("game", "custom_columns", normal_columns)
|
||||
rows_spinbox.value = preferences.get_value("game", "custom_rows", normal_rows)
|
||||
|
|
18
src/Piece.gd
18
src/Piece.gd
|
@ -1,9 +1,9 @@
|
|||
tool
|
||||
@tool
|
||||
class_name Piece
|
||||
extends Node2D
|
||||
|
||||
export var size: int = 160
|
||||
export var texture: Texture
|
||||
@export var size: int = 160
|
||||
@export var texture: Texture2D
|
||||
|
||||
var order: int = 0
|
||||
var taquin_original_index := Vector2.ZERO
|
||||
|
@ -17,21 +17,21 @@ var taquin_original_normalized_position := Vector2.ZERO
|
|||
var piece_scale := Vector2(0.25, 0.25)
|
||||
|
||||
func _ready() -> void:
|
||||
$ColorRect.rect_size = Vector2(size, size)
|
||||
$ColorRect.size = Vector2(size, size)
|
||||
$ColorRect/Label.text = str(order)
|
||||
|
||||
# We need a dedicated material to have separate uniform,
|
||||
# otherwise uniforms will be shared.
|
||||
var mat = $ColorRect.material.duplicate() as ShaderMaterial
|
||||
mat.set_shader_param("artwork", texture) # TODO: make it common to all pieces
|
||||
mat.set_shader_param("scale", Vector3(piece_scale.x, piece_scale.y, 1.0))
|
||||
mat.set_shader_param("offset", Vector3(taquin_original_normalized_position.x, taquin_original_normalized_position.y, 0.0))
|
||||
mat.set_shader_param("reflection", false)
|
||||
mat.set_shader_parameter("artwork", texture) # TODO: make it common to all pieces
|
||||
mat.set_shader_parameter("scale", Vector3(piece_scale.x, piece_scale.y, 1.0))
|
||||
mat.set_shader_parameter("offset", Vector3(taquin_original_normalized_position.x, taquin_original_normalized_position.y, 0.0))
|
||||
mat.set_shader_parameter("reflection", false)
|
||||
$ColorRect.material = mat
|
||||
|
||||
func set_reflection(value: bool) -> void:
|
||||
var mat = $ColorRect.material as ShaderMaterial
|
||||
mat.set_shader_param("reflection", value)
|
||||
mat.set_shader_parameter("reflection", value)
|
||||
|
||||
func debug_print(name: String):
|
||||
print("%s order: %s" % [name, order])
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=19 format=2]
|
||||
|
||||
[ext_resource path="res://src/Piece.gd" type="Script" id=1]
|
||||
[ext_resource path="res://assets/artworks/escher_lizards.jpg" type="Texture" id=3]
|
||||
[ext_resource path="res://assets/artworks/escher_lizards.jpg" type="Texture2D" id=3]
|
||||
|
||||
[sub_resource type="VisualShaderNodeExpression" id=1]
|
||||
output_port_for_preview = 0
|
||||
|
@ -44,10 +44,10 @@ input_name = "time"
|
|||
|
||||
[sub_resource type="VisualShaderNodeSwitch" id=7]
|
||||
|
||||
[sub_resource type="VisualShaderNodeBooleanUniform" id=8]
|
||||
[sub_resource type="VisualShaderNodeBooleanParameter" id=8]
|
||||
uniform_name = "reflection"
|
||||
|
||||
[sub_resource type="VisualShaderNodeTextureUniform" id=9]
|
||||
[sub_resource type="VisualShaderNodeTexture2DParameter" id=9]
|
||||
output_port_for_preview = 0
|
||||
uniform_name = "artwork"
|
||||
texture_type = 1
|
||||
|
@ -64,10 +64,10 @@ operator = 2
|
|||
[sub_resource type="VisualShaderNodeVectorOp" id=12]
|
||||
default_input_values = [ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0.8, 0.1, 0 ) ]
|
||||
|
||||
[sub_resource type="VisualShaderNodeVec3Uniform" id=13]
|
||||
[sub_resource type="VisualShaderNodeVec3Parameter" id=13]
|
||||
uniform_name = "scale"
|
||||
|
||||
[sub_resource type="VisualShaderNodeVec3Uniform" id=14]
|
||||
[sub_resource type="VisualShaderNodeVec3Parameter" id=14]
|
||||
uniform_name = "offset"
|
||||
|
||||
[sub_resource type="VisualShader" id=15]
|
||||
|
@ -75,7 +75,7 @@ code = "shader_type canvas_item;
|
|||
uniform bool reflection;
|
||||
uniform vec3 scale;
|
||||
uniform vec3 offset;
|
||||
uniform sampler2D artwork : hint_albedo;
|
||||
uniform sampler2D artwork : source_color;
|
||||
|
||||
|
||||
|
||||
|
@ -246,7 +246,7 @@ nodes/fragment/24/node = SubResource( 8 )
|
|||
nodes/fragment/24/position = Vector2( 1200, -60 )
|
||||
nodes/fragment/25/node = SubResource( 9 )
|
||||
nodes/fragment/25/position = Vector2( 840, 20 )
|
||||
nodes/fragment/connections = PoolIntArray( 5, 0, 6, 0, 13, 0, 0, 1, 4, 0, 5, 0, 4, 0, 13, 0, 13, 1, 17, 0, 15, 0, 17, 1, 17, 0, 0, 0, 8, 0, 6, 1, 7, 0, 5, 1, 19, 0, 21, 1, 22, 0, 19, 1, 6, 0, 19, 0, 24, 0, 23, 0, 21, 0, 23, 1, 23, 0, 17, 2, 6, 0, 25, 0, 25, 0, 23, 2, 25, 0, 21, 0 )
|
||||
nodes/fragment/connections = PackedInt32Array( 5, 0, 6, 0, 13, 0, 0, 1, 4, 0, 5, 0, 4, 0, 13, 0, 13, 1, 17, 0, 15, 0, 17, 1, 17, 0, 0, 0, 8, 0, 6, 1, 7, 0, 5, 1, 19, 0, 21, 1, 22, 0, 19, 1, 6, 0, 19, 0, 24, 0, 23, 0, 21, 0, 23, 1, 23, 0, 17, 2, 6, 0, 25, 0, 25, 0, 23, 2, 25, 0, 21, 0 )
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=16]
|
||||
shader = SubResource( 15 )
|
||||
|
@ -263,8 +263,8 @@ texture = ExtResource( 3 )
|
|||
material = SubResource( 16 )
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_right = 160.0
|
||||
margin_bottom = 160.0
|
||||
offset_right = 160.0
|
||||
offset_bottom = 160.0
|
||||
mouse_filter = 2
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
@ -272,14 +272,14 @@ __meta__ = {
|
|||
|
||||
[node name="Label" type="Label" parent="ColorRect"]
|
||||
visible = false
|
||||
margin_left = 10.0
|
||||
margin_top = 10.0
|
||||
margin_right = 50.0
|
||||
margin_bottom = 50.0
|
||||
rect_scale = Vector2( 3, 3 )
|
||||
rect_clip_content = true
|
||||
offset_left = 10.0
|
||||
offset_top = 10.0
|
||||
offset_right = 50.0
|
||||
offset_bottom = 50.0
|
||||
scale = Vector2( 3, 3 )
|
||||
clip_contents = true
|
||||
size_flags_vertical = 1
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
theme_override_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
text = "0"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tool
|
||||
@tool
|
||||
class_name Taquin
|
||||
extends Control
|
||||
|
||||
|
@ -19,12 +19,12 @@ const _state_transitions = {
|
|||
const Piece = preload("res://src/Piece.tscn")
|
||||
const Utils = preload("res://src/Utils.gd")
|
||||
|
||||
export var rows: int = NewGamePanel.normal_rows
|
||||
export var columns: int = NewGamePanel.normal_columns
|
||||
export var shuffle_iterations: int = NewGamePanel.normal_iterations
|
||||
export var artwork_texture: Texture
|
||||
export(State) var current_state = State.MAIN
|
||||
export var autoload_fresh_game := true
|
||||
@export var rows: int = NewGamePanel.normal_rows
|
||||
@export var columns: int = NewGamePanel.normal_columns
|
||||
@export var shuffle_iterations: int = NewGamePanel.normal_iterations
|
||||
@export var artwork_texture: Texture2D
|
||||
@export var current_state: State = State.MAIN
|
||||
@export var autoload_fresh_game := true
|
||||
|
||||
var board_size := Vector2.ZERO
|
||||
var interpiece := 4
|
||||
|
@ -50,11 +50,11 @@ var current_touch_slide := Vector2.ZERO
|
|||
var local_min_position := Vector2.ZERO
|
||||
var local_max_position := Vector2.ZERO
|
||||
|
||||
var hint_active := false setget set_hint_active, get_hint_active
|
||||
var hint_active := false: get = get_hint_active, set = set_hint_active
|
||||
|
||||
#var _artwork_path := NewGamePanel.default_artwork_path
|
||||
|
||||
onready var hint_tween = $HintTween
|
||||
@onready var hint_tween = $HintTween
|
||||
|
||||
func position_for_index(index: Vector2, size: int) -> Vector2:
|
||||
return padding + Vector2(index.x * (size + interpiece), index.y * (size + interpiece))
|
||||
|
@ -73,13 +73,13 @@ func compute_padding(piece_size: int) -> Vector2:
|
|||
|
||||
func _ready() -> void:
|
||||
$AnimationPlayer/MockPiece.visible = false
|
||||
$Particles2D.emitting = false
|
||||
$GPUParticles2D.emitting = false
|
||||
|
||||
board_size.x = min(rect_size.x, rect_size.y)
|
||||
board_size.x = min(size.x, size.y)
|
||||
board_size.y = board_size.x
|
||||
|
||||
$Background.rect_size = board_size
|
||||
$Background.rect_position = (rect_size - $Background.rect_size) / 2
|
||||
$Background.size = board_size
|
||||
$Background.position = (size - $Background.size) / 2
|
||||
$Background.set_anchors_preset(Control.PRESET_CENTER)
|
||||
|
||||
rng.randomize()
|
||||
|
@ -347,11 +347,11 @@ func transition_to(state):
|
|||
current_state = state
|
||||
match current_state:
|
||||
State.WINNING:
|
||||
$Particles2D.emitting = true
|
||||
$GPUParticles2D.emitting = true
|
||||
set_pieces_reflection(true)
|
||||
$Timer.start(-1)
|
||||
State.GAME_OVER:
|
||||
$Particles2D.emitting = false
|
||||
$GPUParticles2D.emitting = false
|
||||
$Timer.stop()
|
||||
emit_signal("state_changed", previous_state, current_state)
|
||||
|
||||
|
@ -388,7 +388,7 @@ func load(saved_state) -> bool:
|
|||
init(saved_state["pieces"], saved_state["hidden_piece"], artwork_texture)
|
||||
return true
|
||||
|
||||
func init(pieces_order: Array, hidden_piece: int, artwork: Texture) -> void:
|
||||
func init(pieces_order: Array, hidden_piece: int, artwork: Texture2D) -> void:
|
||||
var piece_size: int = compute_piece_size()
|
||||
padding = compute_padding(piece_size)
|
||||
print("piece size: ", piece_size)
|
||||
|
@ -403,7 +403,7 @@ func init(pieces_order: Array, hidden_piece: int, artwork: Texture) -> void:
|
|||
for c in range(columns):
|
||||
var pieces_row: Array = []
|
||||
for r in range(rows):
|
||||
var piece = Piece.instance()
|
||||
var piece = Piece.instantiate()
|
||||
|
||||
# Uniforms
|
||||
piece.size = piece_size
|
||||
|
@ -433,7 +433,7 @@ func init(pieces_order: Array, hidden_piece: int, artwork: Texture) -> void:
|
|||
pieces.append(pieces_row)
|
||||
assert(missing_piece != null)
|
||||
|
||||
func new_game(columns: int, rows: int, shuffle_iterations: int, artwork_texture: Texture) -> void:
|
||||
func new_game(columns: int, rows: int, shuffle_iterations: int, artwork_texture: Texture2D) -> void:
|
||||
self.columns = columns
|
||||
self.rows = rows
|
||||
self.shuffle_iterations = shuffle_iterations
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
[ext_resource path="res://src/Piece.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://assets/sounds/PM_BBI_Bullet_Impact_Hit_Body_Flesh_2.wav" type="AudioStream" id=3]
|
||||
[ext_resource path="res://assets/taqin_theme.tres" type="Theme" id=4]
|
||||
[ext_resource path="res://assets/artworks/escher_convex_concave.jpg" type="Texture" id=5]
|
||||
[ext_resource path="res://assets/artworks/escher_convex_concave.jpg" type="Texture2D" id=5]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
resource_name = "MovingPiece"
|
||||
|
@ -17,19 +17,19 @@ tracks/0/loop_wrap = true
|
|||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.2 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"times": PackedFloat32Array( 0, 0.2 ),
|
||||
"transitions": PackedFloat32Array( 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( 15, 15 ), Vector2( 175, 15 ) ]
|
||||
}
|
||||
|
||||
[sub_resource type="Gradient" id=2]
|
||||
colors = PoolColorArray( 1, 1, 1, 1, 1, 0.140625, 0.140625, 1 )
|
||||
colors = PackedColorArray( 1, 1, 1, 1, 1, 0.140625, 0.140625, 1 )
|
||||
|
||||
[sub_resource type="GradientTexture" id=3]
|
||||
[sub_resource type="GradientTexture2D" id=3]
|
||||
gradient = SubResource( 2 )
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id=4]
|
||||
[sub_resource type="ParticleProcessMaterial" id=4]
|
||||
emission_shape = 2
|
||||
emission_box_extents = Vector3( 10, 5, 1 )
|
||||
flag_disable_z = true
|
||||
|
@ -49,7 +49,7 @@ color_ramp = SubResource( 3 )
|
|||
[node name="Taquin" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_min_size = Vector2( 540, 540 )
|
||||
custom_minimum_size = Vector2( 540, 540 )
|
||||
theme = ExtResource( 4 )
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
|
@ -62,10 +62,10 @@ anchor_left = 0.5
|
|||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -300.0
|
||||
margin_top = -300.0
|
||||
margin_right = 300.0
|
||||
margin_bottom = 300.0
|
||||
offset_left = -300.0
|
||||
offset_top = -300.0
|
||||
offset_right = 300.0
|
||||
offset_bottom = 300.0
|
||||
mouse_filter = 2
|
||||
color = Color( 0.12549, 0.235294, 0.337255, 1 )
|
||||
__meta__ = {
|
||||
|
@ -80,11 +80,11 @@ visible = false
|
|||
position = Vector2( 15, 15 )
|
||||
|
||||
[node name="PlaceholderTexture" type="ColorRect" parent="AnimationPlayer/MockPiece"]
|
||||
margin_right = 160.0
|
||||
margin_bottom = 160.0
|
||||
offset_right = 160.0
|
||||
offset_bottom = 160.0
|
||||
color = Color( 0.137255, 0.976471, 0.0196078, 1 )
|
||||
|
||||
[node name="Particles2D" type="Particles2D" parent="."]
|
||||
[node name="GPUParticles2D" type="GPUParticles2D" parent="."]
|
||||
position = Vector2( 253, 262 )
|
||||
rotation = -1.5708
|
||||
emitting = false
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
static func load_texture_from_path(path: String) -> Texture:
|
||||
static func load_texture_from_path(path: String) -> Texture2D:
|
||||
var img = Image.new()
|
||||
var texture = ImageTexture.new()
|
||||
if img.load(path) != OK:
|
||||
|
@ -7,7 +7,7 @@ static func load_texture_from_path(path: String) -> Texture:
|
|||
texture.create_from_image(img)
|
||||
return texture
|
||||
|
||||
static func deserialize_texture(path: String) -> Texture:
|
||||
static func deserialize_texture(path: String) -> Texture2D:
|
||||
var file := File.new()
|
||||
if file.open(path, File.READ) != OK:
|
||||
return null
|
||||
|
|
Loading…
Reference in a new issue