Skip to content

Commit 97621c1

Browse files
committed
standardized Enums.GemColor
1 parent 1b7fff8 commit 97621c1

File tree

16 files changed

+194
-46
lines changed

16 files changed

+194
-46
lines changed

assets/gems/space/Space_B.png

71.8 KB
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://cvlodafggu8vg"
6+
path="res://.godot/imported/Space_B.png-53c10d88bb7e9c4a08bcc38f393b7ede.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://assets/gems/space/Space_B.png"
14+
dest_files=["res://.godot/imported/Space_B.png-53c10d88bb7e9c4a08bcc38f393b7ede.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1

assets/gems/space/Space_G.png

72.3 KB
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://c37gqqvuu16v3"
6+
path="res://.godot/imported/Space_G.png-4ac2b72721753fdc9fa72ebec91112e9.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://assets/gems/space/Space_G.png"
14+
dest_files=["res://.godot/imported/Space_G.png-4ac2b72721753fdc9fa72ebec91112e9.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1

assets/gems/space/Space_P.png

71.8 KB
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://cnx5i4dv14xma"
6+
path="res://.godot/imported/Space_P.png-f4ebcd34cab9e62b1c127bbd5e69259a.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://assets/gems/space/Space_P.png"
14+
dest_files=["res://.godot/imported/Space_P.png-f4ebcd34cab9e62b1c127bbd5e69259a.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1

assets/gems/space/Space_Y.png

74.3 KB
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://cavqcc5satl8d"
6+
path="res://.godot/imported/Space_Y.png-04e6cb1d859761c0a9599941deae935f.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://assets/gems/space/Space_Y.png"
14+
dest_files=["res://.godot/imported/Space_Y.png-04e6cb1d859761c0a9599941deae935f.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1

enums.gd

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ var current_debug_level = DEBUG_LEVEL.INFO # Global variable to set the current
1010
# =========================================================
1111

1212
enum GemColor {
13-
WHITE,
1413
RED,
15-
YELLOW,
16-
GREEN,
17-
PURPLE,
18-
BROWN
14+
ORG,
15+
YLW,
16+
GRN,
17+
BLU,
18+
PRP
1919
}
2020

2121
func get_color_name_by_value(value: int) -> String:
@@ -28,7 +28,8 @@ func get_color_name_by_value(value: int) -> String:
2828

2929
enum GemDict {
3030
FOOD,
31-
GEMS
31+
GEMS,
32+
SPACE
3233
}
3334

3435
# =========================================================

game_boards/all_common/cmn_gem_cell.gd

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,29 @@ const DROP_OFFSET:int = 128 # (the sprite is centered in the 128x128 container,
1717
var gem_color:Enums.GemColor
1818
var gem_dict:Enums.GemDict
1919
# Declare and preload textures
20+
const gem_textures_food: Dictionary = {
21+
Enums.GemColor.RED: preload("res://assets/gems/food/characters_0001.png"),
22+
Enums.GemColor.ORG: preload("res://assets/gems/food/characters_0002.png"),
23+
Enums.GemColor.YLW: preload("res://assets/gems/food/characters_0003.png"),
24+
Enums.GemColor.GRN: preload("res://assets/gems/food/characters_0005.png"),
25+
Enums.GemColor.BLU: preload("res://assets/gems/food/characters_0007.png"),
26+
Enums.GemColor.PRP: preload("res://assets/gems/food/characters_0006.png")
27+
}
2028
const gem_textures_gems: Dictionary = {
21-
Enums.GemColor.WHITE: preload("res://assets/gems/gems/gem1.png"),
22-
Enums.GemColor.RED: preload("res://assets/gems/gems/gem2.png"),
23-
Enums.GemColor.YELLOW: preload("res://assets/gems/gems/gem3.png"),
24-
Enums.GemColor.GREEN: preload("res://assets/gems/gems/gem4.png"),
25-
Enums.GemColor.PURPLE: preload("res://assets/gems/gems/gem5.png"),
26-
Enums.GemColor.BROWN: preload("res://assets/gems/gems/gem6.png")
29+
Enums.GemColor.RED: preload("res://assets/gems/gems/gem1.png"),
30+
Enums.GemColor.ORG: preload("res://assets/gems/gems/gem2.png"),
31+
Enums.GemColor.YLW: preload("res://assets/gems/gems/gem3.png"),
32+
Enums.GemColor.GRN: preload("res://assets/gems/gems/gem4.png"),
33+
Enums.GemColor.BLU: preload("res://assets/gems/gems/gem5.png"),
34+
Enums.GemColor.PRP: preload("res://assets/gems/gems/gem6.png")
2735
}
28-
const gem_textures_food: Dictionary = {
29-
Enums.GemColor.WHITE: preload("res://assets/gems/food/characters_0001.png"),
30-
Enums.GemColor.RED: preload("res://assets/gems/food/characters_0002.png"),
31-
Enums.GemColor.YELLOW: preload("res://assets/gems/food/characters_0003.png"),
32-
Enums.GemColor.GREEN: preload("res://assets/gems/food/characters_0005.png"),
33-
Enums.GemColor.PURPLE: preload("res://assets/gems/food/characters_0007.png"),
34-
Enums.GemColor.BROWN: preload("res://assets/gems/food/characters_0006.png")
36+
const gem_textures_space: Dictionary = {
37+
Enums.GemColor.RED: preload("res://assets/gems/space/Space_B.png"),
38+
Enums.GemColor.ORG: preload("res://assets/gems/space/Space_Y.png"),
39+
Enums.GemColor.YLW: preload("res://assets/gems/space/Gem2.png"),
40+
Enums.GemColor.GRN: preload("res://assets/gems/space/Space_G.png"),
41+
Enums.GemColor.BLU: preload("res://assets/gems/space/Space_P.png"),
42+
Enums.GemColor.PRP: preload("res://assets/gems/space/Gem3.png")
3543
}
3644
var gem_textures:Dictionary = {}
3745

@@ -44,6 +52,8 @@ func initialize(colorIn: Enums.GemColor, dictIn:Enums.GemDict):
4452
gem_textures = gem_textures_food
4553
elif dictIn == Enums.GemDict.GEMS:
4654
gem_textures = gem_textures_gems
55+
elif dictIn == Enums.GemDict.SPACE:
56+
gem_textures = gem_textures_space
4757
else:
4858
print("ERROR: Unknown `GemDict`!")
4959
# C:

0 commit comments

Comments
 (0)