engine

package
v0.0.0-...-81640cf Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaskPosition = uint64(1 << 0)
	MaskRenderer = uint64(1 << 1)
	MaskSize     = uint64(1 << 2)
	MaskVelocity = uint64(1 << 3)
	MaskWindow   = uint64(1 << 4)
)

Variables

This section is empty.

Functions

func NewCollision

func NewCollision(width, height int32) ecs.System

NewCollision ...

func NewMovement

func NewMovement() ecs.System

NewMovement ...

func NewRendering

func NewRendering(width, height int32, title string, plugins ...ecs.Plugin) ecs.System

NewRendering ...

Types

type Collision

type Collision struct {
	// contains filtered or unexported fields
}

Collision ...

func (*Collision) Process

func (m *Collision) Process(em *ecs.EntityManager) (state int)

func (*Collision) Setup

func (m *Collision) Setup()

func (*Collision) Teardown

func (m *Collision) Teardown()

type Movement

type Movement struct{}

Movement ...

func (*Movement) Process

func (m *Movement) Process(em *ecs.EntityManager) (state int)

func (*Movement) Setup

func (m *Movement) Setup()

func (*Movement) Teardown

func (m *Movement) Teardown()

type Position

type Position struct {
	ID string `json:"id"`
	X  int32  `json:"x"`
	Y  int32  `json:"y"`
}

Position ...

func NewPosition

func NewPosition(x, y int32) *Position

NewPosition ...

func (*Position) Mask

func (p *Position) Mask() uint64

type Renderer

type Renderer struct {
	ID   string `json:"id"`
	Addr interface{}
}

Renderer ...

func NewRenderer

func NewRenderer(addr interface{}) *Renderer

NewRenderer ...

func (*Renderer) Mask

func (m *Renderer) Mask() uint64

type Rendering

type Rendering struct {
	// contains filtered or unexported fields
}

Rendering ...

func (*Rendering) Process

func (r *Rendering) Process(em *ecs.EntityManager) (state int)

func (*Rendering) Setup

func (r *Rendering) Setup()

func (*Rendering) Teardown

func (r *Rendering) Teardown()

type Size

type Size struct {
	ID     string `json:"id"`
	Height int32  `json:"height"`
	Width  int32  `json:"width"`
}

Size ...

func NewSize

func NewSize(width, height int32) *Size

NewSize ...

func (*Size) Mask

func (s *Size) Mask() uint64

type Velocity

type Velocity struct {
	ID string `json:"id"`
	X  int32  `json:"x"`
	Y  int32  `json:"y"`
}

Velocity ...

func NewVelocity

func NewVelocity(x, y int32) *Velocity

NewVelocity ...

func (*Velocity) Mask

func (s *Velocity) Mask() uint64

type Window

type Window struct {
	ID   string `json:"id"`
	Addr interface{}
}

Window ...

func NewWindow

func NewWindow(addr interface{}) *Window

NewWindow ...

func (*Window) Mask

func (m *Window) Mask() uint64

Jump to

Keyboard shortcuts

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