cg

package
v0.0.0-...-0a77afb Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CenterClient

type CenterClient struct {
	*ipc.IpcClient
}

func (*CenterClient) AddPlayer

func (client *CenterClient) AddPlayer(player *Player) error

func (*CenterClient) Broadcast

func (client *CenterClient) Broadcast(message string) error

func (*CenterClient) ListPlayer

func (client *CenterClient) ListPlayer(params string) (ps []*Player, err error)

func (*CenterClient) RemovePlayer

func (client *CenterClient) RemovePlayer(name string) error

type CenterServer

type CenterServer struct {
	// contains filtered or unexported fields
}

func NewCenterServer

func NewCenterServer() *CenterServer

func (*CenterServer) Handle

func (server *CenterServer) Handle(method, params string) *ipc.Response

func (*CenterServer) Name

func (server *CenterServer) Name() string

type Message

type Message struct {
	From    string "from"
	To      string "to"
	Content string "content"
}

type Player

type Player struct {
	Name  string "name"
	Level int    "level"
	Exp   int    "exp"
	Room  int    "room"
	// contains filtered or unexported fields
}

func NewPlayer

func NewPlayer() *Player

type Room

type Room struct {
}

Jump to

Keyboard shortcuts

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