整理了一下文件位置

This commit is contained in:
2025-02-02 09:44:09 +08:00
parent 532c55e2a3
commit 7fdd7adc47
8 changed files with 177 additions and 167 deletions

View File

@@ -4,15 +4,17 @@ extends Node
@onready var grid_container = $GridContainer # 农场地块的 GridContainer @onready var grid_container = $GridContainer # 农场地块的 GridContainer
@onready var crop_item = $CropItem @onready var crop_item = $CropItem
@onready var crop_list = $CropList # 作物选择的 ItemList @onready var crop_list = $CropList # 作物选择的 ItemList
@onready var show_money = $money # 显示当前剩余的钱
@onready var show_experience = $experience # 显示当前玩家的经验 @onready var show_money = $GUI/money # 显示当前剩余的钱
@onready var show_level = $level # 显示当前玩家的等级 @onready var show_experience = $GUI/experience # 显示当前玩家的经验
@onready var show_level = $GUI/level # 显示当前玩家的等级
@onready var tip = $GUI/tip #显示保存相关
@onready var toast = $ToastShow @onready var toast = $ToastShow
@onready var toast2 = $ToastShow2 @onready var toast2 = $ToastShow2
@onready var land_panel = $Land_Panel @onready var land_panel = $GUI/Land_Panel
@onready var dig_button = $Land_Panel/VBox/HBox/Dig_button @onready var dig_button = $GUI/Land_Panel/VBox/HBox/Dig_button
@onready var crop_grid_container = $ScrollContainer/Crop_GridContainer @onready var crop_grid_container = $ScrollContainer/Crop_GridContainer
#Thread #Thread
@onready var green_bar = $Copy_Nodes/Green #普通 @onready var green_bar = $Copy_Nodes/Green #普通
@@ -24,21 +26,21 @@ extends Node
#----------------网络联机部分-------------------------- #----------------网络联机部分--------------------------
#用户登录账号用QQ号代替 #用户登录账号用QQ号代替
@onready var username_input = $LoginPanel/VBox/HBox/username_input @onready var username_input = $GUI/LoginPanel/VBox/HBox/username_input
#用户登录密码 #用户登录密码
@onready var password_input = $LoginPanel/VBox/HBox2/password_input @onready var password_input = $GUI/LoginPanel/VBox/HBox2/password_input
#注册账号时二次确认密码 #注册账号时二次确认密码
@onready var password_input_2 = $LoginPanel/VBox/HBox5/password_input2 @onready var password_input_2 = $GUI/LoginPanel/VBox/HBox5/password_input2
#登录按钮 #登录按钮
@onready var login_button = $LoginPanel/VBox/HBox4/login_button @onready var login_button = $GUI/LoginPanel/VBox/HBox4/login_button
#注册按钮 #注册按钮
@onready var register_button = $LoginPanel/VBox/HBox4/register_button @onready var register_button = $GUI/LoginPanel/VBox/HBox4/register_button
#农场名称 #农场名称
@onready var farmname_input = $LoginPanel/VBox/HBox3/farmname_input @onready var farmname_input = $GUI/LoginPanel/VBox/HBox3/farmname_input
#登录注册面板 #登录注册面板
@onready var login_panel = $LoginPanel @onready var login_panel = $GUI/LoginPanel
#----------------网络联机部分-------------------------- #----------------网络联机部分--------------------------
@onready var tip = $tip
@onready var http_request = $HTTPRequest @onready var http_request = $HTTPRequest
@@ -919,6 +921,8 @@ func load_game_from_server():
send_request("login", HTTPClient.METHOD_POST, login_data) send_request("login", HTTPClient.METHOD_POST, login_data)
pass pass
#-------------http传输的两个关键方法-----------------
func send_request(endpoint: String, method: int, data: Dictionary = {}): func send_request(endpoint: String, method: int, data: Dictionary = {}):
var http_request = HTTPRequest.new() var http_request = HTTPRequest.new()
add_child(http_request) add_child(http_request)
@@ -983,7 +987,9 @@ func _on_request_completed(result, response_code, headers, body):
else: else:
print("JSON 解析错误: ", json.get_error_message()) print("JSON 解析错误: ", json.get_error_message())
#-------------http传输的两个关键方法-----------------
#是否为有效QQ号
func is_valid_qq_number(qq_number: String) -> bool: func is_valid_qq_number(qq_number: String) -> bool:
# QQ号的标准格式是5到12位的数字 # QQ号的标准格式是5到12位的数字
var qq_regex = RegEx.new() var qq_regex = RegEx.new()

View File

@@ -1,23 +1,23 @@
[gd_scene load_steps=11 format=3 uid="uid://dgh61dttaas5a"] [gd_scene load_steps=11 format=3 uid="uid://dgh61dttaas5a"]
[ext_resource type="Script" path="res://farm.gd" id="1_h7dqo"] [ext_resource type="Script" path="res://MainGame.gd" id="1_v3yaj"]
[ext_resource type="Texture2D" uid="uid://cbjtfrej7iq3x" path="res://assets/background2.jpg" id="2_xrhqr"] [ext_resource type="Texture2D" uid="uid://cbjtfrej7iq3x" path="res://assets/background2.jpg" id="2_psm5w"]
[ext_resource type="PackedScene" uid="uid://ffw2vjwnwvew" path="res://Toast.tscn" id="3_0cvam"] [ext_resource type="PackedScene" uid="uid://bkivlkirrx6u8" path="res://crop_item.tscn" id="3_isiom"]
[ext_resource type="PackedScene" uid="uid://bkivlkirrx6u8" path="res://crop_item.tscn" id="4_2mmkk"] [ext_resource type="PackedScene" uid="uid://ffw2vjwnwvew" path="res://components/ToastShow.tscn" id="4_7kdbl"]
[ext_resource type="Texture2D" uid="uid://bc0rsd5x4pxhn" path="res://assets/GUI/orange_bar.tres" id="5_4fqlq"] [ext_resource type="Texture2D" uid="uid://b7yavo67sf4v7" path="res://assets/GUI/green_bar.tres" id="5_vtsi2"]
[ext_resource type="Texture2D" uid="uid://b7yavo67sf4v7" path="res://assets/GUI/green_bar.tres" id="5_knm2j"] [ext_resource type="Texture2D" uid="uid://d0h1s3wrx45a7" path="res://assets/GUI/white_blue_bar.tres" id="6_0sxhs"]
[ext_resource type="Texture2D" uid="uid://d0h1s3wrx45a7" path="res://assets/GUI/white_blue_bar.tres" id="6_h5nbu"] [ext_resource type="Texture2D" uid="uid://bc0rsd5x4pxhn" path="res://assets/GUI/orange_bar.tres" id="7_2f3e4"]
[ext_resource type="Texture2D" uid="uid://beckne13egl8u" path="res://assets/GUI/pink_bar.tres" id="8_na6c6"] [ext_resource type="Texture2D" uid="uid://beckne13egl8u" path="res://assets/GUI/pink_bar.tres" id="8_qyoht"]
[ext_resource type="Texture2D" uid="uid://bh73krj8mnojv" path="res://assets/GUI/black_blue_bar.tres" id="9_7l4jv"] [ext_resource type="Texture2D" uid="uid://bh73krj8mnojv" path="res://assets/GUI/black_blue_bar.tres" id="9_tunh0"]
[ext_resource type="Texture2D" uid="uid://b73vvxnp31xs4" path="res://assets/GUI/red_bar.tres" id="10_10s87"] [ext_resource type="Texture2D" uid="uid://b73vvxnp31xs4" path="res://assets/GUI/red_bar.tres" id="10_duo33"]
[node name="main" type="Node"] [node name="main" type="Node"]
script = ExtResource("1_h7dqo") script = ExtResource("1_v3yaj")
[node name="background" type="Sprite2D" parent="."] [node name="background" type="Sprite2D" parent="."]
position = Vector2(576, 322.5) position = Vector2(590, 344)
scale = Vector2(0.658482, 0.666992) scale = Vector2(0.658482, 0.666992)
texture = ExtResource("2_xrhqr") texture = ExtResource("2_psm5w")
[node name="ItemList" type="ItemList" parent="."] [node name="ItemList" type="ItemList" parent="."]
visible = false visible = false
@@ -37,35 +37,6 @@ same_column_width = true
fixed_column_width = 100 fixed_column_width = 100
icon_mode = 0 icon_mode = 0
[node name="money" type="Label" parent="."]
offset_left = 1.0
offset_right = 142.0
offset_bottom = 42.0
theme_override_font_sizes/font_size = 20
text = "钱币999"
[node name="experience" type="Label" parent="."]
offset_left = 334.0
offset_right = 475.0
offset_bottom = 42.0
theme_override_font_sizes/font_size = 20
text = "经验999"
[node name="level" type="Label" parent="."]
offset_left = 632.0
offset_right = 773.0
offset_bottom = 42.0
theme_override_font_sizes/font_size = 20
text = "等级100"
[node name="tip" type="Label" parent="."]
offset_left = 878.0
offset_right = 1150.0
offset_bottom = 42.0
theme_override_colors/font_color = Color(1, 0, 1, 1)
theme_override_font_sizes/font_size = 20
text = "游戏自动保存剩余【10】秒"
[node name="GridContainer" type="GridContainer" parent="."] [node name="GridContainer" type="GridContainer" parent="."]
custom_minimum_size = Vector2(100, 100) custom_minimum_size = Vector2(100, 100)
offset_top = 143.0 offset_top = 143.0
@@ -73,9 +44,11 @@ offset_right = 100.0
offset_bottom = 243.0 offset_bottom = 243.0
columns = 10 columns = 10
[node name="CropItem" parent="." instance=ExtResource("4_2mmkk")] [node name="CropItem" parent="." instance=ExtResource("3_isiom")]
offset_left = -1000.0 offset_left = -538.0
offset_right = -960.0 offset_top = 37.0
offset_right = -438.0
offset_bottom = 137.0
[node name="CropList" type="ItemList" parent="."] [node name="CropList" type="ItemList" parent="."]
visible = false visible = false
@@ -94,67 +67,18 @@ same_column_width = true
fixed_column_width = 222 fixed_column_width = 222
icon_mode = 0 icon_mode = 0
[node name="ToastShow" parent="." instance=ExtResource("3_0cvam")] [node name="ToastShow" parent="." instance=ExtResource("4_7kdbl")]
visible = false visible = false
offset_top = 580.0 offset_top = 580.0
offset_bottom = 603.0 offset_bottom = 603.0
[node name="ToastShow2" parent="." instance=ExtResource("3_0cvam")] [node name="ToastShow2" parent="." instance=ExtResource("4_7kdbl")]
visible = false visible = false
offset_left = 1.0 offset_left = 1.0
offset_top = 41.0 offset_top = 41.0
offset_right = 65.0 offset_right = 65.0
offset_bottom = 64.0 offset_bottom = 64.0
[node name="Land_Panel" type="PanelContainer" parent="."]
visible = false
offset_right = 108.0
offset_bottom = 31.0
[node name="VBox" type="VBoxContainer" parent="Land_Panel"]
layout_mode = 2
[node name="Title" type="Label" parent="Land_Panel/VBox"]
layout_mode = 2
text = "土地面板"
horizontal_alignment = 1
vertical_alignment = 1
[node name="HBox" type="HBoxContainer" parent="Land_Panel/VBox"]
layout_mode = 2
[node name="Dig_button" type="Button" parent="Land_Panel/VBox/HBox"]
layout_mode = 2
text = "开垦"
[node name="Description" type="Label" parent="Land_Panel/VBox/HBox"]
layout_mode = 2
text = "土地需要开垦才能种植,开垦所需费用随玩家已开垦土地数量增多而增多"
[node name="HBox2" type="HBoxContainer" parent="Land_Panel/VBox"]
visible = false
layout_mode = 2
[node name="Button" type="Button" parent="Land_Panel/VBox/HBox2"]
layout_mode = 2
text = "升级"
[node name="Description" type="Label" parent="Land_Panel/VBox/HBox2"]
layout_mode = 2
text = "升级描述"
[node name="HBox3" type="HBoxContainer" parent="Land_Panel/VBox"]
visible = false
layout_mode = 2
[node name="Button" type="Button" parent="Land_Panel/VBox/HBox3"]
layout_mode = 2
text = "恢复"
[node name="Description" type="Label" parent="Land_Panel/VBox/HBox3"]
layout_mode = 2
text = "恢复描述"
[node name="ScrollContainer" type="ScrollContainer" parent="."] [node name="ScrollContainer" type="ScrollContainer" parent="."]
offset_left = 1.0 offset_left = 1.0
offset_top = 42.0 offset_top = 42.0
@@ -177,163 +101,243 @@ offset_right = 409.0
offset_bottom = 138.0 offset_bottom = 138.0
theme_override_font_sizes/font_size = 40 theme_override_font_sizes/font_size = 40
text = "普通" text = "普通"
icon = ExtResource("5_knm2j") icon = ExtResource("5_vtsi2")
icon_alignment = 1 icon_alignment = 1
[node name="White_Blue" type="Button" parent="Copy_Nodes"] [node name="White_Blue" type="Button" parent="Copy_Nodes"]
offset_left = 1.0 offset_left = -5.0
offset_top = 42.0 offset_top = 148.0
offset_right = 409.0 offset_right = 403.0
offset_bottom = 138.0 offset_bottom = 244.0
theme_override_font_sizes/font_size = 40 theme_override_font_sizes/font_size = 40
text = "稀有" text = "稀有"
icon = ExtResource("6_h5nbu") icon = ExtResource("6_0sxhs")
icon_alignment = 1 icon_alignment = 1
[node name="Orange" type="Button" parent="Copy_Nodes"] [node name="Orange" type="Button" parent="Copy_Nodes"]
offset_left = 1.0 offset_left = -6.0
offset_top = 42.0 offset_top = 252.0
offset_right = 409.0 offset_right = 402.0
offset_bottom = 138.0 offset_bottom = 348.0
theme_override_font_sizes/font_size = 40 theme_override_font_sizes/font_size = 40
text = "优良" text = "优良"
icon = ExtResource("5_4fqlq") icon = ExtResource("7_2f3e4")
icon_alignment = 1 icon_alignment = 1
[node name="Pink" type="Button" parent="Copy_Nodes"] [node name="Pink" type="Button" parent="Copy_Nodes"]
offset_left = 1.0 offset_left = -16.0
offset_top = 42.0 offset_top = 362.0
offset_right = 409.0 offset_right = 392.0
offset_bottom = 138.0 offset_bottom = 458.0
theme_override_font_sizes/font_size = 40 theme_override_font_sizes/font_size = 40
text = "史诗" text = "史诗"
icon = ExtResource("8_na6c6") icon = ExtResource("8_qyoht")
icon_alignment = 1 icon_alignment = 1
[node name="Black_Blue" type="Button" parent="Copy_Nodes"] [node name="Black_Blue" type="Button" parent="Copy_Nodes"]
offset_left = 1.0 offset_left = -5.0
offset_top = 42.0 offset_top = 481.0
offset_right = 409.0 offset_right = 403.0
offset_bottom = 138.0 offset_bottom = 577.0
theme_override_font_sizes/font_size = 40 theme_override_font_sizes/font_size = 40
text = "传奇" text = "传奇"
icon = ExtResource("9_7l4jv") icon = ExtResource("9_tunh0")
icon_alignment = 1 icon_alignment = 1
[node name="Red" type="Button" parent="Copy_Nodes"] [node name="Red" type="Button" parent="Copy_Nodes"]
offset_left = 1.0 offset_left = 7.0
offset_top = 92.0 offset_top = 596.0
offset_right = 409.0 offset_right = 415.0
offset_bottom = 188.0 offset_bottom = 692.0
theme_override_font_sizes/font_size = 40 theme_override_font_sizes/font_size = 40
text = "神话" text = "神话"
icon = ExtResource("10_10s87") icon = ExtResource("10_duo33")
icon_alignment = 1 icon_alignment = 1
[node name="LoginPanel" type="Panel" parent="."] [node name="HTTPRequest" type="HTTPRequest" parent="."]
offset_left = 300.0
offset_top = 139.0
offset_right = 686.0
offset_bottom = 427.0
[node name="VBox" type="VBoxContainer" parent="LoginPanel"] [node name="GUI" type="Node2D" parent="."]
[node name="level" type="Label" parent="GUI"]
offset_left = 632.0
offset_right = 773.0
offset_bottom = 42.0
theme_override_font_sizes/font_size = 20
text = "等级100"
[node name="experience" type="Label" parent="GUI"]
offset_left = 334.0
offset_right = 475.0
offset_bottom = 42.0
theme_override_font_sizes/font_size = 20
text = "经验999"
[node name="LoginPanel" type="Panel" parent="GUI"]
offset_left = 379.0
offset_top = 156.0
offset_right = 765.0
offset_bottom = 444.0
[node name="VBox" type="VBoxContainer" parent="GUI/LoginPanel"]
layout_mode = 0 layout_mode = 0
offset_top = 4.0 offset_top = 2.0
offset_right = 386.0 offset_right = 386.0
offset_bottom = 288.0 offset_bottom = 286.0
[node name="Title" type="Label" parent="LoginPanel/VBox"] [node name="Title" type="Label" parent="GUI/LoginPanel/VBox"]
layout_mode = 2 layout_mode = 2
text = "登录/注册面板" text = "登录/注册面板"
horizontal_alignment = 1 horizontal_alignment = 1
vertical_alignment = 1 vertical_alignment = 1
[node name="HBox" type="HBoxContainer" parent="LoginPanel/VBox"] [node name="HBox" type="HBoxContainer" parent="GUI/LoginPanel/VBox"]
layout_mode = 2 layout_mode = 2
[node name="Label" type="Label" parent="LoginPanel/VBox/HBox"] [node name="Label" type="Label" parent="GUI/LoginPanel/VBox/HBox"]
layout_mode = 2 layout_mode = 2
text = "账号" text = "账号"
horizontal_alignment = 1 horizontal_alignment = 1
vertical_alignment = 1 vertical_alignment = 1
[node name="username_input" type="LineEdit" parent="LoginPanel/VBox/HBox"] [node name="username_input" type="LineEdit" parent="GUI/LoginPanel/VBox/HBox"]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
placeholder_text = "请输入QQ号..." placeholder_text = "请输入QQ号..."
metadata/_edit_use_anchors_ = true metadata/_edit_use_anchors_ = true
[node name="HBox2" type="HBoxContainer" parent="LoginPanel/VBox"] [node name="HBox2" type="HBoxContainer" parent="GUI/LoginPanel/VBox"]
layout_mode = 2 layout_mode = 2
[node name="Label2" type="Label" parent="LoginPanel/VBox/HBox2"] [node name="Label2" type="Label" parent="GUI/LoginPanel/VBox/HBox2"]
layout_mode = 2 layout_mode = 2
text = "密码" text = "密码"
horizontal_alignment = 1 horizontal_alignment = 1
vertical_alignment = 1 vertical_alignment = 1
[node name="password_input" type="LineEdit" parent="LoginPanel/VBox/HBox2"] [node name="password_input" type="LineEdit" parent="GUI/LoginPanel/VBox/HBox2"]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
placeholder_text = "请输入密码..." placeholder_text = "请输入密码..."
[node name="Title3" type="Label" parent="LoginPanel/VBox"] [node name="Title3" type="Label" parent="GUI/LoginPanel/VBox"]
layout_mode = 2 layout_mode = 2
text = "以下为注册填写内容" text = "以下为注册填写内容"
horizontal_alignment = 1 horizontal_alignment = 1
vertical_alignment = 1 vertical_alignment = 1
[node name="HBox5" type="HBoxContainer" parent="LoginPanel/VBox"] [node name="HBox5" type="HBoxContainer" parent="GUI/LoginPanel/VBox"]
layout_mode = 2 layout_mode = 2
[node name="Label2" type="Label" parent="LoginPanel/VBox/HBox5"] [node name="Label2" type="Label" parent="GUI/LoginPanel/VBox/HBox5"]
layout_mode = 2 layout_mode = 2
text = "密码[选填]" text = "密码[选填]"
horizontal_alignment = 1 horizontal_alignment = 1
vertical_alignment = 1 vertical_alignment = 1
[node name="password_input2" type="LineEdit" parent="LoginPanel/VBox/HBox5"] [node name="password_input2" type="LineEdit" parent="GUI/LoginPanel/VBox/HBox5"]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
placeholder_text = "请再次输入密码(登录不需要)..." placeholder_text = "请再次输入密码(登录不需要)..."
[node name="HBox3" type="HBoxContainer" parent="LoginPanel/VBox"] [node name="HBox3" type="HBoxContainer" parent="GUI/LoginPanel/VBox"]
layout_mode = 2 layout_mode = 2
[node name="Label" type="Label" parent="LoginPanel/VBox/HBox3"] [node name="Label" type="Label" parent="GUI/LoginPanel/VBox/HBox3"]
layout_mode = 2 layout_mode = 2
text = "名称[选填]" text = "名称[选填]"
horizontal_alignment = 1 horizontal_alignment = 1
vertical_alignment = 1 vertical_alignment = 1
[node name="farmname_input" type="LineEdit" parent="LoginPanel/VBox/HBox3"] [node name="farmname_input" type="LineEdit" parent="GUI/LoginPanel/VBox/HBox3"]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
placeholder_text = "请输入您的农场名称(登录不需要)..." placeholder_text = "请输入您的农场名称(登录不需要)..."
metadata/_edit_use_anchors_ = true metadata/_edit_use_anchors_ = true
[node name="HBox4" type="HBoxContainer" parent="LoginPanel/VBox"] [node name="HBox4" type="HBoxContainer" parent="GUI/LoginPanel/VBox"]
layout_mode = 2 layout_mode = 2
[node name="login_button" type="Button" parent="LoginPanel/VBox/HBox4"] [node name="login_button" type="Button" parent="GUI/LoginPanel/VBox/HBox4"]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "登录" text = "登录"
[node name="register_button" type="Button" parent="LoginPanel/VBox/HBox4"] [node name="register_button" type="Button" parent="GUI/LoginPanel/VBox/HBox4"]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "注册" text = "注册"
[node name="Title2" type="Label" parent="LoginPanel/VBox"] [node name="Title2" type="Label" parent="GUI/LoginPanel/VBox"]
layout_mode = 2 layout_mode = 2
text = "注意账号请输入您的QQ号方便匹配QQ好友 text = "注意账号请输入您的QQ号方便匹配QQ好友
账号密码请不要和您的QQ密码相同防止信息泄露" 账号密码请不要和您的QQ密码相同防止信息泄露"
horizontal_alignment = 1 horizontal_alignment = 1
vertical_alignment = 1 vertical_alignment = 1
[node name="HTTPRequest" type="HTTPRequest" parent="."] [node name="tip" type="Label" parent="GUI"]
offset_left = 878.0
offset_right = 1150.0
offset_bottom = 42.0
theme_override_colors/font_color = Color(1, 0, 1, 1)
theme_override_font_sizes/font_size = 20
text = "游戏自动保存剩余【10】秒"
[connection signal="pressed" from="Land_Panel/VBox/HBox/Dig_button" to="." method="_on_dig_button_pressed"] [node name="money" type="Label" parent="GUI"]
[connection signal="pressed" from="LoginPanel/VBox/HBox4/login_button" to="." method="_on_login_button_pressed"] offset_left = 1.0
[connection signal="pressed" from="LoginPanel/VBox/HBox4/register_button" to="." method="_on_register_button_pressed"] offset_right = 142.0
offset_bottom = 42.0
theme_override_font_sizes/font_size = 20
text = "钱币999"
[node name="Land_Panel" type="PanelContainer" parent="GUI"]
visible = false
offset_right = 556.0
offset_bottom = 58.0
[node name="VBox" type="VBoxContainer" parent="GUI/Land_Panel"]
layout_mode = 2
[node name="Title" type="Label" parent="GUI/Land_Panel/VBox"]
layout_mode = 2
text = "土地面板"
horizontal_alignment = 1
vertical_alignment = 1
[node name="HBox" type="HBoxContainer" parent="GUI/Land_Panel/VBox"]
layout_mode = 2
[node name="Dig_button" type="Button" parent="GUI/Land_Panel/VBox/HBox"]
layout_mode = 2
text = "开垦"
[node name="Description" type="Label" parent="GUI/Land_Panel/VBox/HBox"]
layout_mode = 2
text = "土地需要开垦才能种植,开垦所需费用随玩家已开垦土地数量增多而增多"
[node name="HBox2" type="HBoxContainer" parent="GUI/Land_Panel/VBox"]
visible = false
layout_mode = 2
[node name="Button" type="Button" parent="GUI/Land_Panel/VBox/HBox2"]
layout_mode = 2
text = "升级"
[node name="Description" type="Label" parent="GUI/Land_Panel/VBox/HBox2"]
layout_mode = 2
text = "升级描述"
[node name="HBox3" type="HBoxContainer" parent="GUI/Land_Panel/VBox"]
visible = false
layout_mode = 2
[node name="Button" type="Button" parent="GUI/Land_Panel/VBox/HBox3"]
layout_mode = 2
text = "恢复"
[node name="Description" type="Label" parent="GUI/Land_Panel/VBox/HBox3"]
layout_mode = 2
text = "恢复描述"
[connection signal="pressed" from="GUI/LoginPanel/VBox/HBox4/login_button" to="." method="_on_login_button_pressed"]
[connection signal="pressed" from="GUI/LoginPanel/VBox/HBox4/register_button" to="." method="_on_register_button_pressed"]
[connection signal="pressed" from="GUI/Land_Panel/VBox/HBox/Dig_button" to="." method="_on_dig_button_pressed"]

View File

@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://ffw2vjwnwvew"] [gd_scene load_steps=2 format=3 uid="uid://ffw2vjwnwvew"]
[ext_resource type="Script" path="res://ToastShow.gd" id="1_0rpwy"] [ext_resource type="Script" path="res://components/ToastShow.gd" id="1_0rpwy"]
[node name="ToastShow" type="PanelContainer"] [node name="ToastShow" type="PanelContainer"]
offset_left = 469.0 offset_left = 469.0

View File

@@ -12,7 +12,7 @@ config_version=5
config/name="萌芽农场" config/name="萌芽农场"
config/description="一款支持多人联机的农场游戏" config/description="一款支持多人联机的农场游戏"
run/main_scene="res://main.tscn" run/main_scene="res://MainGame.tscn"
config/features=PackedStringArray("4.2", "Mobile") config/features=PackedStringArray("4.2", "Mobile")
config/icon="res://assets/logo2.png" config/icon="res://assets/logo2.png"