feat: 重构多人游戏界面和代码,使用文件存储游戏配置,重构底层代码
This commit is contained in:
1 parent
d323a0bee7
commit
d6cbb5e11d
30 files changed
+715
-262
No files matched your search
@@ -11,7 +11,7 @@ data = {
|
|||||||
|
|
||||||
[sub_resource type="Image" id="Image_t7xhb"]
|
[sub_resource type="Image" id="Image_t7xhb"]
|
||||||
data = {
|
data = {
|
||||||
"data": PackedByteArray("/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A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/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/yT/Hv8A/x//I/8A/wD/AP8A/7D///8q/wD/AP9A////mP8A/wD/AP/I////DP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/ov///yb/s//Y/wD/zf/D/xP//v+v/wD/AP8A/wD/AP8A/wT/uf///9H/C/8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/8P///8c/wD/AP8Y////3P8A/wD/AP8A/7D///8o/wD/AP8A/+z/7P8A/wD/AP8A/wD/AP8A/xn/kP/+/+b/Af8A/wD/AP8A/zL///+7/wD/AP8A/9z///8I/wD/AP8A/wD/AP8L//P/yP83////jP8A/wD/AP8A/wD/AP8e////0/9E/0T/RP9E/0T/HvLine truncated
|
||||||
"format": "LumAlpha8",
|
"format": "LumAlpha8",
|
||||||
"height": 256,
|
"height": 256,
|
||||||
"mipmaps": false,
|
"mipmaps": false,
|
||||||
@@ -29,7 +29,7 @@ data = {
|
|||||||
|
|
||||||
[sub_resource type="Image" id="Image_hvlis"]
|
[sub_resource type="Image" id="Image_hvlis"]
|
||||||
data = {
|
data = {
|
||||||
"data": PackedByteArray("/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/A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/6b/V/8C/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP+8////NP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/S/+v/+b/+f/t/8D/Z/8E/wD/AP8A/wD/AP8A/wD/9P///2X/Av9k/8X/8f/3/9f/h/8P/wD/AP8A/wD/AP+k///////////////2/+f/xP+H/yb/AP8A/wD/AP8A/wD/AP8U///////U/wD/AP8A/wD/AP8M///////U/wD/AP8A/wD/pP////////////////////////9s/wD/AP8A/wD/AP8Q/3//zf/y//n/4f/E/33/Jv8A/wD/AP8A/wD/pP//////SP8A/wD/AP8A/wD/FP/e//////9f/wD/AP8A/wD/AP8A/wD/AP8I/2L/sv/j//n/+P/j/7b/cP8V/wD/AP8A/wD/AP8A/wD/Qv+X/8//8v/7/+n/t/9P/wD/AP8A/wD/AP8A/wD/AP8A/07/r//l//n/7P/Q/4z/KP8A/wD/AP8A/wD/AP8A/1L/tv/q//r/6P+x/0f/AP8A/wD/AP8A/wD/AP8r//n////3/yT/AP8A/wD/AP9Z///////Z/wn/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP9k//L//////////////////////9T/Kf8A/wD/AP8A/wD/AP8A/wD/AP8X//z///80/wD/AP8A/wD/AP8A/wD/AP8A/wX/o////////////////////8j/FP8A/wD/AP8A/wD/AP/0////nP+w/////////////////9P/C/8A/wD/AP8A/6T//////////////////////////P9r/wD/AP8A/wD/AP8A/xT//////9T/AP8A/wD/AP8A/wz//////9T/AP8A/wD/AP+k/////////////////////////2z/AP8A/wD/AP8a/9////////////////////+u/wD/AP8A/wD/AP+k//////9I/wD/AP8A/wD/Bv/C//////+H/wD/AP8A/wD/AP8A/wD/AP8z/9///////////////////////9j/AP8A/wD/AP8A/wD/Uv//////////////////////hf8A/wD/AP8A/wD/AP8G/6n///////////////////9R/wD/AP8A/wD/AP8E/6X///////////////////+Q/wD/AP8A/wD/AP8A/wD/e///////vP8A/wD/AP8R/+j////9/zr/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP92//////////T/tP+U/5r/xf/9///////v/yv/AP8A/wD/AP8A/wD/AP8A/27//////zT/AP8A/wD/AP8A/wD/AP8A/wD/iv//////8f+P/2r/gf/e//////++/wL/AP8A/wD/AP8A//T/////////2P+A/23/nP/9//////93/wD/AP8A/wD/pP//////of98/3z/hP+l/+3///////z/LP8A/wD/AP8A/wD/FP//////1P8A/wD/AP8A/wD/DP//////1P8A/wD/AP8A/6T//////6P/hP+E/4T/hP+E/4T/N/8A/wD/AP8A/5b//////7f/WP9N/23/q//1/0D/AP8A/wD/AP8A/6T//////0j/AP8A/wD/AP+d//////+t/wH/AP8A/wD/AP8A/wD/AP9J//f///////v/vv+W/5f/vf/4////dP8A/wD/AP8A/wD/AP8E/93/wf9z/0n/Rv9///j////9/yX/AP8A/wD/AP8A/4////////n/ov93/4v/wv/o/wX/AP8A/wD/AP8A/4X//////8n/XP9B/2b/2///////Yv8A/wD/AP8A/wD/AP8E/87//////13/AP8A/5z//////47/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP82//z//////6P/Ef8A/wD/AP8A/yz/1f//////1P8E/wD/AP8A/wD/AP8d/57//P////////////////8M/wD/AP8A/wD/G//6////9f8o/wD/AP8A/wz/0P//////U/8A/wD/AP8A/wD/9P//////xv8I/wD/AP8A/2///////8P/AP8A/wD/AP+k//////9I/wD/AP8A/wD/FP/b//////9+/wD/AP8A/wD/AP8U///////U/wD/AP8A/wD/AP8M///////U/wD/AP8A/wD/pP//////QP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/xP//////GP8A/wD/AP8A/wr/AP8A/wD/AP8A/wD/pP//////SP8A/wD/AP90///////L/wr/AP8A/wD/AP8A/wD/AP8V/+n//////8L/If8A/wD/AP8A/xH/af8R/wD/AP8A/wD/AP8A/wD/Bv8A/wD/AP8A/wD/hf//////bP8A/wD/AP8A/xz/+/////r/Of8A/wD/AP8A/wj/AP8A/wD/AP8A/xf/+f///8r/Bf8A/wD/AP8Z//D////Z/wD/AP8A/wD/AP8A/wD/L//6////6v8T/z7//v///9r/Cf8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/7L//////7X/Af8A/wD/AP8A/wD/AP8Z/+7//////1r/AP8A/wD/AP8A/4j//////////////////////wz/AP8A/wD/AP9v//////+U/wD/AP8A/wD/AP9O//////+w/wD/AP8A/wD/AP/0//////9H/wD/AP8A/wD/E///////4v8A/wD/AP8A/6T//////0j/AP8A/wD/AP8A/3///////5j/AP8A/wD/AP8A/xT//////9T/AP8A/wD/AP8A/wz//////9T/AP8A/wD/AP+k//////9A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP+p//////+M/wT/AP8A/wD/AP8A/wD/AP8A/wD/AP+k//////9I/wD/AP9M//3////j/xn/AP8A/wD/AP8A/wD/AP8A/5r//////9D/Cf8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP9R//////+G/wD/AP8A/wD/bv//////nP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/av//////Yv8A/wD/AP8A/wD/tv//////GP8A/wD/AP8A/wD/AP8A/4L//////6P/1/////3/PP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/xD//f//////Lf8A/wD/AP8A/wD/AP8A/wD/gP//////uf8A/wD/AP8A/wD/Hf84/8H//////2D/OP84/zj/Av8A/wD/AP8A/6P//////1P/AP8A/wD/AP8A/w3//////+f/AP8A/wD/AP8A//T//////wz/AP8A/wD/AP8A//j////r/wD/AP8A/wD/pPLine truncated
|
"data": PackedByteArray("/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/A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P8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8S/3b/u//l//j/8//d/6b/V/8C/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP+8////NP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/S/+v/+b/+f/t/8D/Z/8E/wD/AP8A/wD/AP8A/wD/9P///2X/Av9k/8X/8f/3/9f/h/8P/wD/AP8A/wD/AP+k///////////////2/+f/xP+H/yb/AP8A/wD/AP8A/wD/AP8U///////U/wD/AP8A/wD/AP8M///////U/wD/AP8A/wD/pP////////////////////////9s/wD/AP8A/wD/AP8Q/3//zf/y//n/4f/E/33/Jv8A/wD/AP8A/wD/pP//////SP8A/wD/AP8A/wD/FP/e//////9f/wD/AP8A/wD/AP8A/wD/AP8I/2L/sv/j//n/+P/j/7b/cP8V/wD/AP8A/wD/AP8A/wD/Qv+X/8//8v/7/+n/t/9P/wD/AP8A/wD/AP8A/wD/AP8A/07/r//l//n/7P/Q/4z/KP8A/wD/AP8A/wD/AP8A/1L/tv/q//r/6P+x/0f/AP8A/wD/AP8A/wD/AP8r//n////3/yT/AP8A/wD/AP9Z///////Z/wn/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP9k//L//////////////////////9T/Kf8A/wD/AP8A/wD/AP8A/wD/AP8X//z///80/wD/AP8A/wD/AP8A/wD/AP8A/wX/o////////////////////8j/FP8A/wD/AP8A/wD/AP/0////nP+w/////////////////9P/C/8A/wD/AP8A/6T//////////////////////////P9r/wD/AP8A/wD/AP8A/xT//////9T/AP8A/wD/AP8A/wz//////9T/AP8A/wD/AP+k/////////////////////////2z/AP8A/wD/AP8a/9////////////////////+u/wD/AP8A/wD/AP+k//////9I/wD/AP8A/wD/Bv/C//////+H/wD/AP8A/wD/AP8A/wD/AP8z/9///////////////////////9j/AP8A/wD/AP8A/wD/Uv//////////////////////hf8A/wD/AP8A/wD/AP8G/6n///////////////////9R/wD/AP8A/wD/AP8E/6X///////////////////+Q/wD/AP8A/wD/AP8A/wD/e///////vP8A/wD/AP8R/+j////9/zr/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP92//////////T/tP+U/5r/xf/9///////v/yv/AP8A/wD/AP8A/wD/AP8A/27//////zT/AP8A/wD/AP8A/wD/AP8A/wD/iv//////8f+P/2r/gf/e//////++/wL/AP8A/wD/AP8A//T/////////2P+A/23/nP/9//////93/wD/AP8A/wD/pP//////of98/3z/hP+l/+3///////z/LP8A/wD/AP8A/wD/FP//////1P8A/wD/AP8A/wD/DP//////1P8A/wD/AP8A/6T//////6P/hP+E/4T/hP+E/4T/N/8A/wD/AP8A/5b//////7f/WP9N/23/q//1/0D/AP8A/wD/AP8A/6T//////0j/AP8A/wD/AP+d//////+t/wH/AP8A/wD/AP8A/wD/AP9J//f///////v/vv+W/5f/vf/4////dP8A/wD/AP8A/wD/AP8E/93/wf9z/0n/Rv9///j////9/yX/AP8A/wD/AP8A/4////////n/ov93/4v/wv/o/wX/AP8A/wD/AP8A/4X//////8n/XP9B/2b/2///////Yv8A/wD/AP8A/wD/AP8E/87//////13/AP8A/5z//////47/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP82//z//////6P/Ef8A/wD/AP8A/yz/1f//////1P8E/wD/AP8A/wD/AP8d/57//P////////////////8M/wD/AP8A/wD/G//6////9f8o/wD/AP8A/wz/0P//////U/8A/wD/AP8A/wD/9P//////xv8I/wD/AP8A/2///////8P/AP8A/wD/AP+k//////9I/wD/AP8A/wD/FP/b//////9+/wD/AP8A/wD/AP8U///////U/wD/AP8A/wD/AP8M///////U/wD/AP8A/wD/pP//////QP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/xP//////GP8A/wD/AP8A/wr/AP8A/wD/AP8A/wD/pP//////SP8A/wD/AP90///////L/wr/AP8A/wD/AP8A/wD/AP8V/+n//////8L/If8A/wD/AP8A/xH/af8R/wD/AP8A/wD/AP8A/wD/Bv8A/wD/AP8A/wD/hf//////bP8A/wD/AP8A/xz/+/////r/Of8A/wD/AP8A/wj/AP8A/wD/AP8A/xf/+f///8r/Bf8A/wD/AP8Z//D////Z/wD/AP8A/wD/AP8A/wD/L//6////6v8T/z7//v///9r/Cf8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/7L//////7X/Af8A/wD/AP8A/wD/AP8Z/+7//////1r/AP8A/wD/AP8A/4j//////////////////////wz/AP8A/wD/AP9v//////+U/wD/AP8A/wD/AP9O//////+w/wD/AP8A/wD/AP/0//////9H/wD/AP8A/wD/E///////4v8A/wD/AP8A/6T//////0j/AP8A/wD/AP8A/3///////5j/AP8A/wD/AP8A/xT//////9T/AP8A/wD/AP8A/wz//////9T/AP8A/wD/AP+k//////9A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP+p//////+M/wT/AP8A/wD/AP8A/wD/AP8A/wD/AP+k//////9I/wD/AP9M//3////j/xn/AP8A/wD/AP8A/wD/AP8A/5r//////9D/Cf8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP9R//////+G/wD/AP8A/wD/bv//////nP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/av//////Yv8A/wD/AP8A/wD/tv//////GP8A/wD/AP8A/wD/AP8A/4L//////6P/1/////3/PP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/xD//f//////Lf8A/wD/AP8A/wD/AP8A/wD/gP//////uf8A/wD/AP8A/wD/Hf84/8H//////2D/OP84/zj/Av8A/wD/AP8A/6P//////1P/AP8A/wD/AP8A/w3//////+f/AP8A/wD/AP8A//T//////wz/AP8A/wD/AP8A//j////r/wD/AP8A/wD/pPLine truncated
|
||||||
"format": "LumAlpha8",
|
"format": "LumAlpha8",
|
||||||
"height": 256,
|
"height": 256,
|
||||||
"mipmaps": false,
|
"mipmaps": false,
|
||||||
@@ -55,7 +55,7 @@ cache/0/16/0/descent = 5.0
|
|||||||
cache/0/16/0/underline_position = 1.60938
|
cache/0/16/0/underline_position = 1.60938
|
||||||
cache/0/16/0/underline_thickness = 0.796875
|
cache/0/16/0/underline_thickness = 0.796875
|
||||||
cache/0/16/0/scale = 1.0
|
cache/0/16/0/scale = 1.0
|
||||||
cache/0/16/0/textures/0/offsets = PackedInt32Array(256, 0, 0, 13, 255, 13, 1, 16, 253, 29, 3, 18, 252, 47, 4, 20, 256, 67, 0, 16, 255, 83, 1, 19, 236, 102, 20, 20)
|
cache/0/16/0/textures/0/offsets = PackedInt32Array(256, 0, 0, 13, 255, 13, 1, 16, 253, 29, 3, 18, 252, 47, 4, 20, 256, 67, 0, 16, 255, 83, 1, 19, 248, 102, 8, 20, 132, 122, 124, 16, 14, 138, 242, 17)
|
||||||
cache/0/16/0/textures/0/image = SubResource("Image_t7xhb")
|
cache/0/16/0/textures/0/image = SubResource("Image_t7xhb")
|
||||||
cache/0/16/0/glyphs/88/advance = Vector2(10.1563, 16.0938)
|
cache/0/16/0/glyphs/88/advance = Vector2(10.1563, 16.0938)
|
||||||
cache/0/16/0/glyphs/88/offset = Vector2(0, -10)
|
cache/0/16/0/glyphs/88/offset = Vector2(0, -10)
|
||||||
@@ -782,6 +782,66 @@ cache/0/16/0/glyphs/134217814/offset = Vector2(0, -10)
|
|||||||
cache/0/16/0/glyphs/134217814/size = Vector2(9, 11)
|
cache/0/16/0/glyphs/134217814/size = Vector2(9, 11)
|
||||||
cache/0/16/0/glyphs/134217814/uv_rect = Rect2(226, 103, 9, 11)
|
cache/0/16/0/glyphs/134217814/uv_rect = Rect2(226, 103, 9, 11)
|
||||||
cache/0/16/0/glyphs/134217814/texture_idx = 0
|
cache/0/16/0/glyphs/134217814/texture_idx = 0
|
||||||
|
cache/0/16/0/glyphs/402653254/advance = Vector2(7.92188, 16.0938)
|
||||||
|
cache/0/16/0/glyphs/402653254/offset = Vector2(0, -10)
|
||||||
|
cache/0/16/0/glyphs/402653254/size = Vector2(10, 11)
|
||||||
|
cache/0/16/0/glyphs/402653254/uv_rect = Rect2(237, 103, 10, 11)
|
||||||
|
cache/0/16/0/glyphs/402653254/texture_idx = 0
|
||||||
|
cache/0/16/0/glyphs/402653262/advance = Vector2(9.15625, 16.0938)
|
||||||
|
cache/0/16/0/glyphs/402653262/offset = Vector2(1, -13)
|
||||||
|
cache/0/16/0/glyphs/402653262/size = Vector2(10, 14)
|
||||||
|
cache/0/16/0/glyphs/402653262/uv_rect = Rect2(1, 123, 10, 14)
|
||||||
|
cache/0/16/0/glyphs/402653262/texture_idx = 0
|
||||||
|
cache/0/16/0/glyphs/268435502/advance = Vector2(10.2344, 16.0938)
|
||||||
|
cache/0/16/0/glyphs/268435502/offset = Vector2(1, -13)
|
||||||
|
cache/0/16/0/glyphs/268435502/size = Vector2(11, 14)
|
||||||
|
cache/0/16/0/glyphs/268435502/uv_rect = Rect2(13, 123, 11, 14)
|
||||||
|
cache/0/16/0/glyphs/268435502/texture_idx = 0
|
||||||
|
cache/0/16/0/glyphs/134217766/advance = Vector2(10.1406, 16.0938)
|
||||||
|
cache/0/16/0/glyphs/134217766/offset = Vector2(0, -13)
|
||||||
|
cache/0/16/0/glyphs/134217766/size = Vector2(11, 14)
|
||||||
|
cache/0/16/0/glyphs/134217766/uv_rect = Rect2(26, 123, 11, 14)
|
||||||
|
cache/0/16/0/glyphs/134217766/texture_idx = 0
|
||||||
|
cache/0/16/0/glyphs/134218292/advance = Vector2(10.2813, 16.0938)
|
||||||
|
cache/0/16/0/glyphs/134218292/offset = Vector2(-1, -13)
|
||||||
|
cache/0/16/0/glyphs/134218292/size = Vector2(12, 14)
|
||||||
|
cache/0/16/0/glyphs/134218292/uv_rect = Rect2(39, 123, 12, 14)
|
||||||
|
cache/0/16/0/glyphs/134218292/texture_idx = 0
|
||||||
|
cache/0/16/0/glyphs/268435530/advance = Vector2(8.90625, 16.0938)
|
||||||
|
cache/0/16/0/glyphs/268435530/offset = Vector2(-1, -10)
|
||||||
|
cache/0/16/0/glyphs/268435530/size = Vector2(12, 15)
|
||||||
|
cache/0/16/0/glyphs/268435530/uv_rect = Rect2(1, 139, 12, 15)
|
||||||
|
cache/0/16/0/glyphs/268435530/texture_idx = 0
|
||||||
|
cache/0/16/0/glyphs/134217784/advance = Vector2(11.875, 16.0938)
|
||||||
|
cache/0/16/0/glyphs/134217784/offset = Vector2(0, -13)
|
||||||
|
cache/0/16/0/glyphs/134217784/size = Vector2(12, 14)
|
||||||
|
cache/0/16/0/glyphs/134217784/uv_rect = Rect2(53, 123, 12, 14)
|
||||||
|
cache/0/16/0/glyphs/134217784/texture_idx = 0
|
||||||
|
cache/0/16/0/glyphs/134217767/advance = Vector2(11.75, 16.0938)
|
||||||
|
cache/0/16/0/glyphs/134217767/offset = Vector2(0, -13)
|
||||||
|
cache/0/16/0/glyphs/134217767/size = Vector2(13, 14)
|
||||||
|
cache/0/16/0/glyphs/134217767/uv_rect = Rect2(67, 123, 13, 14)
|
||||||
|
cache/0/16/0/glyphs/134217767/texture_idx = 0
|
||||||
|
cache/0/16/0/glyphs/134217796/advance = Vector2(9.28125, 16.0938)
|
||||||
|
cache/0/16/0/glyphs/134217796/offset = Vector2(-1, -10)
|
||||||
|
cache/0/16/0/glyphs/134217796/size = Vector2(11, 11)
|
||||||
|
cache/0/16/0/glyphs/134217796/uv_rect = Rect2(82, 123, 11, 11)
|
||||||
|
cache/0/16/0/glyphs/134217796/texture_idx = 0
|
||||||
|
cache/0/16/0/glyphs/402653223/advance = Vector2(11.75, 16.0938)
|
||||||
|
cache/0/16/0/glyphs/402653223/offset = Vector2(1, -13)
|
||||||
|
cache/0/16/0/glyphs/402653223/size = Vector2(12, 14)
|
||||||
|
cache/0/16/0/glyphs/402653223/uv_rect = Rect2(95, 123, 12, 14)
|
||||||
|
cache/0/16/0/glyphs/402653223/texture_idx = 0
|
||||||
|
cache/0/16/0/glyphs/268435495/advance = Vector2(11.75, 16.0938)
|
||||||
|
cache/0/16/0/glyphs/268435495/offset = Vector2(1, -13)
|
||||||
|
cache/0/16/0/glyphs/268435495/size = Vector2(12, 14)
|
||||||
|
cache/0/16/0/glyphs/268435495/uv_rect = Rect2(109, 123, 12, 14)
|
||||||
|
cache/0/16/0/glyphs/268435495/texture_idx = 0
|
||||||
|
cache/0/16/0/glyphs/402653269/advance = Vector2(6.90625, 16.0938)
|
||||||
|
cache/0/16/0/glyphs/402653269/offset = Vector2(1, -10)
|
||||||
|
cache/0/16/0/glyphs/402653269/size = Vector2(8, 11)
|
||||||
|
cache/0/16/0/glyphs/402653269/uv_rect = Rect2(123, 123, 8, 11)
|
||||||
|
cache/0/16/0/glyphs/402653269/texture_idx = 0
|
||||||
cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
|
cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
|
||||||
cache/0/16/0/kerning_overrides/30/0 = Vector2(0, 0)
|
cache/0/16/0/kerning_overrides/30/0 = Vector2(0, 0)
|
||||||
cache/0/16/0/kerning_overrides/32/0 = Vector2(0, 0)
|
cache/0/16/0/kerning_overrides/32/0 = Vector2(0, 0)
|
||||||
@@ -1618,7 +1678,7 @@ cache/0/25/0/descent = 8.0
|
|||||||
cache/0/25/0/underline_position = 2.5
|
cache/0/25/0/underline_position = 2.5
|
||||||
cache/0/25/0/underline_thickness = 1.25
|
cache/0/25/0/underline_thickness = 1.25
|
||||||
cache/0/25/0/scale = 1.0
|
cache/0/25/0/scale = 1.0
|
||||||
cache/0/25/0/textures/0/offsets = PackedInt32Array(238, 0, 18, 22, 89, 22, 167, 24, 22, 46, 234, 27)
|
cache/0/25/0/textures/0/offsets = PackedInt32Array(238, 0, 18, 22, 106, 22, 150, 24, 22, 46, 234, 27)
|
||||||
cache/0/25/0/textures/0/image = SubResource("Image_hvlis")
|
cache/0/25/0/textures/0/image = SubResource("Image_hvlis")
|
||||||
cache/0/25/0/glyphs/50/advance = Vector2(20, 25)
|
cache/0/25/0/glyphs/50/advance = Vector2(20, 25)
|
||||||
cache/0/25/0/glyphs/50/offset = Vector2(0, -19)
|
cache/0/25/0/glyphs/50/offset = Vector2(0, -19)
|
||||||
@@ -1735,6 +1795,11 @@ cache/0/25/0/glyphs/48/offset = Vector2(1, -19)
|
|||||||
cache/0/25/0/glyphs/48/size = Vector2(21, 20)
|
cache/0/25/0/glyphs/48/size = Vector2(21, 20)
|
||||||
cache/0/25/0/glyphs/48/uv_rect = Rect2(67, 23, 21, 20)
|
cache/0/25/0/glyphs/48/uv_rect = Rect2(67, 23, 21, 20)
|
||||||
cache/0/25/0/glyphs/48/texture_idx = 0
|
cache/0/25/0/glyphs/48/texture_idx = 0
|
||||||
|
cache/0/25/0/glyphs/69/advance = Vector2(16, 25)
|
||||||
|
cache/0/25/0/glyphs/69/offset = Vector2(1, -20)
|
||||||
|
cache/0/25/0/glyphs/69/size = Vector2(15, 21)
|
||||||
|
cache/0/25/0/glyphs/69/uv_rect = Rect2(90, 23, 15, 21)
|
||||||
|
cache/0/25/0/glyphs/69/texture_idx = 0
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_s11c6"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_s11c6"]
|
||||||
content_margin_left = 12.0
|
content_margin_left = 12.0
|
||||||
@@ -2212,7 +2277,6 @@ corner_radius_bottom_left = 8
|
|||||||
size = Vector2(0, 0)
|
size = Vector2(0, 0)
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
default_font_size = 25
|
|
||||||
Button/colors/font_color = Color(0.875, 0.875, 0.875, 1)
|
Button/colors/font_color = Color(0.875, 0.875, 0.875, 1)
|
||||||
Button/constants/h_separation = 4
|
Button/constants/h_separation = 4
|
||||||
Button/constants/icon_max_width = 0
|
Button/constants/icon_max_width = 0
|
||||||
@@ -2261,6 +2325,10 @@ LineEdit/colors/font_placeholder_color = Color(1, 1, 1, 0.27451)
|
|||||||
LineEdit/styles/focus = SubResource("StyleBoxFlat_cfx35")
|
LineEdit/styles/focus = SubResource("StyleBoxFlat_cfx35")
|
||||||
LineEdit/styles/normal = SubResource("StyleBoxFlat_0nfa3")
|
LineEdit/styles/normal = SubResource("StyleBoxFlat_0nfa3")
|
||||||
LineEdit/styles/read_only = SubResource("StyleBoxFlat_fdq0g")
|
LineEdit/styles/read_only = SubResource("StyleBoxFlat_fdq0g")
|
||||||
|
MarginContainer/constants/margin_bottom = 15
|
||||||
|
MarginContainer/constants/margin_left = 15
|
||||||
|
MarginContainer/constants/margin_right = 15
|
||||||
|
MarginContainer/constants/margin_top = 15
|
||||||
MenuButton/styles/disabled = SubResource("StyleBoxFlat_l5ore")
|
MenuButton/styles/disabled = SubResource("StyleBoxFlat_l5ore")
|
||||||
MenuButton/styles/focus = SubResource("StyleBoxFlat_l5ore")
|
MenuButton/styles/focus = SubResource("StyleBoxFlat_l5ore")
|
||||||
MenuButton/styles/hover = SubResource("StyleBoxFlat_5kevk")
|
MenuButton/styles/hover = SubResource("StyleBoxFlat_5kevk")
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ public partial class Main : Node2D
|
|||||||
// board.Visible = false;
|
// board.Visible = false;
|
||||||
// board.Can
|
// board.Can
|
||||||
global = GetNode<Global>("/root/Global");
|
global = GetNode<Global>("/root/Global");
|
||||||
|
global.GlobalTheme = GetChild<Control>(GetChildCount() - 1).Theme;
|
||||||
|
global.ConfigFlush();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
@@ -54,7 +56,7 @@ public partial class Main : Node2D
|
|||||||
|
|
||||||
private void GoToMultiPlayer() {
|
private void GoToMultiPlayer() {
|
||||||
// global.GotoScene("res://Scenes/MultiPlayer.tscn");
|
// global.GotoScene("res://Scenes/MultiPlayer.tscn");
|
||||||
global.GotoScene("res://Scenes/Menu.tscn");
|
global.GotoScene("res://Scenes/GameLobby.tscn");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GoToSetting() {
|
private void GoToSetting() {
|
||||||
|
|||||||
+55
-37
@@ -8,50 +8,68 @@
|
|||||||
script = ExtResource("1_3x8ac")
|
script = ExtResource("1_3x8ac")
|
||||||
|
|
||||||
[node name="Chessboard" parent="." instance=ExtResource("1_yheur")]
|
[node name="Chessboard" parent="." instance=ExtResource("1_yheur")]
|
||||||
position = Vector2(360, 660)
|
position = Vector2(360, 600)
|
||||||
scale = Vector2(2.5, 2.5)
|
scale = Vector2(2.5, 2.5)
|
||||||
|
|
||||||
[node name="Control" type="Control" parent="."]
|
[node name="Control" type="Control" parent="."]
|
||||||
|
custom_minimum_size = Vector2(720, 1280)
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 0
|
anchors_preset = 0
|
||||||
offset_right = 40.0
|
offset_right = 720.0
|
||||||
offset_bottom = 40.0
|
offset_bottom = 1280.0
|
||||||
theme = ExtResource("3_rcfhx")
|
theme = ExtResource("3_rcfhx")
|
||||||
|
|
||||||
[node name="Over" type="Button" parent="Control"]
|
[node name="MarginContainer" type="MarginContainer" parent="Control"]
|
||||||
layout_mode = 0
|
layout_mode = 1
|
||||||
offset_left = 270.0
|
anchors_preset = 10
|
||||||
offset_top = 1105.0
|
anchor_right = 1.0
|
||||||
offset_right = 449.0
|
offset_bottom = 81.0
|
||||||
offset_bottom = 1209.0
|
grow_horizontal = 2
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="Control/MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="Control/MarginContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="Home" type="Button" parent="Control/MarginContainer/HBoxContainer/MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "返回主页"
|
||||||
|
|
||||||
|
[node name="MarginContainer2" type="MarginContainer" parent="Control/MarginContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="Undo" type="Button" parent="Control/MarginContainer/HBoxContainer/MarginContainer2"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 4
|
||||||
|
text = "撤回"
|
||||||
|
|
||||||
|
[node name="MarginContainer3" type="MarginContainer" parent="Control/MarginContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="ReInit" type="Button" parent="Control/MarginContainer/HBoxContainer/MarginContainer3"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "重开"
|
||||||
|
|
||||||
|
[node name="MarginContainer2" type="MarginContainer" parent="Control"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 12
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_top = -114.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 0
|
||||||
|
|
||||||
|
[node name="Over" type="Button" parent="Control/MarginContainer2"]
|
||||||
|
layout_mode = 2
|
||||||
text = "结束回合
|
text = "结束回合
|
||||||
(提示对方结束)"
|
(提示对方结束)"
|
||||||
|
|
||||||
[node name="Home" type="Button" parent="Control"]
|
[connection signal="pressed" from="Control/MarginContainer/HBoxContainer/MarginContainer/Home" to="." method="GoHome"]
|
||||||
layout_mode = 0
|
[connection signal="pressed" from="Control/MarginContainer/HBoxContainer/MarginContainer2/Undo" to="." method="Undo"]
|
||||||
offset_left = 55.0
|
[connection signal="pressed" from="Control/MarginContainer/HBoxContainer/MarginContainer3/ReInit" to="." method="ReInit"]
|
||||||
offset_top = 56.0
|
[connection signal="pressed" from="Control/MarginContainer2/Over" to="." method="BtnOver"]
|
||||||
offset_right = 157.0
|
|
||||||
offset_bottom = 164.0
|
|
||||||
text = "返回主页"
|
|
||||||
|
|
||||||
[node name="Undo" type="Button" parent="Control"]
|
|
||||||
layout_mode = 0
|
|
||||||
offset_left = 319.0
|
|
||||||
offset_top = 58.0
|
|
||||||
offset_right = 419.0
|
|
||||||
offset_bottom = 158.0
|
|
||||||
text = "撤回"
|
|
||||||
|
|
||||||
[node name="ReInit" type="Button" parent="Control"]
|
|
||||||
layout_mode = 0
|
|
||||||
offset_left = 578.0
|
|
||||||
offset_top = 55.0
|
|
||||||
offset_right = 678.0
|
|
||||||
offset_bottom = 155.0
|
|
||||||
text = "重开"
|
|
||||||
|
|
||||||
[connection signal="pressed" from="Control/Over" to="." method="BtnOver"]
|
|
||||||
[connection signal="pressed" from="Control/Home" to="." method="GoHome"]
|
|
||||||
[connection signal="pressed" from="Control/Undo" to="." method="Undo"]
|
|
||||||
[connection signal="pressed" from="Control/ReInit" to="." method="ReInit"]
|
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
[gd_scene format=3 uid="uid://pc83bstfltn"]
|
||||||
|
|
||||||
|
[node name="ServerStatus" type="HBoxContainer"]
|
||||||
|
anchors_preset = -1
|
||||||
|
anchor_right = 0.176389
|
||||||
|
anchor_bottom = 0.0179687
|
||||||
|
offset_right = -126.0
|
||||||
|
metadata/_edit_use_anchors_ = true
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
text = "Server Status"
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
|
custom_minimum_size = Vector2(15, 15)
|
||||||
|
layout_mode = 2
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://00jxjgnmfbn7"]
|
||||||
|
|
||||||
|
[ext_resource type="Theme" uid="uid://intlbeu8h82r" path="res://Asserts/defaultTheme.tres" id="1_ge0tq"]
|
||||||
|
[ext_resource type="Script" path="res://Scripts/Controllers/GameLobby.cs" id="2_blx46"]
|
||||||
|
|
||||||
|
[node name="GameLobby" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme = ExtResource("1_ge0tq")
|
||||||
|
script = ExtResource("2_blx46")
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Button" type="Button" parent="MarginContainer/VBoxContainer/MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Back
|
||||||
|
"
|
||||||
|
|
||||||
|
[node name="MarginContainer2" type="HFlowContainer" parent="MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/MarginContainer2"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/MarginContainer2/MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Connect States"
|
||||||
|
|
||||||
|
[node name="MarginContainer2" type="MarginContainer" parent="MarginContainer/VBoxContainer/MarginContainer2"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="MarginContainer/VBoxContainer/MarginContainer2/MarginContainer2"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="MarginContainer3" type="MarginContainer" parent="MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
|
||||||
|
[node name="ItemList" type="ItemList" parent="MarginContainer/VBoxContainer/MarginContainer3"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Dialogs" type="Control" parent="."]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 0
|
||||||
|
|
||||||
|
[node name="AcceptDialog" type="AcceptDialog" parent="Dialogs"]
|
||||||
|
auto_translate_mode = 1
|
||||||
|
initial_position = 2
|
||||||
|
size = Vector2i(100, 118)
|
||||||
|
|
||||||
|
[node name="PopupMenu" type="PopupMenu" parent="Dialogs"]
|
||||||
|
auto_translate_mode = 1
|
||||||
|
|
||||||
|
[node name="ConfirmationDialog" type="ConfirmationDialog" parent="Dialogs"]
|
||||||
|
auto_translate_mode = 1
|
||||||
|
initial_position = 2
|
||||||
|
size = Vector2i(200, 118)
|
||||||
|
|
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/MarginContainer/Button" to="." method="OnBack"]
|
||||||
|
[connection signal="item_activated" from="MarginContainer/VBoxContainer/MarginContainer3/ItemList" to="." method="OnItemSelected"]
|
||||||
+3
-1
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=3 format=3 uid="uid://cl8nkm6j8s8jh"]
|
[gd_scene load_steps=3 format=3 uid="uid://bc7w0h2x4bbdh"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://Scripts/Controllers/Menu.cs" id="1_chiyi"]
|
[ext_resource type="Script" path="res://Scripts/Controllers/Menu.cs" id="1_chiyi"]
|
||||||
[ext_resource type="Theme" uid="uid://intlbeu8h82r" path="res://Asserts/defaultTheme.tres" id="1_mkeko"]
|
[ext_resource type="Theme" uid="uid://intlbeu8h82r" path="res://Asserts/defaultTheme.tres" id="1_mkeko"]
|
||||||
@@ -13,6 +13,7 @@ grow_vertical = 2
|
|||||||
theme = ExtResource("1_mkeko")
|
theme = ExtResource("1_mkeko")
|
||||||
script = ExtResource("1_chiyi")
|
script = ExtResource("1_chiyi")
|
||||||
metadata/_edit_horizontal_guides_ = [141.0]
|
metadata/_edit_horizontal_guides_ = [141.0]
|
||||||
|
metadata/_edit_use_anchors_ = true
|
||||||
|
|
||||||
[node name="Home" type="Button" parent="."]
|
[node name="Home" type="Button" parent="."]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
@@ -113,6 +114,7 @@ initial_position = 2
|
|||||||
size = Vector2i(200, 118)
|
size = Vector2i(200, 118)
|
||||||
|
|
||||||
[node name="URL" type="LineEdit" parent="."]
|
[node name="URL" type="LineEdit" parent="."]
|
||||||
|
visible = false
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 37.0
|
offset_left = 37.0
|
||||||
offset_top = 290.0
|
offset_top = 290.0
|
||||||
|
|||||||
@@ -0,0 +1,157 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://c6gxufppw1fu3"]
|
||||||
|
|
||||||
|
[ext_resource type="Theme" uid="uid://intlbeu8h82r" path="res://Asserts/defaultTheme.tres" id="1_6yfoi"]
|
||||||
|
[ext_resource type="Script" path="res://Scripts/Controllers/Setting.cs" id="1_xbvb3"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://pc83bstfltn" path="res://Scenes/Entities/ServerStatus.tscn" id="3_e50hu"]
|
||||||
|
|
||||||
|
[node name="Setting" type="MarginContainer"]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme = ExtResource("1_6yfoi")
|
||||||
|
script = ExtResource("1_xbvb3")
|
||||||
|
|
||||||
|
[node name="BoxContainer" type="VBoxContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="BoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Back" type="Button" parent="BoxContainer/MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Back"
|
||||||
|
|
||||||
|
[node name="MarginContainer7" type="MarginContainer" parent="BoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Button" type="Button" parent="BoxContainer/MarginContainer7"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Save"
|
||||||
|
|
||||||
|
[node name="MarginContainer2" type="MarginContainer" parent="BoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Server" type="HFlowContainer" parent="BoxContainer/MarginContainer2"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="BoxContainer/MarginContainer2/Server"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Server IP"
|
||||||
|
|
||||||
|
[node name="LineEdit" type="LineEdit" parent="BoxContainer/MarginContainer2/Server"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="MarginContainer3" type="MarginContainer" parent="BoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Name" type="HFlowContainer" parent="BoxContainer/MarginContainer3"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="BoxContainer/MarginContainer3/Name"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Name"
|
||||||
|
|
||||||
|
[node name="LineEdit" type="LineEdit" parent="BoxContainer/MarginContainer3/Name"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="Button" type="Button" parent="BoxContainer/MarginContainer3/Name"]
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
text = "OK"
|
||||||
|
|
||||||
|
[node name="MarginContainer4" type="MarginContainer" parent="BoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="HFlowContainer" type="HFlowContainer" parent="BoxContainer/MarginContainer4"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ServerStatus" parent="BoxContainer/MarginContainer4/HFlowContainer" instance=ExtResource("3_e50hu")]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="CheckButton" type="CheckButton" parent="BoxContainer/MarginContainer4/HFlowContainer"]
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Server Start"
|
||||||
|
|
||||||
|
[node name="MarginContainer5" type="MarginContainer" parent="BoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HFlowContainer" parent="BoxContainer/MarginContainer5"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="BoxContainer/MarginContainer5/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Font Size"
|
||||||
|
|
||||||
|
[node name="FontSize" type="LineEdit" parent="BoxContainer/MarginContainer5/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="MarginContainer6" type="MarginContainer" parent="BoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="FontSizeBar" type="HSlider" parent="BoxContainer/MarginContainer6"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 4
|
||||||
|
min_value = 10.0
|
||||||
|
max_value = 50.0
|
||||||
|
value = 10.0
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HFlowContainer" parent="BoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="BoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="Button" type="Button" parent="BoxContainer/HBoxContainer/MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "Clear Config"
|
||||||
|
|
||||||
|
[node name="MarginContainer2" type="MarginContainer" parent="BoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="Button2" type="Button" parent="BoxContainer/HBoxContainer/MarginContainer2"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Clear User Data"
|
||||||
|
|
||||||
|
[node name="HFlowContainer" type="HFlowContainer" parent="BoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Button" type="Button" parent="BoxContainer/HFlowContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "GetCacheDir"
|
||||||
|
|
||||||
|
[node name="Button2" type="Button" parent="BoxContainer/HFlowContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "GetConfigDir"
|
||||||
|
|
||||||
|
[node name="Button3" type="Button" parent="BoxContainer/HFlowContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "GetDataDir"
|
||||||
|
|
||||||
|
[node name="Button4" type="Button" parent="BoxContainer/HFlowContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "GetUserDataDir"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="BoxContainer/MarginContainer/Back" to="." method="OnBack"]
|
||||||
|
[connection signal="text_changed" from="BoxContainer/MarginContainer2/Server/LineEdit" to="." method="OnServerUrlChanged"]
|
||||||
|
[connection signal="text_changed" from="BoxContainer/MarginContainer3/Name/LineEdit" to="." method="OnNameChanged"]
|
||||||
|
[connection signal="value_changed" from="BoxContainer/MarginContainer6/FontSizeBar" to="." method="OnFontSizeChanged"]
|
||||||
|
[connection signal="pressed" from="BoxContainer/HBoxContainer/MarginContainer2/Button2" to="." method="OnClearUserData"]
|
||||||
|
[connection signal="pressed" from="BoxContainer/HFlowContainer/Button" to="." method="OnGetCacheDir"]
|
||||||
|
[connection signal="pressed" from="BoxContainer/HFlowContainer/Button2" to="." method="OnGetConfigDir"]
|
||||||
|
[connection signal="pressed" from="BoxContainer/HFlowContainer/Button3" to="." method="OnGetDataDir"]
|
||||||
|
[connection signal="pressed" from="BoxContainer/HFlowContainer/Button4" to="." method="OnGetUserDataDir"]
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[gd_scene format=3 uid="uid://dp044iptyvvh"]
|
|
||||||
|
|
||||||
[node name="Web" type="Node"]
|
|
||||||
@@ -7,8 +7,9 @@ public partial class ChessGame : Node2D
|
|||||||
Global global;
|
Global global;
|
||||||
ConfirmationDialog dialog;
|
ConfirmationDialog dialog;
|
||||||
private bool isSession = false;
|
private bool isSession = false;
|
||||||
private Vector2 from;
|
|
||||||
private Vector2 to;
|
private Player playerSelf;
|
||||||
|
private Player playerOpponent;
|
||||||
|
|
||||||
// Called when the node enters the scene tree for the first time.
|
// Called when the node enters the scene tree for the first time.
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
@@ -16,45 +17,47 @@ public partial class ChessGame : Node2D
|
|||||||
// Init.Call();
|
// Init.Call();
|
||||||
global = GetNode<Global>("/root/Global");
|
global = GetNode<Global>("/root/Global");
|
||||||
board = GetNode<ChessBoard>("Chessboard");
|
board = GetNode<ChessBoard>("Chessboard");
|
||||||
|
|
||||||
|
playerSelf = new Player(board.board, Player.PlayerType.Human);
|
||||||
|
playerOpponent = new Player(board.board, Player.PlayerType.Human);
|
||||||
|
|
||||||
|
board.OnMouseClicked += (sender, clickPosition) => {
|
||||||
|
Vector2 clickBoardPos = (PosTrans.transArrToPix.AffineInverse() *
|
||||||
|
clickPosition).Round();
|
||||||
|
|
||||||
|
playerSelf.HandleBoardPosClick(clickBoardPos);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
dialog = new ConfirmationDialog {
|
dialog = new ConfirmationDialog {
|
||||||
DialogAutowrap = true,
|
DialogAutowrap = true,
|
||||||
MinSize = new Vector2I(400, 200),
|
MinSize = new Vector2I(400, 200),
|
||||||
Position = new Vector2I(200, 400),
|
Position = new Vector2I(200, 400),
|
||||||
};
|
};
|
||||||
AddChild(dialog);
|
AddChild(dialog);
|
||||||
// GetNode<Button>("Undo").Connect("pressed", Callable.From(board.Undo));
|
|
||||||
// GetNode<Button>("ReInit").Connect("pressed", Callable.From(board.ReInit));
|
|
||||||
// GetNode<Button>("Home").Connect("pressed", Callable.From(this.GoHome));
|
|
||||||
|
|
||||||
if (!global.RPClient.GetIsConnected()) {
|
if (!global.RPClient.GetIsConnected()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
isSession = true;
|
isSession = true;
|
||||||
GD.Print("ws is connected");
|
GD.Print("ws is connected");
|
||||||
|
|
||||||
global.RPClient.OnPRCSessionExit += (cmd, code) => {
|
global.RPClient.OnPRCSessionExit += (cmd, code) => {
|
||||||
GoHome();
|
GoHome();
|
||||||
};
|
};
|
||||||
// board.Set("Hello", Callable.From(() => {GD.PrintErr("hello");}));
|
|
||||||
board.board.OnMove += (sender, args) => {
|
board.OnMouseClicked += (sender, clickPosition) => {
|
||||||
Vector2 newPos = args.To;
|
Vector2 clickBoardPos = (PosTrans.transArrToPix.AffineInverse() *
|
||||||
Vector2 fromPos = args.From;
|
clickPosition).Round();
|
||||||
if (from.X == fromPos.X && from.Y == fromPos.Y && to.X == newPos.X && to.Y == newPos.Y) {
|
|
||||||
return;
|
var res = global.RPClient.SendSessionToAll(global.sessionId, new Dictionary {
|
||||||
}
|
{"type", "mouseClicked"},
|
||||||
from = fromPos;
|
{"X", clickBoardPos.X},
|
||||||
to = newPos;
|
{"Y", clickBoardPos.Y},
|
||||||
var res = global.RPClient.SendSessionToAll(global.sessionId, new Dictionary{
|
|
||||||
{"type", "move"},
|
|
||||||
{"from", fromPos},
|
|
||||||
{"to", newPos},
|
|
||||||
{"fromX", fromPos.X},
|
|
||||||
{"fromY", fromPos.Y},
|
|
||||||
{"toX", newPos.X},
|
|
||||||
{"toY", newPos.Y},
|
|
||||||
});
|
});
|
||||||
GD.Print($"chessMoveFunc Callback {fromPos} -> {newPos} {res}");
|
// GD.Print($"chessMoveFunc Callback {fromPos} -> {newPos} {res}");
|
||||||
};
|
};
|
||||||
|
|
||||||
global.RPClient.OnPRCSessionRecv += (msg) => {
|
global.RPClient.OnPRCSessionRecv += (msg) => {
|
||||||
SessionMsgHandle(msg["msg"].AsGodotDictionary());
|
SessionMsgHandle(msg["msg"].AsGodotDictionary());
|
||||||
};
|
};
|
||||||
@@ -75,18 +78,10 @@ public partial class ChessGame : Node2D
|
|||||||
dialog.DialogText = "Turn On You\n";
|
dialog.DialogText = "Turn On You\n";
|
||||||
dialog.Visible = true;
|
dialog.Visible = true;
|
||||||
break;
|
break;
|
||||||
case "move":
|
case "mouseClicked":
|
||||||
Vector2 _to = new(GD.StrToVar(msg["toX"].ToString()).AsInt32(),
|
Vector2 mouseClicked = new(GD.StrToVar(msg["X"].ToString()).AsInt32(),
|
||||||
GD.StrToVar(msg["toY"].ToString()).AsInt32());
|
GD.StrToVar(msg["Y"].ToString()).AsInt32());
|
||||||
|
playerOpponent.HandleBoardPosClick(mouseClicked);
|
||||||
Vector2 _from = new(GD.StrToVar(msg["fromX"].ToString()).AsInt32(),
|
|
||||||
GD.StrToVar(msg["fromY"].ToString()).AsInt32());
|
|
||||||
if (_to.X == to.X && _to.Y == to.Y && _from.X == from.X && _from.Y == from.Y) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
to = _to;
|
|
||||||
from = _from;
|
|
||||||
board.playerSelf.MoveAndRecord(to, from);
|
|
||||||
break;
|
break;
|
||||||
case "undo":
|
case "undo":
|
||||||
_Undo();
|
_Undo();
|
||||||
@@ -98,16 +93,16 @@ public partial class ChessGame : Node2D
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void _Undo() {
|
private void _Undo() {
|
||||||
board.playerSelf.Undo();
|
playerSelf.Undo();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _ReInit() {
|
private void _ReInit() {
|
||||||
board.playerSelf.ReInit();
|
playerSelf.ReInit();
|
||||||
board.InitChessBoard();
|
board.InitChessBoard();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BtnOver() {
|
private void BtnOver() {
|
||||||
GD.PrintErr($"BtnOver {isSession}");
|
GD.Print($"BtnOver {isSession}");
|
||||||
if (isSession == false) {
|
if (isSession == false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -125,22 +120,26 @@ public partial class ChessGame : Node2D
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void Undo() {
|
public void Undo() {
|
||||||
GD.PrintErr($"Undo {isSession}");
|
GD.Print($"Undo {isSession}");
|
||||||
if (isSession == false) {
|
|
||||||
|
if (isSession) {
|
||||||
|
global.RPClient.SendSessionToAll(global.sessionId, new Dictionary{
|
||||||
|
{"type", "undo"},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
_Undo();
|
_Undo();
|
||||||
}
|
}
|
||||||
global.RPClient.SendSessionToAll(global.sessionId, new Dictionary{
|
|
||||||
{"type", "undo"},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReInit() {
|
public void ReInit() {
|
||||||
GD.PrintErr($"ReInit {isSession}");
|
GD.PrintErr($"ReInit {isSession}");
|
||||||
if (isSession == false) {
|
|
||||||
|
if (isSession) {
|
||||||
|
global.RPClient.SendSessionToAll(global.sessionId, new Dictionary{
|
||||||
|
{"type", "reInit"},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
_ReInit();
|
_ReInit();
|
||||||
}
|
}
|
||||||
global.RPClient.SendSessionToAll(global.sessionId, new Dictionary{
|
|
||||||
{"type", "reInit"},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,48 +1,50 @@
|
|||||||
using Godot;
|
using Godot;
|
||||||
using Godot.Collections;
|
using Godot.Collections;
|
||||||
|
|
||||||
public partial class Menu : Control
|
public partial class GameLobby : Control {
|
||||||
{
|
Global global = null;
|
||||||
Global global = null;
|
|
||||||
ItemList lists = null;
|
|
||||||
ConfirmationDialog dialog = null;
|
|
||||||
LineEdit nameLineEdit = null;
|
|
||||||
LineEdit urlLineEdit = null;
|
|
||||||
ColorRect colorRect = null;
|
|
||||||
Timer timer = null;
|
Timer timer = null;
|
||||||
|
|
||||||
// Called when the node enters the scene tree for the first time.
|
ItemList lists = null;
|
||||||
public override void _Ready()
|
ConfirmationDialog dialog = null;
|
||||||
{
|
|
||||||
global = GetNode<Global>("/root/Global");
|
|
||||||
nameLineEdit = GetNode<LineEdit>("Name/LineEdit");
|
|
||||||
urlLineEdit = GetNode<LineEdit>("URL");
|
|
||||||
urlLineEdit.Text = global.URL;
|
|
||||||
urlLineEdit.Set("text_submitted", Callable.From(()=>{
|
|
||||||
global.URL = urlLineEdit.Text;
|
|
||||||
}));
|
|
||||||
|
|
||||||
lists = GetNode<ItemList>("Server/ItemList");
|
string URL;
|
||||||
|
string userName;
|
||||||
|
|
||||||
|
// Called when the node enters the scene tree for the first time.
|
||||||
|
public override void _Ready() {
|
||||||
|
global = GetNode<Global>("/root/Global");
|
||||||
|
lists = GetNode<ItemList>("MarginContainer/VBoxContainer/MarginContainer3/ItemList");
|
||||||
dialog = GetNode<ConfirmationDialog>("Dialogs/ConfirmationDialog");
|
dialog = GetNode<ConfirmationDialog>("Dialogs/ConfirmationDialog");
|
||||||
colorRect = GetNode<ColorRect>("Server/ColorRect");
|
URL = global.GlobalConfigDict["server_url"].AsString();
|
||||||
dialog.DialogAutowrap = true;
|
userName = global.GlobalConfigDict["user_name"].AsString();
|
||||||
|
|
||||||
dialog.MinSize = new Vector2I(400, 200);
|
dialog.MinSize = new Vector2I(400, 200);
|
||||||
|
dialog.DialogAutowrap = true;
|
||||||
dialog.Canceled += () => {
|
dialog.Canceled += () => {
|
||||||
if (dialog.Title == "Session Created")
|
if (dialog.Title == "Session Created")
|
||||||
global.RPClient.SessionAckCreate(dialog.GetMeta("sessionId").ToString(), false);
|
global.RPClient.SessionAckCreate(dialog.GetMeta("sessionId").ToString(), false);
|
||||||
};
|
};
|
||||||
dialog.Confirmed += () => {
|
dialog.Confirmed += () => {
|
||||||
// GD.PrintErr("confirm", dialog.GetLabel().Text);
|
|
||||||
// goToSignle();
|
|
||||||
if (dialog.Title == "Session Created")
|
if (dialog.Title == "Session Created")
|
||||||
global.RPClient.SessionAckCreate(dialog.GetMeta("sessionId").ToString(), true);
|
global.RPClient.SessionAckCreate(dialog.GetMeta("sessionId").ToString(), true);
|
||||||
};
|
};
|
||||||
|
|
||||||
global.RPClient.RegSessionAckCreateCallback((
|
global.RPClient.OnOpen += (string eventName, object[] args) => {
|
||||||
sessionId,
|
global.RPClient.UserInit(userName, "godot chessboard", () => {
|
||||||
res,
|
global.RPClient.UserRename(userName);
|
||||||
reqUserId,
|
return global.RPClient.RegionAdd("server");
|
||||||
reqUserName) => {
|
});
|
||||||
|
};
|
||||||
|
// global.RPClient.OnOpen += (eventName, args) => {
|
||||||
|
// global.RPClient.UserInit(userName, "none", () => {
|
||||||
|
// GD.PrintErr($"User Init Success");
|
||||||
|
|
||||||
|
// return true;
|
||||||
|
// });
|
||||||
|
// // global.RPClient.UserRename(userName);
|
||||||
|
// };
|
||||||
|
global.RPClient.RegSessionAckCreateCallback((sessionId, res, reqUserId, reqUserName) => {
|
||||||
if (reqUserId != null) {
|
if (reqUserId != null) {
|
||||||
dialog.Title = "Session Created";
|
dialog.Title = "Session Created";
|
||||||
dialog.SetMeta("reqUserName", reqUserName);
|
dialog.SetMeta("reqUserName", reqUserName);
|
||||||
@@ -65,34 +67,43 @@ public partial class Menu : Control
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
timer = new Timer();
|
timer = new Timer();
|
||||||
AddChild(timer);
|
AddChild(timer);
|
||||||
|
ColorRect colorRect = GetNode<ColorRect>("MarginContainer/VBoxContainer/MarginContainer2/MarginContainer2/ColorRect");
|
||||||
timer.Connect("timeout", Callable.From(() => {
|
timer.Connect("timeout", Callable.From(() => {
|
||||||
if (global.RPClient.GetIsConnected()) {
|
if (global.RPClient.GetIsConnected()) {
|
||||||
colorRect.Color = Colors.Green;
|
colorRect.Color = Colors.Green;
|
||||||
} else {
|
} else {
|
||||||
colorRect.Color = Colors.Red;
|
colorRect.Color = Colors.Red;
|
||||||
}
|
}
|
||||||
|
FlushData();
|
||||||
}));
|
}));
|
||||||
timer.Start(1);
|
timer.Start(1);
|
||||||
|
|
||||||
|
Connect();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Connect() {
|
||||||
|
GD.Print("Connect");
|
||||||
|
if (global.RPClient.GetIsConnected()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// global.RPClient.ExitServer();
|
||||||
|
global.RPClient.ConnectToUrlEx(URL);
|
||||||
|
global.SetProcess(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
private void OnItemSelected(int index) {
|
||||||
public override void _Process(double delta) {
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnItemSelected(int index) {
|
|
||||||
Dictionary item = lists.GetItemMetadata(index).AsGodotDictionary();
|
Dictionary item = lists.GetItemMetadata(index).AsGodotDictionary();
|
||||||
GD.Print($"Item {index} selected, {item}");
|
GD.Print($"Item {index} selected, {item}");
|
||||||
string[] strings = { item["id"].ToString() };
|
string[] strings = { item["id"].ToString() };
|
||||||
global.RPClient.SessionCreate(strings);
|
global.RPClient.SessionCreate(strings);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FlushData()
|
private void FlushData() {
|
||||||
{
|
|
||||||
global.RPClient.RegionInspect("server", (data) => {
|
global.RPClient.RegionInspect("server", (data) => {
|
||||||
GD.Print(data);
|
// GD.Print(data);
|
||||||
lists.Clear();
|
lists?.Clear();
|
||||||
foreach (Dictionary<string, string> user in data) {
|
foreach (Dictionary<string, string> user in data) {
|
||||||
string userId = user["id"].ToString();
|
string userId = user["id"].ToString();
|
||||||
string userName = user["name"].ToString();
|
string userName = user["name"].ToString();
|
||||||
@@ -110,27 +121,9 @@ public partial class Menu : Control
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Connect()
|
|
||||||
{
|
|
||||||
GD.Print("Connect");
|
|
||||||
global.RPClient.ExitServer();
|
|
||||||
global.RPClient.ConnectToUrlEx(urlLineEdit.Text);
|
|
||||||
global.SetProcess(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void EnterName() {
|
private void OnBack() {
|
||||||
var newLine = nameLineEdit.Text;
|
|
||||||
global.RPClient.UserRename(newLine);
|
|
||||||
nameLineEdit.Text = newLine;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void goToHome() {
|
|
||||||
global.RPClient.ExitServer();
|
global.RPClient.ExitServer();
|
||||||
global.GotoScene("res://Main.tscn");
|
global.GotoScene("res://Main.tscn");
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void OnItemListItemClicked(int index, Vector2 atPosition, int mouse_button_index)
|
|
||||||
// {
|
|
||||||
// GD.Print($"Item {index} clicked at {atPosition} with mouse button index {mouse_button_index}");
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
public partial class Setting : Control
|
||||||
|
{
|
||||||
|
Global global;
|
||||||
|
int font_size;
|
||||||
|
LineEdit fontOut;
|
||||||
|
|
||||||
|
// Called when the node enters the scene tree for the first time.
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
global = GetNode<Global>("/root/Global");
|
||||||
|
fontOut = GetNode<LineEdit>("BoxContainer/MarginContainer5/HBoxContainer/FontSize");
|
||||||
|
font_size = (int)global.GlobalConfigDict["font_size"];
|
||||||
|
GetNode<HSlider>("BoxContainer/MarginContainer6/FontSizeBar")
|
||||||
|
.Value = font_size;
|
||||||
|
fontOut.Text = font_size.ToString();
|
||||||
|
|
||||||
|
FillingData();
|
||||||
|
}
|
||||||
|
private void FillingData()
|
||||||
|
{
|
||||||
|
GetNode<LineEdit>("BoxContainer/MarginContainer2/Server/LineEdit")
|
||||||
|
.Text = global.GlobalConfigDict["server_url"].ToString();
|
||||||
|
GetNode<LineEdit>("BoxContainer/MarginContainer3/Name/LineEdit")
|
||||||
|
.Text = global.GlobalConfigDict["user_name"].ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
public override void _Process(double delta)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnBack() {
|
||||||
|
global.SaveConfig();
|
||||||
|
global.GotoScene("res://Main.tscn", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnNameChanged(string Value)
|
||||||
|
{
|
||||||
|
global.GlobalConfigDict["user_name"] = Value;
|
||||||
|
// global.ConfigFlush();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnServerUrlChanged(string Value)
|
||||||
|
{
|
||||||
|
global.GlobalConfigDict["server_url"] = Value;
|
||||||
|
// global.ConfigFlush();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnFontSizeChanged(float Value)
|
||||||
|
{
|
||||||
|
font_size = (int)Value;
|
||||||
|
global.GlobalConfigDict["font_size"] = font_size;
|
||||||
|
global.ConfigFlush();
|
||||||
|
fontOut.Text = font_size.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void OnClearData() {
|
||||||
|
// ProjectSettings.GlobalizePath("user://");
|
||||||
|
// DirAccess.CopyAbsolute("res://userdata", "user://");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void OnClearUserData() {
|
||||||
|
string path = ProjectSettings.GlobalizePath("user://");
|
||||||
|
|
||||||
|
// DirAccess dirAccess = DirAccess.Open(path);
|
||||||
|
// dirAccess.Remove(path);
|
||||||
|
if (DirAccess.RemoveAbsolute(path) != Error.Ok) {
|
||||||
|
FormattableString msg = $"Failed to delete user data at {path}";
|
||||||
|
OS.Alert(msg.ToString(), "Error");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void OnGetCacheDir() {
|
||||||
|
OS.Alert(OS.GetCacheDir(), "Cache Dir");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void OnGetConfigDir() {
|
||||||
|
OS.Alert(OS.GetConfigDir(), "Config Dir");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void OnGetDataDir() {
|
||||||
|
OS.Alert(OS.GetDataDir(), "Data Dir");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void OnGetUserDataDir() {
|
||||||
|
OS.Alert(OS.GetUserDataDir(), "User Data Dir");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
// Chessboard.cs
|
// Chessboard.cs
|
||||||
|
using System;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
public partial class ChessBoard : Node2D {
|
public partial class ChessBoard : Node2D {
|
||||||
@@ -7,6 +8,7 @@ public partial class ChessBoard : Node2D {
|
|||||||
|
|
||||||
public delegate bool ChessMoveFunc(Vector2 toPos, Vector2 fromPos);
|
public delegate bool ChessMoveFunc(Vector2 toPos, Vector2 fromPos);
|
||||||
// public Callable chessMoveFunc { get; set; }
|
// public Callable chessMoveFunc { get; set; }
|
||||||
|
public event EventHandler<Vector2> OnMouseClicked;
|
||||||
|
|
||||||
public override void _Ready() {
|
public override void _Ready() {
|
||||||
board = new VirtualBoard(9, 10);
|
board = new VirtualBoard(9, 10);
|
||||||
@@ -36,17 +38,11 @@ public partial class ChessBoard : Node2D {
|
|||||||
mouseEvent.Pressed &&
|
mouseEvent.Pressed &&
|
||||||
mouseEvent.ButtonIndex == MouseButton.Left) {
|
mouseEvent.ButtonIndex == MouseButton.Left) {
|
||||||
// HandleMouseClick(GetGlobalTransformWithCanvas().AffineInverse() * mouseButton.Position);
|
// HandleMouseClick(GetGlobalTransformWithCanvas().AffineInverse() * mouseButton.Position);
|
||||||
HandleMouseClick(GetLocalMousePosition());
|
|
||||||
|
OnMouseClicked?.Invoke(this, GetLocalMousePosition());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleMouseClick(Vector2 clickPosition) {
|
|
||||||
Vector2 clickBoardPos = (PosTrans.transArrToPix.AffineInverse() *
|
|
||||||
clickPosition).Round();
|
|
||||||
|
|
||||||
playerSelf.HandleBoardPosClick(clickBoardPos);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InsertNode(ChessPiece node, Vector2 arrayPos) {
|
public void InsertNode(ChessPiece node, Vector2 arrayPos) {
|
||||||
AddChild(node);
|
AddChild(node);
|
||||||
VirtualPiece piece = node.GetVirtualPiece();
|
VirtualPiece piece = node.GetVirtualPiece();
|
||||||
@@ -74,65 +70,11 @@ public partial class ChessBoard : Node2D {
|
|||||||
|
|
||||||
private void InitializePieces(string color, int baseY, (string label, int x, int y)[] positions) {
|
private void InitializePieces(string color, int baseY, (string label, int x, int y)[] positions) {
|
||||||
foreach (var (label, x, y) in positions) {
|
foreach (var (label, x, y) in positions) {
|
||||||
InsertNode(new ChessPiece {
|
ChessPiece piece = new ChessPiece {
|
||||||
PieceLabel = label,
|
PieceLabel = label,
|
||||||
LabelColor = new Color(color)
|
LabelColor = new Color(color)
|
||||||
}, new Vector2(x, baseY + y));
|
};
|
||||||
|
InsertNode(piece, new Vector2(x, baseY + y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// using Godot;
|
|
||||||
|
|
||||||
// public enum ChessType
|
|
||||||
// {
|
|
||||||
// Carriage,
|
|
||||||
// Horse,
|
|
||||||
// Elephant,
|
|
||||||
// Advisor,
|
|
||||||
// General,
|
|
||||||
// Cannon,
|
|
||||||
// Pawn
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public class VirtualBoard
|
|
||||||
// {
|
|
||||||
// // ...其他原有成员变量...
|
|
||||||
|
|
||||||
// public VirtualBoard(Node root = null)
|
|
||||||
// {
|
|
||||||
// BoardRoot = root ?? GetTree().CurrentScene; // 如果未提供root,默认为当前场景
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public void InitChessBoard()
|
|
||||||
// {
|
|
||||||
// // 定义黑色和红色棋子的初始位置和类型
|
|
||||||
// var positions = new (Vector2 position, ChessType type)[]
|
|
||||||
// {
|
|
||||||
// // 黑方棋子初始化...
|
|
||||||
// // 示例省略具体位置和类型,你需要根据实际情况填写
|
|
||||||
// // (new Vector2(x, y), ChessType.Pawn),
|
|
||||||
|
|
||||||
// // 红方棋子初始化...
|
|
||||||
// // 同上
|
|
||||||
// };
|
|
||||||
|
|
||||||
// // 初始化棋子
|
|
||||||
// foreach (var (position, type) in positions)
|
|
||||||
// {
|
|
||||||
// var color = position.Y == 0 ? new Color("black") : new Color("red"); // 根据行判断颜色
|
|
||||||
// var piece = CreateChessPiece(type, color);
|
|
||||||
// InsertChess(piece, position);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// private ChessPiece CreateChessPiece(ChessType type, Color labelColor)
|
|
||||||
// {
|
|
||||||
// // 根据ChessType创建对应的棋子实例并设置Label和颜色
|
|
||||||
// // 这里需要你实现具体的逻辑,例如switch case或映射表来决定创建哪种棋子
|
|
||||||
// // 返回创建的棋子实例
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // ...其他原有方法...
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,7 @@ public partial class ChessPiece : Sprite2D {
|
|||||||
private Vector2 textureSize;
|
private Vector2 textureSize;
|
||||||
|
|
||||||
private Label labelOfChessName;
|
private Label labelOfChessName;
|
||||||
private VirtualPiece piece;
|
private readonly VirtualPiece piece;
|
||||||
|
|
||||||
public VirtualPiece GetVirtualPiece() {
|
public VirtualPiece GetVirtualPiece() {
|
||||||
return piece;
|
return piece;
|
||||||
|
|||||||
+42
-6
@@ -1,3 +1,4 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
using Godot;
|
using Godot;
|
||||||
using RPPackage;
|
using RPPackage;
|
||||||
|
|
||||||
@@ -5,28 +6,60 @@ public partial class Global : Node
|
|||||||
{
|
{
|
||||||
public RPClientEDWS RPClient = new();
|
public RPClientEDWS RPClient = new();
|
||||||
public string sessionId;
|
public string sessionId;
|
||||||
public string URL = "wss://game.zzyxyz.com/";
|
|
||||||
public Node CurrentScene { get; set; }
|
public Node CurrentScene { get; set; }
|
||||||
|
public Theme GlobalTheme = null;
|
||||||
|
|
||||||
|
readonly GodotConfigManager GlobalConfig = new("user://config.cfg");
|
||||||
|
public Dictionary<string, Variant> GlobalConfigDict = new() {
|
||||||
|
{"font_size", 20},
|
||||||
|
{"server_url", "wss://game.zzyxyz.com/"},
|
||||||
|
{"user_name", "undefined"}
|
||||||
|
};
|
||||||
|
|
||||||
// Called when the node enters the scene tree for the first time.
|
// Called when the node enters the scene tree for the first time.
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
|
if (OS.GetName() == "Android") {
|
||||||
|
bool ret = OS.RequestPermissions();
|
||||||
|
GD.Print($"RequestPermissions ret is {ret}");
|
||||||
|
}
|
||||||
|
|
||||||
|
// OS.RequestPermissions();
|
||||||
RPClient.OnRPCError += (string errCode, string type, string cmd, string errMsg) => {
|
RPClient.OnRPCError += (string errCode, string type, string cmd, string errMsg) => {
|
||||||
GD.PrintErr($"errCode {errCode}, type/cmd {type}/{cmd}, errMsg {errMsg}");
|
GD.PrintErr($"errCode {errCode}, type/cmd {type}/{cmd}, errMsg {errMsg}");
|
||||||
};
|
};
|
||||||
RPClient.OnClose += (string eventName, object[] args) => {
|
RPClient.OnClose += (string eventName, object[] args) => {
|
||||||
SetProcess(false);
|
SetProcess(false);
|
||||||
};
|
};
|
||||||
RPClient.OnOpen += (string eventName, object[] args) => {
|
|
||||||
RPClient.UserInit("undefined", "godot chessboard", () => {
|
|
||||||
return RPClient.RegionAdd("server");
|
|
||||||
});
|
|
||||||
};
|
|
||||||
Viewport root = GetTree().Root;
|
Viewport root = GetTree().Root;
|
||||||
CurrentScene = root.GetChild(root.GetChildCount() - 1);
|
CurrentScene = root.GetChild(root.GetChildCount() - 1);
|
||||||
|
|
||||||
|
GlobalConfig.LoadConfig("Global", GlobalConfigDict);
|
||||||
SetProcess(false);
|
SetProcess(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ConfigFlush()
|
||||||
|
{
|
||||||
|
int font_size = (int)GlobalConfigDict["font_size"];
|
||||||
|
GlobalTheme.DefaultFontSize = font_size;
|
||||||
|
// GlobalTheme?.SetFontSize("font_size", "Label", font_size);
|
||||||
|
// GlobalTheme?.SetFontSize("font_size", "Button", font_size);
|
||||||
|
// GlobalTheme?.SetFontSize("font_size", "TextEdit", font_size);
|
||||||
|
// GlobalTheme?.SetFontSize("font_size", "LineEdit", font_size);
|
||||||
|
// CurrentScene.GetWindow().AddThemeFontSizeOverride("Control", (int)GlobalConfigDict["font_size"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnGotoScene()
|
||||||
|
{
|
||||||
|
ConfigFlush();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SaveConfig()
|
||||||
|
{
|
||||||
|
GlobalConfig.SaveConfig("Global", GlobalConfigDict);
|
||||||
|
}
|
||||||
|
|
||||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
public override void _Process(double delta)
|
public override void _Process(double delta)
|
||||||
{
|
{
|
||||||
@@ -36,6 +69,7 @@ public partial class Global : Node
|
|||||||
public override void _Notification(int what)
|
public override void _Notification(int what)
|
||||||
{
|
{
|
||||||
if (what == NotificationWMCloseRequest) {
|
if (what == NotificationWMCloseRequest) {
|
||||||
|
SaveConfig();
|
||||||
RPClient.Close();
|
RPClient.Close();
|
||||||
GetTree().Quit(); // default behavior
|
GetTree().Quit(); // default behavior
|
||||||
}
|
}
|
||||||
@@ -81,5 +115,7 @@ public partial class Global : Node
|
|||||||
|
|
||||||
// Optionally, to make it compatible with the SceneTree.change_scene_to_file() API.
|
// Optionally, to make it compatible with the SceneTree.change_scene_to_file() API.
|
||||||
GetTree().CurrentScene = CurrentScene;
|
GetTree().CurrentScene = CurrentScene;
|
||||||
|
|
||||||
|
OnGotoScene();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
using System;
|
|
||||||
using System.Threading;
|
|
||||||
using Godot;
|
using Godot;
|
||||||
using Godot.Collections;
|
using Godot.Collections;
|
||||||
|
|
||||||
@@ -125,7 +123,7 @@ public partial class RPClientEDWS : RPClientBaseEDWS {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ClearRPCClientFunc() {
|
public static void ClearRPCClientFunc() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,7 +131,7 @@ public partial class RPClientEDWS : RPClientBaseEDWS {
|
|||||||
return GetIsConnected() && userId != null;
|
return GetIsConnected() && userId != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ConnectServer(string url) {
|
public static void ConnectServer(string url) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Whitespace-only changes.
@@ -1,10 +1,13 @@
|
|||||||
using Godot;
|
using Vector2 = Godot.Vector2;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
public class Player
|
public class Player {
|
||||||
{
|
private readonly VirtualBoard board;
|
||||||
private VirtualBoard board;
|
private readonly SelectedPiece selectedNode;
|
||||||
private SelectedPiece selectedNode;
|
private readonly MoveRecords<VirtualPiece> moveRecords;
|
||||||
private MoveRecords<VirtualPiece> moveRecords;
|
public EventHandler<VirtualBoard.MoveEventArgs> OnMove;
|
||||||
|
public ArrayList pieces = new();
|
||||||
|
|
||||||
public enum PlayerType {
|
public enum PlayerType {
|
||||||
Human,
|
Human,
|
||||||
@@ -16,7 +19,7 @@ public class Player
|
|||||||
this.board = board;
|
this.board = board;
|
||||||
this.selectedNode = new SelectedPiece(board);
|
this.selectedNode = new SelectedPiece(board);
|
||||||
this.moveRecords = new MoveRecords<VirtualPiece>(onUndoRecordCallback: (newNode, oldNode, newPos, oldPos) => {
|
this.moveRecords = new MoveRecords<VirtualPiece>(onUndoRecordCallback: (newNode, oldNode, newPos, oldPos) => {
|
||||||
GD.Print("Undo: ", newNode, "->", oldNode, ":", newPos, "->", oldPos);
|
// GD.Print("Undo: ", newNode, "->", oldNode, ":", newPos, "->", oldPos);
|
||||||
VirtualPiece newPiece = newNode;
|
VirtualPiece newPiece = newNode;
|
||||||
VirtualPiece oldPiece = oldNode;
|
VirtualPiece oldPiece = oldNode;
|
||||||
this.board.MovePiece(newPos, oldPos);
|
this.board.MovePiece(newPos, oldPos);
|
||||||
@@ -28,7 +31,7 @@ public class Player
|
|||||||
|
|
||||||
public void HandleBoardPosClick(Vector2 clickPos) {
|
public void HandleBoardPosClick(Vector2 clickPos) {
|
||||||
if (board.ArrPosOutOfRange(clickPos)) return;
|
if (board.ArrPosOutOfRange(clickPos)) return;
|
||||||
GD.Print($"VirtualBoard {clickPos} clicked");
|
// GD.Print($"VirtualBoard {clickPos} clicked");
|
||||||
VirtualPiece clickChess = board.GetPiece(clickPos);
|
VirtualPiece clickChess = board.GetPiece(clickPos);
|
||||||
|
|
||||||
if (!selectedNode.HasSelected()) {
|
if (!selectedNode.HasSelected()) {
|
||||||
@@ -43,13 +46,13 @@ public class Player
|
|||||||
selectedNode.Clear();
|
selectedNode.Clear();
|
||||||
} else {
|
} else {
|
||||||
// Move piece
|
// Move piece
|
||||||
GD.Print("default MoveFunc Move: ", selectedNode.GetPos(), "->", clickPos);
|
// GD.Print("default MoveFunc Move: ", selectedNode.GetPos(), "->", clickPos);
|
||||||
MoveAndRecord(clickPos, selectedNode.GetPos());
|
MoveAndRecord(clickPos, selectedNode.GetPos());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MoveAndRecord(Vector2 toPos, Vector2 fromPos) {
|
public void MoveAndRecord(Vector2 toPos, Vector2 fromPos) {
|
||||||
GD.Print($"{fromPos} move to {toPos}");
|
// GD.Print($"{fromPos} move to {toPos}");
|
||||||
VirtualPiece toChess = board.GetPiece(toPos);
|
VirtualPiece toChess = board.GetPiece(toPos);
|
||||||
VirtualPiece fromChess = board.GetPiece(fromPos);
|
VirtualPiece fromChess = board.GetPiece(fromPos);
|
||||||
fromChess?.Selected(false);
|
fromChess?.Selected(false);
|
||||||
@@ -62,6 +65,8 @@ public class Player
|
|||||||
NowNode = toChess;
|
NowNode = toChess;
|
||||||
}
|
}
|
||||||
moveRecords.AddRecord(NowNode, fromChess, toPos, fromPos);
|
moveRecords.AddRecord(NowNode, fromChess, toPos, fromPos);
|
||||||
|
|
||||||
|
OnMove?.Invoke(this, new VirtualBoard.MoveEventArgs { From = fromPos, To = toPos });
|
||||||
board.MovePiece(fromPos, toPos);
|
board.MovePiece(fromPos, toPos);
|
||||||
|
|
||||||
selectedNode.Clear();
|
selectedNode.Clear();
|
||||||
@@ -81,46 +86,39 @@ public class Player
|
|||||||
// board.InitChessBoard();
|
// board.InitChessBoard();
|
||||||
}
|
}
|
||||||
|
|
||||||
private class SelectedPiece
|
private class SelectedPiece {
|
||||||
{
|
|
||||||
// Called when the node enters the scene tree for the first time.
|
// Called when the node enters the scene tree for the first time.
|
||||||
private Vector2 selectedNodePos = Vector2.Inf;
|
private Vector2 selectedNodePos = Vector2.Inf;
|
||||||
private VirtualPiece piece;
|
private VirtualPiece piece;
|
||||||
private VirtualBoard board;
|
private readonly VirtualBoard board;
|
||||||
|
|
||||||
public SelectedPiece(VirtualBoard board)
|
public SelectedPiece(VirtualBoard board) {
|
||||||
{
|
|
||||||
this.board = board;
|
this.board = board;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Clear()
|
public void Clear() {
|
||||||
{
|
|
||||||
if (selectedNodePos != Vector2.Inf) {
|
if (selectedNodePos != Vector2.Inf) {
|
||||||
selectedNodePos = Vector2.Inf;
|
selectedNodePos = Vector2.Inf;
|
||||||
piece.Selected(false);
|
piece.Selected(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetPos(Vector2 pos)
|
public void SetPos(Vector2 pos) {
|
||||||
{
|
|
||||||
// piece = board.GetNodeFromBoard(pos) as VirtualPiece;
|
// piece = board.GetNodeFromBoard(pos) as VirtualPiece;
|
||||||
selectedNodePos = pos;
|
selectedNodePos = pos;
|
||||||
piece = board.GetPiece(selectedNodePos);
|
piece = board.GetPiece(selectedNodePos);
|
||||||
piece.Selected(true);
|
piece.Selected(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public VirtualPiece GetPiece()
|
public VirtualPiece GetPiece() {
|
||||||
{
|
|
||||||
return piece;
|
return piece;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector2 GetPos()
|
public Vector2 GetPos() {
|
||||||
{
|
|
||||||
return selectedNodePos;
|
return selectedNodePos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HasSelected()
|
public bool HasSelected() {
|
||||||
{
|
|
||||||
return selectedNodePos != Vector2.Inf;
|
return selectedNodePos != Vector2.Inf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
// using System.Numerics;
|
using Vector2 = Godot.Vector2;
|
||||||
// using System.Transactions;
|
|
||||||
using Godot;
|
|
||||||
|
|
||||||
public class VirtualBoard {
|
public class VirtualBoard {
|
||||||
private readonly int Rows;
|
private readonly int Rows;
|
||||||
@@ -1,12 +1,10 @@
|
|||||||
// using System.Numerics;
|
using Vector2 = Godot.Vector2;
|
||||||
using Godot;
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
public class VirtualPiece {
|
public class VirtualPiece {
|
||||||
private Vector2 pos; // 注意这个坐标的非像素坐标而是棋盘坐标
|
private Vector2 pos; // 注意这个坐标的非像素坐标而是棋盘坐标
|
||||||
|
|
||||||
private string name;
|
private readonly string name;
|
||||||
private bool isSelected;
|
private bool isSelected;
|
||||||
public object data;
|
public object data;
|
||||||
|
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
using Godot;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
class GodotConfigManager {
|
||||||
|
private readonly string ConfigFilePath;
|
||||||
|
private readonly ConfigFile config = new();
|
||||||
|
private readonly bool successful;
|
||||||
|
|
||||||
|
public GodotConfigManager(string ConfigFilePath) {
|
||||||
|
this.ConfigFilePath = ConfigFilePath;
|
||||||
|
|
||||||
|
Error err = config.Load(ConfigFilePath);
|
||||||
|
if (err == Error.Ok) {
|
||||||
|
successful = true;
|
||||||
|
} else {
|
||||||
|
successful = false;
|
||||||
|
GD.PrintErr("config.Load", err);
|
||||||
|
// OS.Alert("配置文件加载失败!", "错误");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadConfig(string SessionName,
|
||||||
|
Dictionary<string, Variant> data) {
|
||||||
|
|
||||||
|
// 如果文件没有加载,忽略它。
|
||||||
|
if (!successful) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 迭代所有小节。
|
||||||
|
foreach (string session in config.GetSections()) {
|
||||||
|
if (session == SessionName) {
|
||||||
|
foreach (var key in config.GetSectionKeys(session)) {
|
||||||
|
if (data.ContainsKey(key)) {
|
||||||
|
data[key] = config.GetValue(session, key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SaveConfig(string SessionName,
|
||||||
|
Dictionary<string, Variant> data) {
|
||||||
|
// 将 GlobalConfig 中的键值对写入配置文件
|
||||||
|
foreach (var key in data.Keys)
|
||||||
|
{
|
||||||
|
GD.Print(data[key]);
|
||||||
|
|
||||||
|
config.SetValue(SessionName, key, data[key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存配置文件
|
||||||
|
if (config.Save(ConfigFilePath) != Error.Ok) {
|
||||||
|
OS.Alert("配置文件保存失败!", "错误");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,8 +7,8 @@ using System;
|
|||||||
public class MoveRecords<T> {
|
public class MoveRecords<T> {
|
||||||
private readonly LinkedList<MoveRecord> records = new LinkedList<MoveRecord>(); // 使用队列替换栈
|
private readonly LinkedList<MoveRecord> records = new LinkedList<MoveRecord>(); // 使用队列替换栈
|
||||||
private readonly int maxRecords; // 记录上限
|
private readonly int maxRecords; // 记录上限
|
||||||
private Action<T, T, Vector2, Vector2> onAddRecordCallback; // 添加记录时的回调
|
private readonly Action<T, T, Vector2, Vector2> onAddRecordCallback; // 添加记录时的回调
|
||||||
private Action<T, T, Vector2, Vector2> onUndoRecordCallback; // 撤销记录时的回调
|
private readonly Action<T, T, Vector2, Vector2> onUndoRecordCallback; // 撤销记录时的回调
|
||||||
|
|
||||||
public MoveRecords(
|
public MoveRecords(
|
||||||
Action<T, T, Vector2, Vector2> onAddRecordCallback = null,
|
Action<T, T, Vector2, Vector2> onAddRecordCallback = null,
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ Global="*res://Scripts/Global.cs"
|
|||||||
|
|
||||||
window/size/viewport_width=720
|
window/size/viewport_width=720
|
||||||
window/size/viewport_height=1280
|
window/size/viewport_height=1280
|
||||||
|
window/stretch/mode="viewport"
|
||||||
|
window/handheld/orientation=1
|
||||||
|
|
||||||
[dotnet]
|
[dotnet]
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user