Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Game ¶
type Game interface { Init(ctx context.Context, delay GameDelay, pMgr GamePMgr, pMsg PlayerMsg, log GameLog) error PlayerMaxNum() int PlayerJoin(userKey interface{}, exist bool, view bool) PlayerOp(userKey interface{}, exist bool, view bool) PlayerExit(userKey interface{}, view bool) PlayerOfflineKickOut() time.Duration PlayerAuto(userKey interface{}) Msg(userKey interface{}, data interface{}) Begin(quick bool) End() Auto() *GameAuto Quick(num int) bool QuickTs() time.Duration View() bool DisbandTs() time.Duration IpLimit() bool DistanceLimit() int Finish(disband bool) }
type MsgKind ¶
type MsgKind int
const ( MsgKindPlayerJoin MsgKind = iota // 玩家加入 MsgKindPlayerExit // 玩家退出 MsgKindPlayerReady // 玩家准备 MsgKindDisband // 申请解散 MsgKindDisbandReject // 拒绝解散 MsgKindQuick // 申请少人开局 MsgKindQuickReject // 拒绝少人开局 MsgKindDisbandIdle // 解散房间 MsgKindDisbandForce // 强制解散房间 MsgKindGame // 游戏操作 MsgKindByUser // 自定义 )
type MsgKindPlayerJoinData ¶
type MsgKindPlayerReadyData ¶
type MsgKindPlayerReadyData struct {
Site uint32
}
Click to show internal directories.
Click to hide internal directories.