package
0.1.6
Repository: https://github.com/xiaonanln/goworld.git
Documentation: pkg.go.dev

# Functions

CollectEntitySyncInfos is called by game service to collect and broadcast entity sync infos to all clients.
CreateEntityLocally creates new entity in the local game.
CreateEntityLocallyWithEntityID creates new entity in the local game with specified entity ID.
CreateEntitySomewhere creates new entity in any game.
CreateNilSpace creates the nil space.
CreateSpaceLocally creates a space in the local game server.
CreateSpaceSomewhere creates a space in any game server.
Entities gets all entities Never modify the return value !.
Freeze freezes the entity system and returns all freeze data.
GetEntity returns the entity with specified ID.
GetNilSpaceEntityID returns the EntityID for Nil Space on the specified game GoWorld uses fixed EntityID for nil spaces on each game.
LoadEntityAnywhere loads entity in the any game LoadEntityAnywhere has no effect if entity already exists on any game.
MakeGameClient creates a GameClient object using Client ID and Game ID.
NewListAttr creates a new ListAttr.
NewMapAttr creates a new MapAttr.
OnAllGamesConnected is called when all games are connected to dispatcher cluster.
OnCall is called by engine when method call reaches in the game.
OnClientDisconnected is called by engine when Client is disconnected.
OnCreateEntitySomewhere is called when CreateEntitySomewhere chooses this game.
OnGameTerminating is called when game is terminating.
OnGateDisconnected is called when gate is down.
OnLoadEntitySomewhere loads entity in the local game.
OnMigrateRequestAck is called by engine when mgirate request Ack is received.
OnQuerySpaceGameIDForMigrateAck is called by engine when query entity gameid ACK is received.
OnRealMigrate is used by entity migration.
OnSyncPositionYawFromClient is called by engine to sync entity infos from Client.
RegisterEntity registers custom entity type and define entity behaviors.
RegisterSpace registers the user custom space type.
RestoreFreezedEntities restore entity system from freeze data.
SaveAllEntities saves all entities.
SetSaveInterval sets the save interval for entity system.
TraverseEntityByType traverses entities of the specified type.

# Structs

Entity is the basic execution unit in GoWorld server.
EntityTypeDesc is the entity type description for registering entity types.
FreezeData is the data structure for storing entity freeze data.
GameClient represents the game Client of entity Each entity can have at most one GameClient, and GameClient can be given to other entities.
ListAttr is a attribute for a list of attributes.
MapAttr is a map attribute containing muiltiple attributes indexed by string keys.
Space is the entity type of spaces Spaces are also entities but with space management logics.
Vector3 is type of entity position.

# Interfaces

IEntity declares functions that is defined in Entity These functions are mostly component functions.
ISpace is the space delegate interface User custom space class can override these functions for their own game logic.

# Type aliases

Coord is the of coordinations entity position (x, y, z).
EntityMap is the data structure for maintaining entity IDs to entities.
EntitySet is the data structure for a set of entities.
EntityTimerID is the type of entity timer ID.
Yaw is the type of entity Yaw.