Documentation ¶
Index ¶
- func Call(id common.EntityID, method string, args ...interface{})
- func CallNilSpaces(method string, args ...interface{})
- func CallService(serviceName string, method string, args ...interface{})
- func CreateEntityAnywhere(typeName string) common.EntityID
- func CreateEntityLocally(typeName string) common.EntityID
- func CreateSpaceAnywhere(kind int) common.EntityID
- func CreateSpaceLocally(kind int) common.EntityID
- func Entities() entity.EntityMap
- func Exists(typeName string, entityID common.EntityID, callback storage.ExistsCallbackFunc)
- func GetEntity(id common.EntityID) *entity.Entity
- func GetGameID() uint16
- func GetKVDB(key string, callback kvdb.KVDBGetCallback)
- func GetOrPutKVDB(key string, val string, callback kvdb.KVDBGetOrPutCallback)
- func GetServiceProviders(serviceName string) entity.EntityIDSet
- func ListAttr() *entity.ListAttr
- func ListEntityIDs(typeName string, callback storage.ListCallbackFunc)
- func LoadEntityAnywhere(typeName string, entityID common.EntityID)
- func MapAttr() *entity.MapAttr
- func Post(callback post.PostCallback)
- func PutKVDB(key string, val string, callback kvdb.KVDBPutCallback)
- func RegisterEntity(typeName string, entityPtr entity.IEntity) *entity.EntityTypeDesc
- func RegisterSpace(spacePtr entity.ISpace)
- func Run()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallNilSpaces ¶ added in v0.1.3
func CallNilSpaces(method string, args ...interface{})
CallNilSpaces calls methods of all nil spaces on all games
func CallService ¶ added in v0.1.3
CallService calls a service provider
func CreateEntityAnywhere ¶
CreateEntityAnywhere creates a entity on any server
func CreateEntityLocally ¶
CreateEntityLocally creates a entity on the local server
returns EntityID
func CreateSpaceAnywhere ¶
CreateSpaceAnywhere creates a space with specified kind in any game server
func CreateSpaceLocally ¶
CreateSpaceLocally creates a space with specified kind in the local game server
returns the space EntityID
func Exists ¶
func Exists(typeName string, entityID common.EntityID, callback storage.ExistsCallbackFunc)
Exists checks if entityID exists in entity storage
returns result in callback
func GetGameID ¶
func GetGameID() uint16
GetGameID gets the local server ID
server ID is a uint16 number starts from 1, which should be different for each servers server ID is also in the game config section name of goworld.ini
func GetKVDB ¶
func GetKVDB(key string, callback kvdb.KVDBGetCallback)
GetKVDB gets value of key from KVDB
func GetOrPutKVDB ¶
func GetOrPutKVDB(key string, val string, callback kvdb.KVDBGetOrPutCallback)
GetOrPut gets value of key from KVDB, if val not exists or is "", put key-value to KVDB.
func GetServiceProviders ¶
func GetServiceProviders(serviceName string) entity.EntityIDSet
GetServiceProviders get the set of EntityIDs that provides the specified service
func ListEntityIDs ¶
func ListEntityIDs(typeName string, callback storage.ListCallbackFunc)
ListEntityIDs gets all saved entity ids in storage, may take long time and block the main routine
returns result in callback
func LoadEntityAnywhere ¶
LoadEntityAnywhere loads the specified entity from entity storage
func PutKVDB ¶
func PutKVDB(key string, val string, callback kvdb.KVDBPutCallback)
PutKVDB puts key-value to KVDB
func RegisterEntity ¶
func RegisterEntity(typeName string, entityPtr entity.IEntity) *entity.EntityTypeDesc
RegisterEntity registers the entity type so that entities can be created or loaded
returns the entity type description object which can be used to define more properties of entity type
func RegisterSpace ¶
RegisterSpace registers the space entity type.
All spaces will be created as an instance of this type
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
components
|
|
engine
|
|
lib/gwsnappy
Package snappy implements the snappy block-based compression format.
|
Package snappy implements the snappy block-based compression format. |
examples
|
|
ext
|
|