Documentation ¶
Index ¶
- func AddEntities(world w.World, entityComponentList EntityComponentList) []ecs.Entity
- func AddEntityComponents(entity ecs.Entity, ecsComponentList interface{}, components interface{}) ecs.Entity
- func InitAudio(sampleRate int) *audio.Context
- func LoadAudio(audioContext *audio.Context, audioFilePath string) *audio.Player
- func LoadControls(controlsConfigPath string, axes []string, actions []string) (resources.Controls, resources.InputHandler)
- func LoadEntities(entityMetadataContent []byte, world w.World, gameComponentList []interface{}) []ecs.Entity
- func LoadFonts(fontPath string) map[string]resources.Font
- func LoadSpriteSheets(spriteSheetMetadataPath string) map[string]c.SpriteSheet
- type EngineComponentList
- type EntityComponentList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEntities ¶ added in v0.2.3
func AddEntities(world w.World, entityComponentList EntityComponentList) []ecs.Entity
AddEntities adds entities with engine and game components
func AddEntityComponents ¶
func AddEntityComponents(entity ecs.Entity, ecsComponentList interface{}, components interface{}) ecs.Entity
AddEntityComponents adds loaded components to an entity
func LoadControls ¶
func LoadControls(controlsConfigPath string, axes []string, actions []string) (resources.Controls, resources.InputHandler)
LoadControls loads controls from a TOML file
func LoadEntities ¶
func LoadEntities(entityMetadataContent []byte, world w.World, gameComponentList []interface{}) []ecs.Entity
LoadEntities creates entities with components from a TOML file
func LoadSpriteSheets ¶
func LoadSpriteSheets(spriteSheetMetadataPath string) map[string]c.SpriteSheet
LoadSpriteSheets loads sprite sheets from a TOML file
Types ¶
type EngineComponentList ¶
type EngineComponentList struct { SpriteRender *c.SpriteRender Transform *c.Transform AnimationControl *c.AnimationControl Text *c.Text UITransform *c.UITransform MouseReactive *c.MouseReactive }
EngineComponentList is the list of engine components
func LoadEngineComponents ¶
func LoadEngineComponents(entityMetadataContent []byte, world w.World) []EngineComponentList
LoadEngineComponents loads engine components from a TOML byte slice
type EntityComponentList ¶ added in v0.3.0
type EntityComponentList struct { Engine []EngineComponentList Game []interface{} }
EntityComponentList is a list of preloaded entities with components
Click to show internal directories.
Click to hide internal directories.