logic

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	component.Base
}

Manager component

func NewManager

func NewManager() *Manager

NewManager returns a new manager instance

func (*Manager) Login

func (m *Manager) Login(s *session.Session, msg *protocol.JoyLoginRequest) error

Login handler was used to guest login

type World

type World struct {
	component.Base
	*nano.Group
}

World contains all tadpoles

func NewWorld

func NewWorld() *World

NewWorld returns a world instance

func (*World) Enter

func (w *World) Enter(s *session.Session, msg []byte) error

Enter was called when new guest enter

func (*World) Init

func (w *World) Init()

Init initialize world component

func (*World) Message

func (w *World) Message(s *session.Session, msg *protocol.WorldMessage) error

Message handler was used to communicate with each other

func (*World) Update

func (w *World) Update(s *session.Session, msg []byte) error

Update refresh tadpole's position

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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