entities

package
v0.0.0-...-6427680 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container interface {
	Get() Entity
	Set(Entity)
}

type Entity

type Entity struct {
	ID uuid.UUID

	Position components.Position
	Spatial  components.Spatial
}

type Locker

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

func MakeLocker

func MakeLocker() Locker

func (Locker) All

func (l Locker) All() []Entity

func (*Locker) Delete

func (l *Locker) Delete(id uuid.UUID) error

func (*Locker) DeleteAll

func (l *Locker) DeleteAll()

func (*Locker) DeleteFromPos

func (l *Locker) DeleteFromPos(id uuid.UUID, pos components.Position) error

func (*Locker) FromJSONFile

func (l *Locker) FromJSONFile(path string) error

func (Locker) GetByID

func (l Locker) GetByID(id uuid.UUID) (Entity, error)

func (Locker) GetByPosition

func (l Locker) GetByPosition(pos components.Position) ([]Entity, error)

func (*Locker) Set

func (l *Locker) Set(entity Entity) error

Jump to

Keyboard shortcuts

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