Working prototype

This commit is contained in:
Sch1nken 2024-03-16 19:56:22 +01:00
parent 3de181134d
commit 1ed0ec226d
24 changed files with 682 additions and 31 deletions

View file

@ -11,15 +11,14 @@ const default_insects = {
preload("res://Tile/Prefabs/Beetle.tres"): 2,
preload("res://Tile/Prefabs/Grasshopper.tres"): 3,
preload("res://Tile/Prefabs/Spider.tres"): 2,
#preload("res://Tile/Prefabs/Ladybug.tres"): 1,
#preload("res://Tile/Prefabs/Mosquito.tres"): 1,
#preload("res://Tile/Prefabs/Pillbug.tres"): 1
preload("res://Tile/Prefabs/Ladybug.tres"): 1,
preload("res://Tile/Prefabs/Mosquito.tres"): 1,
preload("res://Tile/Prefabs/Pillbug.tres"): 1
}
@onready var local_bee_button: InsectButton = $PanelContainer/MarginContainer/VBoxContainer/HBoxContainer2/LocalPlayerInsects/BeeButton
@onready var remote_bee_button: InsectButton = $PanelContainer/MarginContainer/VBoxContainer/HBoxContainer2/RemotePlayerInsects/BeeButton
# Called when the node enters the scene tree for the first time.
func _ready():
#var unique_array = default_insects.duplicate().map()

84
UI/hex_black.svg Normal file
View file

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="512"
height="512"
viewBox="0 0 135.46667 135.46667"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
sodipodi:docname="hex.svg"
inkscape:export-filename="hex_black.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showguides="true"
inkscape:zoom="1.3089908"
inkscape:cx="292.97379"
inkscape:cy="347.59603"
inkscape:window-width="2560"
inkscape:window-height="1368"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1">
<sodipodi:guide
position="67.733335,67.733335"
orientation="0,1"
id="guide1"
inkscape:locked="false"
inkscape:label=""
inkscape:color="rgb(0,134,229)" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
sodipodi:type="star"
style="display:none;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.001"
id="path1"
inkscape:flatsided="true"
sodipodi:sides="6"
sodipodi:cx="67.733337"
sodipodi:cy="67.733337"
sodipodi:r1="64.409515"
sodipodi:r2="55.780277"
sodipodi:arg1="1.0471976"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 99.938092,123.51362 -64.409515,-1e-5 -32.204755,-55.780276 32.20476,-55.780275 64.409516,3e-6 32.204752,55.780279 z" />
<path
sodipodi:type="star"
style="fill:#050505;fill-opacity:1;stroke:#ffffff;stroke-width:1.001;stroke-opacity:1"
id="path2"
inkscape:flatsided="true"
sodipodi:sides="6"
sodipodi:cx="67.733337"
sodipodi:cy="67.733337"
sodipodi:r1="64.409515"
sodipodi:r2="55.780277"
sodipodi:arg1="1.0471976"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 99.938092,123.51362 -64.409515,-1e-5 -32.204755,-55.780276 32.20476,-55.780275 64.409516,3e-6 32.204752,55.780279 z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

37
UI/hex_black.svg.import Normal file
View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ctc46cqy0srip"
path="res://.godot/imported/hex_black.svg-9d962341f549264abaeb5efcd8e99b18.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://UI/hex_black.svg"
dest_files=["res://.godot/imported/hex_black.svg-9d962341f549264abaeb5efcd8e99b18.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=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

84
UI/hex_white.svg Normal file
View file

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="512"
height="512"
viewBox="0 0 135.46667 135.46667"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
sodipodi:docname="hex.svg"
inkscape:export-filename="hex_black.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showguides="true"
inkscape:zoom="1.3089908"
inkscape:cx="461.80615"
inkscape:cy="103.13289"
inkscape:window-width="2560"
inkscape:window-height="1368"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1">
<sodipodi:guide
position="67.733335,67.733335"
orientation="0,1"
id="guide1"
inkscape:locked="false"
inkscape:label=""
inkscape:color="rgb(0,134,229)" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
sodipodi:type="star"
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.001"
id="path1"
inkscape:flatsided="true"
sodipodi:sides="6"
sodipodi:cx="67.733337"
sodipodi:cy="67.733337"
sodipodi:r1="64.409515"
sodipodi:r2="55.780277"
sodipodi:arg1="1.0471976"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 99.938092,123.51362 -64.409515,-1e-5 -32.204755,-55.780276 32.20476,-55.780275 64.409516,3e-6 32.204752,55.780279 z" />
<path
sodipodi:type="star"
style="display:none;fill:#050505;fill-opacity:1;stroke:#ffffff;stroke-width:1.001;stroke-opacity:1"
id="path2"
inkscape:flatsided="true"
sodipodi:sides="6"
sodipodi:cx="67.733337"
sodipodi:cy="67.733337"
sodipodi:r1="64.409515"
sodipodi:r2="55.780277"
sodipodi:arg1="1.0471976"
sodipodi:arg2="1.5707963"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 99.938092,123.51362 -64.409515,-1e-5 -32.204755,-55.780276 32.20476,-55.780275 64.409516,3e-6 32.204752,55.780279 z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

37
UI/hex_white.svg.import Normal file
View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d2i5vboeyq8qx"
path="res://.godot/imported/hex_white.svg-aa2a6c3f24a602d4d345875405e4ff56.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://UI/hex_white.svg"
dest_files=["res://.godot/imported/hex_white.svg-aa2a6c3f24a602d4d345875405e4ff56.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=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -18,4 +18,4 @@ func _on_back_button_pressed():
func _on_connect_button_pressed():
GameData.is_player_black = true
WSClient.start(GameData.WEBSOCKET_ENDPOINT, lobby_code_input.text)
WSClient.start(GameData.WEBSOCKET_ENDPOINT, lobby_code_input.text, false)