loader

package
Version: v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2021 License: MIT Imports: 19 Imported by: 9

Documentation

Index

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 InitAudio added in v0.4.0

func InitAudio(sampleRate int) *audio.Context

InitAudio creates a new audio context

func LoadAudio added in v0.4.0

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

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

LoadEngineComponents loads engine components from a TOML file

type EntityComponentList added in v0.3.0

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

EntityComponentList is a list of preloaded entities with components

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL