Back to godoc.org

Package loader

v0.7.0
Latest Go to latest

The latest major version is .

Published: Jun 18, 2020 | License: MIT | Module: github.com/x-hgg-x/goecsengine

Index

func AddEntities

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 InitAudio

func InitAudio(sampleRate int) *audio.Context

InitAudio creates a new audio context

func LoadAudio

func LoadAudio(audioContext *audio.Context, audioFilePath string) *audio.Player

LoadAudio loads an audio file and returns an audio player

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(entityMetadataPath string, world w.World, gameComponentList []interface{}) []ecs.Entity

LoadEntities creates entities with components from a TOML file

func LoadFonts

func LoadFonts(fontPath string) map[string]resources.Font

LoadFonts loads fonts from a TOML file

func LoadSpriteSheets

func LoadSpriteSheets(spriteSheetMetadataPath string) map[string]c.SpriteSheet

LoadSpriteSheets loads sprite sheets from a TOML file

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(entityMetadataPath string, world w.World) []EngineComponentList

LoadEngineComponents loads engine components from a TOML file

type EntityComponentList

type EntityComponentList struct {
	Engine []EngineComponentList
	Game   []interface{}
}

EntityComponentList is a list of preloaded entities with components

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier