gamesystem

package
v0.0.0-...-6fe3cf3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

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 下架游戏

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL