loader

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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 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
	Text         *c.Text
	UITransform  *c.UITransform
}

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

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