systems

package
v0.0.0-...-9927e17 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ButtonList = []ButtonEntry{
	{
		X:          constants.HalfWindowWidth,
		Y:          constants.HalfWindowHeight + 100,
		W:          constants.ButtonWidth,
		H:          constants.ButtonHeight,
		Text:       "Start Game",
		Name:       "start",
		Color:      constants.ButtonColor,
		HoverColor: constants.ButtonHoverColor,
	},
	{
		X:          constants.HalfWindowWidth,
		Y:          constants.HalfWindowHeight + 150,
		W:          constants.ButtonWidth,
		H:          constants.ButtonHeight,
		Text:       "Exit Game",
		Name:       "exit",
		Color:      constants.ButtonColor,
		HoverColor: constants.ButtonHoverColor,
	},
}

Functions

This section is empty.

Types

type ButtonEntry

type ButtonEntry struct {
	X, Y       int
	W, H       int
	Text       string
	Name       string
	Color      color.RGBA
	HoverColor color.RGBA
}

type GameSystem

type GameSystem struct {
	Entities []*entities.RenderableEntity
	TiledMap *entities.TiledMap
}

func (*GameSystem) Add

func (gs *GameSystem) Add(basic *ecs.BasicEntity, rect *components.Renderable, transform *components.Transform, isPlayer bool)

func (*GameSystem) New

func (gs *GameSystem) New(world *ecs.World)

func (*GameSystem) Remove

func (gs *GameSystem) Remove(basic ecs.BasicEntity)

func (*GameSystem) Update

func (gs *GameSystem) Update(dt float32)
type MainMenuSystem struct {
	ButtonEntities []*entities.Button
	FontFace       font.Face
}
func (mm *MainMenuSystem) Add(basic *ecs.BasicEntity, transform *components.Transform, renderable *components.Renderable, button *components.Button)
func (mm *MainMenuSystem) New(world *ecs.World)
func (mm *MainMenuSystem) Remove(basic ecs.BasicEntity)
func (mm *MainMenuSystem) Update(dt float32)

Jump to

Keyboard shortcuts

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