core

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: BSD-2-Clause, MIT Imports: 13 Imported by: 0

Documentation

Overview

Package core contains lower level component systems.

Index

Constants

View Source
const (
	// SNSoloDrawable is the system name of a drawable without as DrawLayer component
	SNSoloDrawable = "primen.DrawableSystem"
	// SNDrawLayerDrawable is the system name of a drawable with as DrawLayer component
	SNDrawLayerDrawable = "primen.DrawLayerDrawableSystem"
	// CNDrawable is the component name of a drawable
	CNDrawable = "primen.DrawableComponent"
)
View Source
const (
	// SNDrawLayer is the system name
	SNDrawLayer = "primen.DrawLayerSystem"
	// CNDrawLayer is the component signature name
	CNDrawLayer = "primen.DrawLayerComponent"
	// SNDrawLayerSprite is the system name
	SNDrawLayerSprite = "primen.DrawLayerSpriteSystem"
)
View Source
const (
	// ZIndexTop is to set the ZIndex at the top
	ZIndexTop = int64(math.MinInt64)
	// ZIndexBottom is to set the ZIndex at the bottom
	ZIndexBottom = int64(math.MinInt64 + 1)
)
View Source
const (
	SNTag = "primen.TagSystem"
	CNTag = "primen.TagComponent"
)
View Source
const (
	CNFunc       = "tau/core.FuncComponent"
	SNFunc       = "tau/core.FuncSystem"
	SNFuncAfter  = "tau/core.FuncAfterSystem"
	SNFuncBefore = "tau/core.FuncBeforeSystem"
)
View Source
const (
	SNRotationTransform = "primen.RotationTransformSystem"
	CNRotation          = "primen.RotationComponent"
)
View Source
const (
	SNSpriteAnimation     = "primen.SpriteAnimationSystem"
	SNSpriteAnimationLink = "primen.SpriteAnimationLinkSystem"
	CNSpriteAnimation     = "primen.SpriteAnimationComponent"
)
View Source
const (
	SNTransform       = "primen.TransformSystem"
	SNTransformSprite = "primen.TransformSpriteSystem"
	CNTransform       = "primen.TransformComponent"
)
View Source
const (
	// DefaultImageOptions key passed to the default world (&ebiten.DrawImageOptions{})
	DefaultImageOptions string = "default_image_options"
)

Variables

View Source
var (
	// DebugDraw enables to see debug lines and stats
	DebugDraw = false
)

Functions

func Clamp

func Clamp(x, min, max float64) float64

Clamp returns x clamped to the interval [min, max].

If x is less than min, min is returned. If x is more than max, max is returned. Otherwise, x is returned.

func DrawLayerSystemExec

func DrawLayerSystemExec(ctx Context)

DrawLayerSystemExec is the main function of the DrawLayerSystem

func FindWithTag

func FindWithTag(w *ecs.World, tag string, tags ...string) []ecs.Entity

func NewWorld

func NewWorld(e Engine) *ecs.World

NewWorld creates a new world

func RegisterComponentSystem

func RegisterComponentSystem(cs ComponentSystem)

func RotationTransformSystemExec

func RotationTransformSystemExec(ctx Context)

RotationTransformSystemExec is the main function of the RotationTransformSystem

func SetupSystem

func SetupSystem(w *ecs.World, cs ComponentSystem)

func SpriteAnimationLinkSystemExec

func SpriteAnimationLinkSystemExec(ctx Context)

SpriteAnimationLinkSystemExec is what glues the animation and sprite together

func SpriteAnimationSystemExec

func SpriteAnimationSystemExec(ctx Context)

SpriteAnimationSystemExec is the main function of the SpriteSystem

func StartDefaults

func StartDefaults(e Engine)

func TagSystemExec

func TagSystemExec(ctx Context)

TagSystemExec is the main function of the TagSystem

func TransformSpriteSystemExec

func TransformSpriteSystemExec(ctx Context)

TransformSpriteSystemExec is the main function of the TransformSpriteSystem

func TransformSystemExec

func TransformSystemExec(ctx Context)

TransformSystemExec is the main function of the TransformSystem

func UpsertComponent

func UpsertComponent(w *ecs.World, comp ecs.NewComponentInput) *ecs.Component

Types

type AfterFuncComponentSystem

type AfterFuncComponentSystem struct {
	BaseComponentSystem
}

func (*AfterFuncComponentSystem) Components

func (cs *AfterFuncComponentSystem) Components(w *ecs.World) []*ecs.Component

Components returns the component signature(s)

func (*AfterFuncComponentSystem) SystemExec

func (cs *AfterFuncComponentSystem) SystemExec() SystemExecFn

SystemExec returns the exec func

func (*AfterFuncComponentSystem) SystemName

func (cs *AfterFuncComponentSystem) SystemName() string

SystemName returns the system name

func (*AfterFuncComponentSystem) SystemPriority

func (cs *AfterFuncComponentSystem) SystemPriority() int

SystemPriority returns the system priority

type AnimClipMode

type AnimClipMode byte

AnimClipMode determines how time is treated outside of the keyframed range of an animation clip.

const (
	// AnimOnce - When time reaches the end of the animation clip, the clip will automatically
	// stop playing and time will be reset to beginning of the clip.
	AnimOnce AnimClipMode = 0
	// AnimLoop - When time reaches the end of the animation clip, time will continue at the beginning.
	AnimLoop AnimClipMode = 1
	// AnimPingPong - When time reaches the end of the animation clip, time will ping pong back between beginning
	// and end.
	AnimPingPong AnimClipMode = 2
	// AnimClampForever - Plays back the animation. When it reaches the end, it will keep playing the last frame
	// and never stop playing.
	//
	// When playing backwards it will reach the first frame and will keep playing that. This is useful for code
	// that uses the Playing bool to avoid activating said trigger.
	AnimClampForever AnimClipMode = 3
)

type AnimationEventFn

type AnimationEventFn func(name, value string)

type AnimationEventID

type AnimationEventID int64

type AnimationEventListeners

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

func (*AnimationEventListeners) Add

func (*AnimationEventListeners) AddCatchAll

func (*AnimationEventListeners) Clear

func (ae *AnimationEventListeners) Clear()

func (*AnimationEventListeners) Dispatch

func (ae *AnimationEventListeners) Dispatch(name, value string)

func (*AnimationEventListeners) Remove

type BaseComponentSystem

type BaseComponentSystem struct {
}

func (*BaseComponentSystem) ExcludeComponents

func (cs *BaseComponentSystem) ExcludeComponents(w *ecs.World) []*ecs.Component

func (*BaseComponentSystem) SystemExec

func (cs *BaseComponentSystem) SystemExec() SystemExecFn

func (*BaseComponentSystem) SystemInit

func (cs *BaseComponentSystem) SystemInit() SystemInitFn

func (*BaseComponentSystem) SystemPriority

func (cs *BaseComponentSystem) SystemPriority() int

func (*BaseComponentSystem) SystemTags

func (cs *BaseComponentSystem) SystemTags() []string

type BasicCS

type BasicCS struct {
	SysName       string
	SysPriority   int
	SysInit       SystemInitFn
	SysExec       SystemExecFn
	SysTags       []string
	GetComponents func(w *ecs.World) []*ecs.Component
}

func (*BasicCS) BasicCS

func (cs *BasicCS) BasicCS() int

func (*BasicCS) Components

func (cs *BasicCS) Components(w *ecs.World) []*ecs.Component

func (*BasicCS) ExcludeComponents

func (cs *BasicCS) ExcludeComponents(w *ecs.World) []*ecs.Component

func (*BasicCS) SystemExec

func (cs *BasicCS) SystemExec() SystemExecFn

func (*BasicCS) SystemInit

func (cs *BasicCS) SystemInit() SystemInitFn

func (*BasicCS) SystemName

func (cs *BasicCS) SystemName() string

func (*BasicCS) SystemPriority

func (cs *BasicCS) SystemPriority() int

func (*BasicCS) SystemTags

func (cs *BasicCS) SystemTags() []string

type BeforeFuncComponentSystem

type BeforeFuncComponentSystem struct {
	BaseComponentSystem
}

func (*BeforeFuncComponentSystem) Components

func (cs *BeforeFuncComponentSystem) Components(w *ecs.World) []*ecs.Component

Components returns the component signature(s)

func (*BeforeFuncComponentSystem) SystemExec

func (cs *BeforeFuncComponentSystem) SystemExec() SystemExecFn

SystemExec returns the exec func

func (*BeforeFuncComponentSystem) SystemName

func (cs *BeforeFuncComponentSystem) SystemName() string

SystemName returns the system name

func (*BeforeFuncComponentSystem) SystemPriority

func (cs *BeforeFuncComponentSystem) SystemPriority() int

SystemPriority returns the system priority

type ComponentSystem

type ComponentSystem interface {
	SystemName() string
	SystemPriority() int
	SystemInit() SystemInitFn
	SystemExec() SystemExecFn
	SystemTags() []string
	Components(w *ecs.World) []*ecs.Component
	ExcludeComponents(w *ecs.World) []*ecs.Component
}

type Context

type Context interface {
	ecs.Context
	Engine() Engine
	FPS() float64
	Frame() int64
	IsDrawingSkipped() bool
	DefaultDrawImageOptions() *ebiten.DrawImageOptions
	Screen() *ebiten.Image
}

Context is the context passed to every system update function.

type DrawLayer

type DrawLayer struct {
	Layer  LayerIndex
	ZIndex int64
	// contains filtered or unexported fields
}

DrawLayer component data

type DrawLayerComponentSystem

type DrawLayerComponentSystem struct {
	BaseComponentSystem
}

DrawLayerComponentSystem component system

func (*DrawLayerComponentSystem) Components

func (cs *DrawLayerComponentSystem) Components(w *ecs.World) []*ecs.Component

Components returns the component signature(s)

func (*DrawLayerComponentSystem) ExcludeComponents

func (cs *DrawLayerComponentSystem) ExcludeComponents(w *ecs.World) []*ecs.Component

ExcludeComponents returns the components that must not be present in this system

func (*DrawLayerComponentSystem) SystemExec

func (cs *DrawLayerComponentSystem) SystemExec() SystemExecFn

SystemExec returns the system exec fn

func (*DrawLayerComponentSystem) SystemInit

func (cs *DrawLayerComponentSystem) SystemInit() SystemInitFn

SystemInit returns the system init

func (*DrawLayerComponentSystem) SystemName

func (cs *DrawLayerComponentSystem) SystemName() string

SystemName returns the system name

func (*DrawLayerComponentSystem) SystemPriority

func (cs *DrawLayerComponentSystem) SystemPriority() int

SystemPriority returns the system priority

type DrawLayerDrawableComponentSystem

type DrawLayerDrawableComponentSystem struct {
	BaseComponentSystem
}

DrawLayerDrawableComponentSystem handles drawables with a draw layer

func (*DrawLayerDrawableComponentSystem) Components

func (cs *DrawLayerDrawableComponentSystem) Components(w *ecs.World) []*ecs.Component

Components returns the component signature(s)

func (*DrawLayerDrawableComponentSystem) SystemExec

SystemExec returns the system exec fn

func (*DrawLayerDrawableComponentSystem) SystemInit

SystemInit returns the system init

func (*DrawLayerDrawableComponentSystem) SystemName

func (cs *DrawLayerDrawableComponentSystem) SystemName() string

SystemName returns the system name

func (*DrawLayerDrawableComponentSystem) SystemPriority

func (cs *DrawLayerDrawableComponentSystem) SystemPriority() int

SystemPriority returns the system priority

func (*DrawLayerDrawableComponentSystem) SystemTags

func (cs *DrawLayerDrawableComponentSystem) SystemTags() []string

type Drawable

type Drawable interface {
	Update(ctx Context)
	Draw(screen *ebiten.Image, opt *ebiten.DrawImageOptions)
	Destroy()
	DrawImageOptions() *ebiten.DrawImageOptions
	IsDisabled() bool
	Size() (w, h float64)
	SetTransformMatrix(m ebiten.GeoM)
	ClearTransformMatrix()
	SetBounds(b image.Rectangle)
}

Drawable is the basis of all ebiten drawable items (sprites, texts, shapes)

type DrawableImager

type DrawableImager interface {
	GetImage() *ebiten.Image
	SetImage(img *ebiten.Image)
}

type Engine

type Engine interface {
	AddWorld(w *ecs.World, priority int)
	RemoveWorld(w *ecs.World) bool
	Default() *ecs.World
	Run() error
	Ready() <-chan struct{}
	Get(key string) interface{}
	Set(key string, value interface{})
	UpdateFrame() int64
	DrawFrame() int64
	Width() int
	Height() int
	AddEventListener(eventName string, fn EventFn) EventID
	RemoveEventListener(id EventID) bool
	DispatchEvent(eventName string, data interface{})
}

type EntitySet

type EntitySet interface {
	Add(elements ...ecs.Entity)
	Remove(elements ...ecs.Entity)
	Contains(elements ...ecs.Entity) bool
	Values() []ecs.Entity
	SetBase
}

func NewEntitySet

func NewEntitySet(values ...ecs.Entity) EntitySet

NewEntitySet instantiates a new empty set and adds the entities (if present)

type EntitySortedList

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

func NewEntitySortedList

func NewEntitySortedList(mincap int) *EntitySortedList

func (*EntitySortedList) AddOrUpdate

func (sl *EntitySortedList) AddOrUpdate(key ecs.Entity, value SLVal) bool

func (*EntitySortedList) Delete

func (sl *EntitySortedList) Delete(key ecs.Entity) bool

func (*EntitySortedList) Each

func (sl *EntitySortedList) Each(fn func(key ecs.Entity, value SLVal) bool)

Each iterates on all entries, sorted.

Do not delete or add entries while looping (it is read locked while looping).

func (*EntitySortedList) FirstValue

func (sl *EntitySortedList) FirstValue() SLVal

func (*EntitySortedList) Get

func (sl *EntitySortedList) Get(key ecs.Entity) (SLVal, bool)

func (*EntitySortedList) LastValue

func (sl *EntitySortedList) LastValue() SLVal

func (*EntitySortedList) Reset

func (sl *EntitySortedList) Reset()

Reset clears the list.

type Event

type Event struct {
	Engine Engine
	Data   interface{}
}

type EventFn

type EventFn func(eventName string, e Event)

type EventID

type EventID int64

type EventManager

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

func (*EventManager) Deregister

func (m *EventManager) Deregister(id EventID) bool

func (*EventManager) Dispatch

func (m *EventManager) Dispatch(eventName string, engine Engine, data interface{})

func (*EventManager) Register

func (m *EventManager) Register(eventName string, fn EventFn) EventID

type Func

type Func struct {
	Fn       UpdateFn
	AfterFn  UpdateFn
	BeforeFn UpdateFn
}

type FuncComponentSystem

type FuncComponentSystem struct {
	BaseComponentSystem
}

func (*FuncComponentSystem) Components

func (cs *FuncComponentSystem) Components(w *ecs.World) []*ecs.Component

Components returns the component signature(s)

func (*FuncComponentSystem) SystemExec

func (cs *FuncComponentSystem) SystemExec() SystemExecFn

func (*FuncComponentSystem) SystemName

func (cs *FuncComponentSystem) SystemName() string

SystemName returns the system name

func (*FuncComponentSystem) SystemPriority

func (cs *FuncComponentSystem) SystemPriority() int

SystemPriority returns the system priority

type LayerIndex

type LayerIndex int64

LayerIndex is the layer index

type LayerTuple

type LayerTuple struct {
	Index LayerIndex
	Items *EntitySortedList
}

LayerTuple is returned when fetching all layers

type Middleware

type Middleware func(next SystemExecFn) SystemExecFn

Middleware is a system middleware

func MidSkipFrames

func MidSkipFrames(n int) Middleware

MidSkipFrames is a System middleware that skips n frames and then executes the next function in the system function stack

type Observer

type Observer interface {
	EventName() string
	OnEvent(e Event)
}

type Rotation

type Rotation struct {
	Speed float64
}

type RotationTransformComponentSystem

type RotationTransformComponentSystem struct {
	BaseComponentSystem
}

func (*RotationTransformComponentSystem) Components

func (cs *RotationTransformComponentSystem) Components(w *ecs.World) []*ecs.Component

func (*RotationTransformComponentSystem) SystemExec

func (*RotationTransformComponentSystem) SystemInit

func (*RotationTransformComponentSystem) SystemName

func (cs *RotationTransformComponentSystem) SystemName() string

func (*RotationTransformComponentSystem) SystemPriority

func (cs *RotationTransformComponentSystem) SystemPriority() int

type SLVal

type SLVal interface {
	Less(v interface{}) bool
}

type SetBase

type SetBase interface {
	Empty() bool
	Size() int
	Clear()
}

type SoloDrawableComponentSystem

type SoloDrawableComponentSystem struct {
	BaseComponentSystem
}

SoloDrawableComponentSystem handles drawable items (without a draw layer)

func (*SoloDrawableComponentSystem) Components

func (cs *SoloDrawableComponentSystem) Components(w *ecs.World) []*ecs.Component

Components returns the component signature(s)

func (*SoloDrawableComponentSystem) ExcludeComponents

func (cs *SoloDrawableComponentSystem) ExcludeComponents(w *ecs.World) []*ecs.Component

ExcludeComponents returns the components that must not be present in this system

func (*SoloDrawableComponentSystem) SystemExec

func (cs *SoloDrawableComponentSystem) SystemExec() SystemExecFn

SystemExec returns the system exec fn

func (*SoloDrawableComponentSystem) SystemInit

func (cs *SoloDrawableComponentSystem) SystemInit() SystemInitFn

SystemInit returns the system init

func (*SoloDrawableComponentSystem) SystemName

func (cs *SoloDrawableComponentSystem) SystemName() string

SystemName returns the system name

func (*SoloDrawableComponentSystem) SystemPriority

func (cs *SoloDrawableComponentSystem) SystemPriority() int

SystemPriority returns the system priority

func (*SoloDrawableComponentSystem) SystemTags

func (cs *SoloDrawableComponentSystem) SystemTags() []string

SystemTags -> draw

type Sprite

type Sprite struct {
	X       float64
	Y       float64
	Angle   float64
	ScaleX  float64
	ScaleY  float64
	OriginX float64
	OriginY float64

	Bounds image.Rectangle // Bounds for drawing subimage

	Options *ebiten.DrawImageOptions
	Image   *ebiten.Image

	DrawDisabled bool // if true, the SpriteSystem will not draw this
	// contains filtered or unexported fields
}

Sprite is the data of a sprite component.

func (*Sprite) ClearTransformMatrix

func (s *Sprite) ClearTransformMatrix()

func (*Sprite) Destroy

func (s *Sprite) Destroy()

func (*Sprite) Draw

func (s *Sprite) Draw(screen *ebiten.Image, opt *ebiten.DrawImageOptions)

func (*Sprite) DrawImageOptions

func (s *Sprite) DrawImageOptions() *ebiten.DrawImageOptions

func (*Sprite) GetImage

func (s *Sprite) GetImage() *ebiten.Image

func (*Sprite) GetPrecomputedImage

func (s *Sprite) GetPrecomputedImage() *ebiten.Image

GetPrecomputedImage returns the last precomputed image

func (*Sprite) GetPrecomputedImageDim

func (s *Sprite) GetPrecomputedImageDim() (width, height float64)

GetPrecomputedImageDim returns the last precomputed image dimmensions

func (*Sprite) IsDisabled

func (s *Sprite) IsDisabled() bool

func (*Sprite) SetBounds

func (s *Sprite) SetBounds(b image.Rectangle)

func (*Sprite) SetImage

func (s *Sprite) SetImage(img *ebiten.Image)

func (*Sprite) SetTransformMatrix

func (s *Sprite) SetTransformMatrix(m ebiten.GeoM)

func (*Sprite) Size

func (s *Sprite) Size() (w, h float64)

func (*Sprite) Update

func (s *Sprite) Update(ctx Context)

type SpriteAnimation

type SpriteAnimation struct {
	Enabled     bool
	Playing     bool
	ActiveClip  int
	ActiveFrame int
	Clips       []SpriteAnimationClip
	T           float64

	// Default fps for clips with no fps specified
	Fps float64
	// contains filtered or unexported fields
}

SpriteAnimation holds the data of a sprite animation (and clips)

func (*SpriteAnimation) AnimEvent

func (a *SpriteAnimation) AnimEvent(name, value string)

func (*SpriteAnimation) PlayClip

func (a *SpriteAnimation) PlayClip(name string)

PlayClip sets the animation to play a clip by name

type SpriteAnimationClip

type SpriteAnimationClip struct {
	// The name of an animation is not allowed to be changed during runtime
	// but since this is part of a component (and components shouldn't have logic),
	// it is a public member.
	Name       string
	Image      *ebiten.Image
	Frames     []image.Rectangle
	Events     []*SpriteAnimationEvent //TODO: link
	Fps        float64
	ClipMode   AnimClipMode
	EndedEvent *SpriteAnimationEvent //TODO: link
}

SpriteAnimationClip is an animation clip, like a character walk cycle.

type SpriteAnimationComponentSystem

type SpriteAnimationComponentSystem struct {
	BaseComponentSystem
}

func (*SpriteAnimationComponentSystem) Components

func (cs *SpriteAnimationComponentSystem) Components(w *ecs.World) []*ecs.Component

func (*SpriteAnimationComponentSystem) ExcludeComponents

func (cs *SpriteAnimationComponentSystem) ExcludeComponents(w *ecs.World) []*ecs.Component

func (*SpriteAnimationComponentSystem) SystemExec

func (*SpriteAnimationComponentSystem) SystemName

func (cs *SpriteAnimationComponentSystem) SystemName() string

func (*SpriteAnimationComponentSystem) SystemPriority

func (cs *SpriteAnimationComponentSystem) SystemPriority() int

func (*SpriteAnimationComponentSystem) SystemTags

func (cs *SpriteAnimationComponentSystem) SystemTags() []string

type SpriteAnimationEvent

type SpriteAnimationEvent struct {
	Name  string
	Value string
}

type SpriteAnimationLinkComponentSystem

type SpriteAnimationLinkComponentSystem struct {
	BaseComponentSystem
}

func (*SpriteAnimationLinkComponentSystem) Components

func (*SpriteAnimationLinkComponentSystem) ExcludeComponents

func (cs *SpriteAnimationLinkComponentSystem) ExcludeComponents(w *ecs.World) []*ecs.Component

func (*SpriteAnimationLinkComponentSystem) SystemExec

func (*SpriteAnimationLinkComponentSystem) SystemName

func (cs *SpriteAnimationLinkComponentSystem) SystemName() string

func (*SpriteAnimationLinkComponentSystem) SystemPriority

func (cs *SpriteAnimationLinkComponentSystem) SystemPriority() int

func (*SpriteAnimationLinkComponentSystem) SystemTags

func (cs *SpriteAnimationLinkComponentSystem) SystemTags() []string

type SystemExecFn

type SystemExecFn func(ctx Context)

func SystemWrap

func SystemWrap(fn SystemExecFn, mid ...Middleware) SystemExecFn

SystemWrap wraps middlewares into a SystemExecFn

type SystemInitFn

type SystemInitFn func(w *ecs.World, sys *ecs.System)

type Tag

type Tag struct {
	// public and private struct fields
	Tags  []string
	Dirty bool
	// contains filtered or unexported fields
}

Tag is the data of a tag component.

func (*Tag) Add

func (t *Tag) Add(tag string)

func (*Tag) Remove

func (t *Tag) Remove(tag string)

type TagComponentSystem

type TagComponentSystem struct {
	BaseComponentSystem
}

func (*TagComponentSystem) Components

func (cs *TagComponentSystem) Components(w *ecs.World) []*ecs.Component

func (*TagComponentSystem) ExcludeComponents

func (cs *TagComponentSystem) ExcludeComponents(w *ecs.World) []*ecs.Component

func (*TagComponentSystem) SystemExec

func (cs *TagComponentSystem) SystemExec() SystemExecFn

func (*TagComponentSystem) SystemInit

func (cs *TagComponentSystem) SystemInit() SystemInitFn

func (*TagComponentSystem) SystemName

func (cs *TagComponentSystem) SystemName() string

type Transform

type Transform struct {
	Parent *Transform
	X      float64
	Y      float64
	Angle  float64
	ScaleX float64
	ScaleY float64
	// contains filtered or unexported fields
}

Transform is a hierarchy based matrix

func NewTransform

func NewTransform() *Transform

NewTransform returns a new transform with ScaleX = 1 and ScaleY = 1

type TransformComponentSystem

type TransformComponentSystem struct {
	BaseComponentSystem
}

func (*TransformComponentSystem) Components

func (cs *TransformComponentSystem) Components(w *ecs.World) []*ecs.Component

func (*TransformComponentSystem) ExcludeComponents

func (cs *TransformComponentSystem) ExcludeComponents(w *ecs.World) []*ecs.Component

func (*TransformComponentSystem) SystemExec

func (cs *TransformComponentSystem) SystemExec() SystemExecFn

func (*TransformComponentSystem) SystemInit

func (cs *TransformComponentSystem) SystemInit() SystemInitFn

func (*TransformComponentSystem) SystemName

func (cs *TransformComponentSystem) SystemName() string

func (*TransformComponentSystem) SystemPriority

func (cs *TransformComponentSystem) SystemPriority() int

type TransformDrawableComponentSystem

type TransformDrawableComponentSystem struct {
	BaseComponentSystem
}

func (*TransformDrawableComponentSystem) Components

func (cs *TransformDrawableComponentSystem) Components(w *ecs.World) []*ecs.Component

func (*TransformDrawableComponentSystem) ExcludeComponents

func (cs *TransformDrawableComponentSystem) ExcludeComponents(w *ecs.World) []*ecs.Component

func (*TransformDrawableComponentSystem) SystemExec

func (*TransformDrawableComponentSystem) SystemInit

SystemInit returns the system init

func (*TransformDrawableComponentSystem) SystemName

func (cs *TransformDrawableComponentSystem) SystemName() string

func (*TransformDrawableComponentSystem) SystemPriority

func (cs *TransformDrawableComponentSystem) SystemPriority() int

type UpdateFn

type UpdateFn func(ctx Context, e ecs.Entity)

Jump to

Keyboard shortcuts

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