From 8cc6aa879f5abc1ab0926ed92e6747a4edf1c5c8 Mon Sep 17 00:00:00 2001 From: kercylan98 Date: Mon, 12 Jun 2023 11:30:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/multi-core-server-room-sync/main.go | 1 + examples/simple-server-chatroom/main.go | 1 + examples/simple-server-config/main.go | 1 + examples/simple-server-console/main.go | 1 + examples/simple-server-cross/doc.go | 2 ++ examples/simple-server-echo/main.go | 1 + game/builtin/doc.go | 2 ++ notify/doc.go | 2 ++ notify/notifies/doc.go | 2 ++ notify/senders/doc.go | 2 ++ planner/configexport/doc.go | 2 ++ planner/doc.go | 2 ++ report/doc.go | 2 ++ server/doc.go | 2 ++ utils/g2d/direction.go | 9 +++++---- 15 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 examples/simple-server-cross/doc.go create mode 100644 game/builtin/doc.go create mode 100644 notify/doc.go create mode 100644 notify/notifies/doc.go create mode 100644 notify/senders/doc.go create mode 100644 planner/configexport/doc.go create mode 100644 planner/doc.go create mode 100644 report/doc.go create mode 100644 server/doc.go diff --git a/examples/multi-core-server-room-sync/main.go b/examples/multi-core-server-room-sync/main.go index 7bddba3..1e906a7 100644 --- a/examples/multi-core-server-room-sync/main.go +++ b/examples/multi-core-server-room-sync/main.go @@ -1,3 +1,4 @@ +// 该案例中将服务器消息通过多核的方式异步传输到房间中,在每个房间中单独同步处理维护消息。 package main import ( diff --git a/examples/simple-server-chatroom/main.go b/examples/simple-server-chatroom/main.go index ba850c4..901f3e5 100644 --- a/examples/simple-server-chatroom/main.go +++ b/examples/simple-server-chatroom/main.go @@ -1,3 +1,4 @@ +// 该案例实现了一个简单的聊天室功能 package main import ( diff --git a/examples/simple-server-config/main.go b/examples/simple-server-config/main.go index 7a47853..6215f9b 100644 --- a/examples/simple-server-config/main.go +++ b/examples/simple-server-config/main.go @@ -1,3 +1,4 @@ +// 该案例演示了配置导表工具的使用,其中包括了作为模板的配置文件及导出的配置文件 package main import ( diff --git a/examples/simple-server-console/main.go b/examples/simple-server-console/main.go index fd50711..031b6de 100644 --- a/examples/simple-server-console/main.go +++ b/examples/simple-server-console/main.go @@ -1,3 +1,4 @@ +// 该案例中延时了控制台服务器的实现,支持运行中根据控制台指令执行额外的功能逻辑 package main import ( diff --git a/examples/simple-server-cross/doc.go b/examples/simple-server-cross/doc.go new file mode 100644 index 0000000..49a84db --- /dev/null +++ b/examples/simple-server-cross/doc.go @@ -0,0 +1,2 @@ +// 该案例中演示了两个跨服相互通过网络进行数据传输的实现 +package main diff --git a/examples/simple-server-echo/main.go b/examples/simple-server-echo/main.go index b2ade1d..2d7caef 100644 --- a/examples/simple-server-echo/main.go +++ b/examples/simple-server-echo/main.go @@ -1,3 +1,4 @@ +// 该案例中实现了一个简单的回响服务器 package main import ( diff --git a/game/builtin/doc.go b/game/builtin/doc.go new file mode 100644 index 0000000..84e833b --- /dev/null +++ b/game/builtin/doc.go @@ -0,0 +1,2 @@ +// Package builtin 包含了通用游戏相关的接口的内置实现 +package builtin diff --git a/notify/doc.go b/notify/doc.go new file mode 100644 index 0000000..110b2fd --- /dev/null +++ b/notify/doc.go @@ -0,0 +1,2 @@ +// Package notify 包含了对外部第三方通知的实现,如机器人消息等 +package notify diff --git a/notify/notifies/doc.go b/notify/notifies/doc.go new file mode 100644 index 0000000..85e8556 --- /dev/null +++ b/notify/notifies/doc.go @@ -0,0 +1,2 @@ +// Package notifies 包含了内置通知内容的实现 +package notifies diff --git a/notify/senders/doc.go b/notify/senders/doc.go new file mode 100644 index 0000000..bc56ac4 --- /dev/null +++ b/notify/senders/doc.go @@ -0,0 +1,2 @@ +// Package senders Package 包含了内置通知发送器的实现 +package senders diff --git a/planner/configexport/doc.go b/planner/configexport/doc.go new file mode 100644 index 0000000..59faff4 --- /dev/null +++ b/planner/configexport/doc.go @@ -0,0 +1,2 @@ +// Package configexport 提供了XLSX配置转换为JSON及Go代码的导表工具实现 +package configexport diff --git a/planner/doc.go b/planner/doc.go new file mode 100644 index 0000000..5315f86 --- /dev/null +++ b/planner/doc.go @@ -0,0 +1,2 @@ +// Package planner 包含了策划工具相关的内容 +package planner diff --git a/report/doc.go b/report/doc.go new file mode 100644 index 0000000..8c86daa --- /dev/null +++ b/report/doc.go @@ -0,0 +1,2 @@ +// Package report 提供了对数据埋点及上报的实现 +package report diff --git a/server/doc.go b/server/doc.go new file mode 100644 index 0000000..5a0935a --- /dev/null +++ b/server/doc.go @@ -0,0 +1,2 @@ +// Package server 提供了包含多种网络类型的服务器实现 +package server diff --git a/utils/g2d/direction.go b/utils/g2d/direction.go index 9cfe1d4..94837b7 100644 --- a/utils/g2d/direction.go +++ b/utils/g2d/direction.go @@ -1,12 +1,13 @@ package g2d +// Direction 方向 type Direction uint8 const ( - DirectionUp = Direction(iota) - DirectionDown - DirectionLeft - DirectionRight + DirectionUp = Direction(iota) // 上方 + DirectionDown // 下方 + DirectionLeft // 左方 + DirectionRight // 右方 ) // CalcDirection 计算点2位于点1的方向