1
0

2 Revīzijas be2884f48b ... 897cfa7b90

Autors SHA1 Ziņojums Datums
  makeyangcom 897cfa7b90 1.0.0 8 mēneši atpakaļ
  makeyangcom 2501637568 1.0.0 8 mēneši atpakaļ

+ 4 - 4
engine/project.godot

@@ -19,10 +19,10 @@ config/icon="res://assets/icon.svg"
 
 [autoload]
 
-Global="*res://scripts/framework/global.gd"
-Server="*res://scripts/framework/server/server.gd"
-Client="*res://scripts/framework/client/client.gd"
-Request="*res://scripts/framework/utils/request.gd"
+Global="*res://scripts/base/global.gd"
+Server="*res://scripts/base/server/server.gd"
+Client="*res://scripts/base/client/client.gd"
+Request="*res://scripts/base/utils/request.gd"
 
 [display]
 

+ 0 - 0
engine/scripts/framework/client/client.gd → engine/scripts/base/client/client.gd


+ 2 - 0
engine/scripts/framework/global.gd → engine/scripts/base/global.gd

@@ -19,6 +19,8 @@ var data = {
 }
 
 func _ready() -> void:
+	# 限制窗口最小尺寸
+	DisplayServer.window_set_min_size(Vector2(1280, 720))
 	# 服务器模式检测
 	if OS.has_feature("dedicated_server"):
 		print("[服务器模式]")

+ 0 - 0
engine/scripts/framework/server/server.gd → engine/scripts/base/server/server.gd


+ 0 - 0
engine/scripts/framework/utils/request.gd → engine/scripts/base/utils/request.gd


+ 0 - 1
tools/init.sh

@@ -29,6 +29,5 @@ fi
 # 安装Redis、MySQL数据库
 if [ ! -d "/data/mysql" ]; then
     wget -c http://mirrors.oneinstack.com/oneinstack-full.tar.gz && tar xzf oneinstack-full.tar.gz && ./oneinstack/install.sh --db_option 2 --dbinstallmethod 1 --dbrootpwd 88888888 --redis
-    sudo rm -rf oneinstack-full.tar.gz
     sudo rm -rf oneinstack*
 fi

+ 46 - 1
wiki/course/0002.md

@@ -1,3 +1,48 @@
 ## 第二课
 
-> 第一课时操作引导文档。
+> 第二课时操作引导文档。
+
+### 更新课程源码
+
+```shell
+git pull origin main
+```
+
+### GoLand编辑器配置
+
+```shell
+# 配置代理,加速依赖库的下载
+GOPROXY=https://goproxy.io,direct
+```
+
+### 数据库管理工具
+
+> 创建名为`database`的数据库
+
+```shell
+database
+```
+
+> 执行下面的MySQL脚本创建游戏玩家数据表
+
+```mysql
+CREATE TABLE `game_play_data` (
+    `user_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
+    `user_server_id` int(11) NOT NULL DEFAULT '0' COMMENT '服务器编号',
+    `user_account` varchar(140) NOT NULL DEFAULT '' COMMENT '账号',
+    `user_password` varchar(50) NOT NULL DEFAULT '' COMMENT '密码',
+    `user_name` varchar(50) NOT NULL DEFAULT '' COMMENT '真实姓名',
+    `user_number` varchar(140) NOT NULL DEFAULT '' COMMENT '身份证号码',
+    `user_question_a` varchar(140) NOT NULL DEFAULT '' COMMENT '问题一',
+    `user_question_b` varchar(140) NOT NULL DEFAULT '' COMMENT '问题二',
+    `user_answer_a` varchar(140) NOT NULL DEFAULT '' COMMENT '答案一',
+    `user_answer_b` varchar(140) NOT NULL DEFAULT '' COMMENT '答案二',
+    `user_status` tinyint(2) NOT NULL DEFAULT '2' COMMENT '状态 1:停用 2:启用',
+    `create_at` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
+    `update_at` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
+    `delete_at` int(11) NOT NULL DEFAULT '0',
+    PRIMARY KEY (`user_id`),
+    KEY `status` (`user_status`),
+    KEY `server_id` (`user_server_id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='游戏用户数据表';
+```