注释补充

This commit is contained in:
kercylan98
2023-05-05 15:18:46 +08:00
parent 2113a7be01
commit e3804a086b
3 changed files with 6 additions and 2 deletions
+2
View File
@@ -8,6 +8,7 @@ import (
"sync/atomic"
)
// NewWorld 创建一个内置的游戏世界
func NewWorld[PlayerID comparable, Player game.Player[PlayerID]](guid int64, options ...WorldOption[PlayerID, Player]) *World[PlayerID, Player] {
world := &World[PlayerID, Player]{
guid: guid,
@@ -23,6 +24,7 @@ func NewWorld[PlayerID comparable, Player game.Player[PlayerID]](guid int64, opt
return world
}
// World 游戏世界的内置实现,实现了基本的游戏世界接口
type World[PlayerID comparable, Player game.Player[PlayerID]] struct {
guid int64
actorGuid atomic.Int64