简单游戏demo实现

This commit is contained in:
kercylan98
2023-04-27 13:25:11 +08:00
parent a722ef46e2
commit 723e618df2
13 changed files with 216 additions and 67 deletions
+4
View File
@@ -19,6 +19,10 @@ func (slf *Player[ID]) GetID() ID {
return slf.id
}
func (slf *Player[ID]) GetConnID() string {
return slf.conn.GetID()
}
// Send 向该玩家发送数据
func (slf *Player[ID]) Send(packet []byte) error {
return slf.conn.Write(packet)