文档及许可

This commit is contained in:
kercylan98
2023-05-29 20:15:13 +08:00
parent 3f453efef6
commit f6f8bbebc3
12 changed files with 58 additions and 10 deletions

View File

@@ -1,7 +1,11 @@
package component
import "github.com/kercylan98/minotaur/game"
// LockstepClient 帧同步客户端接口定义
// - 客户端应该具备ID及写入数据包的实现
type LockstepClient[ID comparable] interface {
game.Player[ID]
// GetID 用户玩家ID
GetID() ID
// Send 发送数据包
// - messageType: websocket模式中指定消息类型
Send(packet []byte, messageType ...int)
}