system

package
v0.0.0-...-a6bf7df Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rendering

type Rendering struct {
	SystemAccess
	Camera *ray.Camera3D
}

func (Rendering) Name

func (Rendering) Name() string

func (*Rendering) Update

func (system *Rendering) Update(delta float32)

type Scripting

type Scripting struct {
	SystemAccess
	Global *lua.LState
}

func (Scripting) Name

func (Scripting) Name() string

func (*Scripting) Update

func (system *Scripting) Update(delta float32)

type System

type System interface {
	Update(dt float32)
	Updates(world World)
	Unsubscribe(entity entity.Entity)
	Subscribe(entity entity.Entity)
	Subscribed(entity entity.Entity) bool
	Name() string
}

System describes the required functions to be implemented by a system.

type SystemAccess

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

func (*SystemAccess) Component

func (system *SystemAccess) Component(entity entity.Entity, name string) component.Component

func (*SystemAccess) Entities

func (system *SystemAccess) Entities() []entity.Entity

func (*SystemAccess) Subscribe

func (system *SystemAccess) Subscribe(entity entity.Entity)

func (*SystemAccess) Subscribed

func (system *SystemAccess) Subscribed(entity entity.Entity) bool

func (*SystemAccess) Unsubscribe

func (system *SystemAccess) Unsubscribe(entity entity.Entity)

func (*SystemAccess) Updates

func (system *SystemAccess) Updates(world World)

func (*SystemAccess) World

func (system *SystemAccess) World() World

type SystemManager

type SystemManager interface {
	Register(name string, system System)
	Read(name string) System
	Destroy(entity entity.Entity)
	Change(entity entity.Entity, signature *bitset.BitSet)
	Use(name string, signature *bitset.BitSet)
}

func CreateSystemManager

func CreateSystemManager() SystemManager

type World

type World interface {
	Component(entity entity.Entity, name string) component.Component
	Entities() int
}

Jump to

Keyboard shortcuts

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