Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionState ¶
type ConnectionState int
ConnectionState is a connection state of game user
const ( Ready ConnectionState = iota Active Disconnected )
type GameClient ¶
type GameClient struct { Info GameClientInfo `json:"info"` IngameInfo IngameInfo `json:"ingame_info"` Conn GameClientConnection `json:"conn"` }
GameClientInfo user client data type in game
func ActivateClient ¶
func ActivateClient(userID uint32) (GameClient, error)
ActivateClient Activate client
func NewGameClient ¶
func NewGameClient() GameClient
NewGameClient creates game client already registered
type GameClientConnection ¶
type GameClientConnection struct {
ConnState ConnectionState `json:"conn_state"`
}
GameClientConnection
type GameClientInfo ¶
GameClientInfo
type GameMethod ¶
type GameMethod struct { MethodType GemeMethodType `json:"method"` Content string `json:"content"` }
type GameReq ¶
type GameReq struct { Session model.Session `json:"session"` GameMethods []GameMethod `json:"methods"` }
type GameRes ¶
type GameRes struct { //Status model.StatusRes `json:"status"` Response []GameResUnit `json:"response"` }
type GameResUnit ¶
type GameResUnit struct { UserID uint32 `json:"user_id"` Methods []GameMethod `json:"methods"` }
type GemeMethodType ¶
type GemeMethodType int
const ( //Game Request Type: ReqType Idle GemeMethodType = iota //Enter World EnterWorld ExitWorld Chat Move GetIngameClientsInfo // server -> client only )
type IngameInfo ¶
type IngameInfo struct {
Transform Transform `json:"transform"`
}
func NewIngameInfo ¶
func NewIngameInfo() IngameInfo
Source Files
¶
Click to show internal directories.
Click to hide internal directories.