Documentation ¶
Overview ¶
Package gamesystem 基于zbp的游戏插件
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GameInfo ¶
type GameInfo struct { Command string `json:"游玩指令"` // 游玩指令 Help string `json:"游戏说明"` // 游戏说明 Rewards string `json:"奖励说明"` // 奖励说明 }
GameInfo ...
type GameStatus ¶
type GameStatus struct { Name string `json:"游戏名称"` Info *GameInfo `json:"游戏介绍"` Sales map[int64]bool `json:"上架情况"` Rooms []int64 `json:"房间列表"` }
GameStatus ...
func Register ¶
func Register(gameName string, gameinfo *GameInfo) (en *control.Engine, manager *GameStatus, err error)
Register 注册游戏
func (*GameStatus) CloseRoom ¶
func (gameManager *GameStatus) CloseRoom(groupID int64)
CloseRoom 关闭房间
func (*GameStatus) CreateRoom ¶
func (gameManager *GameStatus) CreateRoom(groupID int64) error
CreateRoom 创建房间
func (*GameStatus) PlayIn ¶
func (gameManager *GameStatus) PlayIn(groupID int64) bool
PlayIn 判断游戏是否上架
func (*GameStatus) SalesIn ¶
func (gameManager *GameStatus) SalesIn(groupID int64) error
SalesIn 上架游戏
func (*GameStatus) SalesOut ¶
func (gameManager *GameStatus) SalesOut(groupID int64) error
SalesOut 下架游戏
Click to show internal directories.
Click to hide internal directories.