igame

package
v0.0.0-...-8b2cf58 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventMessage

type EventMessage struct {
	MsgType int
	MsgInfo []byte
	Id      string
}

type IComponent

type IComponent interface {
	OnInit(ctx interface{})
	OnLoad(ctx interface{})
	ComName() string
	OnActive() error
	OnDeActive() error
	CustomizeSave() bool
	CustomizeLoad() bool
	Load(ctx interface{})
	Save(ctx interface{})
	ToJson() []byte
	FromJson(data []byte)
}

type IEventMq

type IEventMq interface {
	Name() string
	Init() error
	DispatchEvent(msgType int, eventData interface{}) // 发送服务器间消息
	WaitEvent() <-chan []byte                         // 等待服务器间消息
}

type Module

type Module interface {
	New()
	Init()
	Base()
	BeginPlay()
	UpLogic(frameTime time.Duration)
	UpPlayer()
	UnLoad()
	GetMsgHandleFunc(msgType int) OnMessage
	GetServerEvent() map[int]OnServerEvent
	GetInServerEvent() map[int]OnInServerEvent
	GetModelName() string
	GetCoroutineGroup() int
}

type OnInServerEvent

type OnInServerEvent func(msgType int, eventData interface{})

type OnMessage

type OnMessage func(msgType int, msgInfo []byte, id string)

type OnServerEvent

type OnServerEvent func(msgType int, eventData []byte)

Jump to

Keyboard shortcuts

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