Expand description
Runtime game object model types and functionality.
This module makes wide use of macros, which means that there’s quite a bit
of the “plumbing” exposed in this module. The main parts to look into are
Scene, define_system, and
impl_game_object.
Macros§
- define_
system - Gutputs a closure that can be passed into
Scene::run_system, handling extracting properly typed component columns based on the parameter list. - impl_
game_ object - Generates a
GameObjectimpl block for a type.
Structs§
- Component
Column - Generic storage for the components inside
Scene. - Component
Info - Type description for allocation and type comparison of components. Generated
by
impl_game_object. - Game
Object Handle - Temporary handle for operating on specific game objects. Invalidated by
Scene::delete. - Game
Object Handle Iterator - Returns
GameObjectHandles for referring to the game objects in e.g.Scene::delete. - Scene
- Container for
GameObjects. - Scene
Builder - Builder for
Scene.
Enums§
- Spawn
Error - Error type returned by
Scene::spawn.
Constants§
- MAX_
COMPONENTS - The maximum amount of components in a
GameObjecttype.
Traits§
- Game
Object - Trait that game object types implement to be able to be added to a
Scene. Impl generated withimpl_game_object.
Functions§
- extract_
component_ column - Searches the columns for one containing components of type
C, and returns it as a properly typed slice.
Type Aliases§
- Component
Vec - An
ArrayVecwith capacity forMAX_COMPONENTSelements.