Documentation
¶
Index ¶
- func SetAudioPlayerComponentData(w ecs.BaseWorld, e ecs.Entity, data AudioPlayer)
- func SetCameraComponentData(w ecs.BaseWorld, e ecs.Entity, data Camera)
- func SetFollowTransformComponentData(w ecs.BaseWorld, e ecs.Entity, data FollowTransform)
- func SetFunctionComponentData(w ecs.BaseWorld, e ecs.Entity, data Function)
- func SetTrTweeningComponentData(w ecs.BaseWorld, e ecs.Entity, data TrTweening)
- func SetTransformComponentData(w ecs.BaseWorld, e ecs.Entity, data Transform)
- type AudioPlayer
- func (p *AudioPlayer) Current() time.Duration
- func (p *AudioPlayer) IsPlaying() bool
- func (p *AudioPlayer) Pan() float64
- func (p *AudioPlayer) Pause()
- func (p *AudioPlayer) Pitch() float64
- func (p *AudioPlayer) Play()
- func (p *AudioPlayer) Rewind() error
- func (p *AudioPlayer) Seek(offset time.Duration) error
- func (p *AudioPlayer) SetPan(pan float64)
- func (p *AudioPlayer) SetPitch(pan float64)
- func (p *AudioPlayer) SetVolume(volume float64)
- func (p *AudioPlayer) Volume() float64
- type AudioPlayerComponent
- func (c *AudioPlayerComponent) Data(e ecs.Entity) *AudioPlayer
- func (c *AudioPlayerComponent) Flag() ecs.Flag
- func (AudioPlayerComponent) Name() string
- func (c *AudioPlayerComponent) Remove(e ecs.Entity)
- func (c *AudioPlayerComponent) Setup(w ecs.BaseWorld, f ecs.Flag, key [4]byte)
- func (AudioPlayerComponent) UUID() string
- func (c *AudioPlayerComponent) Upsert(e ecs.Entity, data interface{})
- type Camera
- type CameraComponent
- func (c *CameraComponent) Data(e ecs.Entity) *Camera
- func (c *CameraComponent) Flag() ecs.Flag
- func (CameraComponent) Name() string
- func (c *CameraComponent) Remove(e ecs.Entity)
- func (c *CameraComponent) Setup(w ecs.BaseWorld, f ecs.Flag, key [4]byte)
- func (CameraComponent) UUID() string
- func (c *CameraComponent) Upsert(e ecs.Entity, data interface{})
- type CameraRealTimeEasingFn
- type CameraSystem
- func (s *CameraSystem) ComponentAdded(e ecs.Entity, eflag ecs.Flag)
- func (s *CameraSystem) ComponentRemoved(e ecs.Entity, eflag ecs.Flag)
- func (s *CameraSystem) ComponentResized(cflag ecs.Flag)
- func (s *CameraSystem) ComponentWillResize(cflag ecs.Flag)
- func (s *CameraSystem) Disable()
- func (s *CameraSystem) Draw(ctx core.DrawCtx)
- func (s *CameraSystem) DrawPriority(ctx core.DrawCtx)
- func (s *CameraSystem) Enable()
- func (s *CameraSystem) Enabled() bool
- func (CameraSystem) Name() string
- func (*CameraSystem) Priority() int64
- func (s *CameraSystem) Setup(w ecs.BaseWorld)
- func (CameraSystem) UUID() string
- func (s *CameraSystem) Update(ctx core.UpdateCtx)
- func (s *CameraSystem) UpdatePriority(ctx core.UpdateCtx)
- func (s *CameraSystem) V() *viewCameraSystem
- type DrawFn
- type FollowTransform
- type FollowTransformComponent
- func (c *FollowTransformComponent) Data(e ecs.Entity) *FollowTransform
- func (c *FollowTransformComponent) Flag() ecs.Flag
- func (FollowTransformComponent) Name() string
- func (c *FollowTransformComponent) Remove(e ecs.Entity)
- func (c *FollowTransformComponent) Setup(w ecs.BaseWorld, f ecs.Flag, key [4]byte)
- func (FollowTransformComponent) UUID() string
- func (c *FollowTransformComponent) Upsert(e ecs.Entity, data interface{})
- type FollowTransformSystem
- func (s *FollowTransformSystem) ComponentAdded(e ecs.Entity, eflag ecs.Flag)
- func (s *FollowTransformSystem) ComponentRemoved(e ecs.Entity, eflag ecs.Flag)
- func (s *FollowTransformSystem) ComponentResized(cflag ecs.Flag)
- func (s *FollowTransformSystem) ComponentWillResize(cflag ecs.Flag)
- func (s *FollowTransformSystem) Disable()
- func (s *FollowTransformSystem) Draw(ctx core.DrawCtx)
- func (s *FollowTransformSystem) DrawPriority(ctx core.DrawCtx)
- func (s *FollowTransformSystem) Enable()
- func (s *FollowTransformSystem) Enabled() bool
- func (FollowTransformSystem) Name() string
- func (*FollowTransformSystem) Priority() int64
- func (s *FollowTransformSystem) Setup(w ecs.BaseWorld)
- func (FollowTransformSystem) UUID() string
- func (s *FollowTransformSystem) Update(ctx core.UpdateCtx)
- func (s *FollowTransformSystem) UpdatePriority(ctx core.UpdateCtx)
- func (s *FollowTransformSystem) V() *viewFollowTransformSystem
- type Function
- type FunctionComponent
- func (c *FunctionComponent) Data(e ecs.Entity) *Function
- func (c *FunctionComponent) Flag() ecs.Flag
- func (FunctionComponent) Name() string
- func (c *FunctionComponent) Remove(e ecs.Entity)
- func (c *FunctionComponent) Setup(w ecs.BaseWorld, f ecs.Flag, key [4]byte)
- func (FunctionComponent) UUID() string
- func (c *FunctionComponent) Upsert(e ecs.Entity, data interface{})
- type FunctionSystem
- func (s *FunctionSystem) ComponentAdded(e ecs.Entity, eflag ecs.Flag)
- func (s *FunctionSystem) ComponentRemoved(e ecs.Entity, eflag ecs.Flag)
- func (s *FunctionSystem) ComponentResized(cflag ecs.Flag)
- func (s *FunctionSystem) ComponentWillResize(cflag ecs.Flag)
- func (s *FunctionSystem) Disable()
- func (s *FunctionSystem) Draw(ctx core.DrawCtx)
- func (s *FunctionSystem) DrawPriority(ctx core.DrawCtx)
- func (s *FunctionSystem) Enable()
- func (s *FunctionSystem) Enabled() bool
- func (FunctionSystem) Name() string
- func (*FunctionSystem) Priority() int64
- func (s *FunctionSystem) Setup(w ecs.BaseWorld)
- func (FunctionSystem) UUID() string
- func (s *FunctionSystem) Update(ctx core.UpdateCtx)
- func (s *FunctionSystem) UpdatePriority(ctx core.UpdateCtx)
- func (s *FunctionSystem) V() *viewFunctionSystem
- type NewAudioPlayerInput
- type TrTween
- type TrTweenTuple
- type TrTweenType
- type TrTweening
- type TrTweeningComponent
- func (c *TrTweeningComponent) Data(e ecs.Entity) *TrTweening
- func (c *TrTweeningComponent) Flag() ecs.Flag
- func (TrTweeningComponent) Name() string
- func (c *TrTweeningComponent) Remove(e ecs.Entity)
- func (c *TrTweeningComponent) Setup(w ecs.BaseWorld, f ecs.Flag, key [4]byte)
- func (TrTweeningComponent) UUID() string
- func (c *TrTweeningComponent) Upsert(e ecs.Entity, data interface{})
- type TrTweeningSystem
- func (s *TrTweeningSystem) ComponentAdded(e ecs.Entity, eflag ecs.Flag)
- func (s *TrTweeningSystem) ComponentRemoved(e ecs.Entity, eflag ecs.Flag)
- func (s *TrTweeningSystem) ComponentResized(cflag ecs.Flag)
- func (s *TrTweeningSystem) ComponentWillResize(cflag ecs.Flag)
- func (s *TrTweeningSystem) Disable()
- func (s *TrTweeningSystem) Draw(ctx core.DrawCtx)
- func (s *TrTweeningSystem) DrawPriority(ctx core.DrawCtx)
- func (s *TrTweeningSystem) Enable()
- func (s *TrTweeningSystem) Enabled() bool
- func (TrTweeningSystem) Name() string
- func (*TrTweeningSystem) Priority() int64
- func (s *TrTweeningSystem) Setup(w ecs.BaseWorld)
- func (TrTweeningSystem) UUID() string
- func (s *TrTweeningSystem) Update(ctx core.UpdateCtx)
- func (s *TrTweeningSystem) UpdatePriority(ctx core.UpdateCtx)
- func (s *TrTweeningSystem) V() *viewTrTweeningSystem
- type Transform
- func (t *Transform) Angle() float64
- func (t *Transform) GeoM() ebiten.GeoM
- func (t *Transform) Parent() ecs.Entity
- func (t *Transform) ParentTransform() *Transform
- func (t *Transform) Pos() geom.Vec
- func (t *Transform) Scale() (sx, sy float64)
- func (t *Transform) ScaleX() float64
- func (t *Transform) ScaleY() float64
- func (t *Transform) SetAngle(r float64) *Transform
- func (t *Transform) SetParent(e ecs.Entity) bool
- func (t *Transform) SetPos(p geom.Vec) *Transform
- func (t *Transform) SetScale(sx, sy float64) *Transform
- func (t *Transform) SetScaleX(sx float64) *Transform
- func (t *Transform) SetScaleY(sy float64) *Transform
- func (t *Transform) SetX(x float64) *Transform
- func (t *Transform) SetY(y float64) *Transform
- func (t *Transform) Tree() []*Transform
- func (t *Transform) X() float64
- func (t *Transform) Y() float64
- type TransformComponent
- func (c *TransformComponent) Data(e ecs.Entity) *Transform
- func (c *TransformComponent) Flag() ecs.Flag
- func (TransformComponent) Name() string
- func (c *TransformComponent) Remove(e ecs.Entity)
- func (c *TransformComponent) Setup(w ecs.BaseWorld, f ecs.Flag, key [4]byte)
- func (TransformComponent) UUID() string
- func (c *TransformComponent) Upsert(e ecs.Entity, data interface{})
- type TransformSystem
- func (s *TransformSystem) ComponentAdded(e ecs.Entity, eflag ecs.Flag)
- func (s *TransformSystem) ComponentRemoved(e ecs.Entity, eflag ecs.Flag)
- func (s *TransformSystem) ComponentResized(cflag ecs.Flag)
- func (s *TransformSystem) ComponentWillResize(cflag ecs.Flag)
- func (s *TransformSystem) Disable()
- func (s *TransformSystem) Draw(ctx core.DrawCtx)
- func (s *TransformSystem) DrawPriority(ctx core.DrawCtx)
- func (s *TransformSystem) Enable()
- func (s *TransformSystem) Enabled() bool
- func (s *TransformSystem) GlobalToLocal(gx, gy float64, e ecs.Entity) (x, y float64, ok bool)
- func (s *TransformSystem) GlobalToLocalTr(gx, gy float64, tr *Transform) (x, y float64)
- func (s *TransformSystem) LocalToGlobal(lx, ly float64, e ecs.Entity) (x, y float64, ok bool)
- func (s *TransformSystem) LocalToGlobalTr(lx, ly float64, tr *Transform) (x, y float64)
- func (TransformSystem) Name() string
- func (*TransformSystem) Priority() int64
- func (s *TransformSystem) Setup(w ecs.BaseWorld)
- func (TransformSystem) UUID() string
- func (s *TransformSystem) Update(ctx core.UpdateCtx)
- func (s *TransformSystem) UpdatePriority(ctx core.UpdateCtx)
- func (s *TransformSystem) V() *viewTransformSystem
- type UpdateFn
- type VICameraSystem
- type VIFollowTransformSystem
- type VIFunctionSystem
- type VITrTweeningSystem
- type VITransformSystem
- type WatchAudioPlayer
- type WatchCamera
- type WatchFollowTransform
- type WatchFunction
- type WatchTrTweening
- type WatchTransform
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAudioPlayerComponentData ¶
func SetAudioPlayerComponentData(w ecs.BaseWorld, e ecs.Entity, data AudioPlayer)
SetAudioPlayerComponentData updates/adds a AudioPlayer to Entity e
func SetCameraComponentData ¶
func SetCameraComponentData(w ecs.BaseWorld, e ecs.Entity, data Camera)
SetCameraComponentData updates/adds a Camera to Entity e
func SetFollowTransformComponentData ¶
func SetFollowTransformComponentData(w ecs.BaseWorld, e ecs.Entity, data FollowTransform)
SetFollowTransformComponentData updates/adds a FollowTransform to Entity e
func SetFunctionComponentData ¶
func SetFunctionComponentData(w ecs.BaseWorld, e ecs.Entity, data Function)
SetFunctionComponentData updates/adds a Function to Entity e
func SetTrTweeningComponentData ¶
func SetTrTweeningComponentData(w ecs.BaseWorld, e ecs.Entity, data TrTweening)
SetTrTweeningComponentData updates/adds a TrTweening to Entity e
func SetTransformComponentData ¶
func SetTransformComponentData(w ecs.BaseWorld, e ecs.Entity, data Transform)
SetTransformComponentData updates/adds a Transform to Entity e
Types ¶
type AudioPlayer ¶
type AudioPlayer struct {
// contains filtered or unexported fields
}
func GetAudioPlayerComponentData ¶
func GetAudioPlayerComponentData(w ecs.BaseWorld, e ecs.Entity) *AudioPlayer
GetAudioPlayerComponentData gets the *AudioPlayer of Entity e
func NewAudioPlayer ¶
func NewAudioPlayer(input NewAudioPlayerInput) AudioPlayer
func (*AudioPlayer) Current ¶
func (p *AudioPlayer) Current() time.Duration
func (*AudioPlayer) IsPlaying ¶
func (p *AudioPlayer) IsPlaying() bool
func (*AudioPlayer) Pan ¶
func (p *AudioPlayer) Pan() float64
func (*AudioPlayer) Pause ¶
func (p *AudioPlayer) Pause()
func (*AudioPlayer) Pitch ¶
func (p *AudioPlayer) Pitch() float64
func (*AudioPlayer) Play ¶
func (p *AudioPlayer) Play()
func (*AudioPlayer) Rewind ¶
func (p *AudioPlayer) Rewind() error
func (*AudioPlayer) SetPan ¶
func (p *AudioPlayer) SetPan(pan float64)
func (*AudioPlayer) SetPitch ¶
func (p *AudioPlayer) SetPitch(pan float64)
func (*AudioPlayer) SetVolume ¶
func (p *AudioPlayer) SetVolume(volume float64)
func (*AudioPlayer) Volume ¶
func (p *AudioPlayer) Volume() float64
type AudioPlayerComponent ¶
type AudioPlayerComponent struct {
// contains filtered or unexported fields
}
AudioPlayerComponent implements ecs.BaseComponent
func GetAudioPlayerComponent ¶
func GetAudioPlayerComponent(w ecs.BaseWorld) *AudioPlayerComponent
GetAudioPlayerComponent returns the instance of the component in a World
func (*AudioPlayerComponent) Data ¶
func (c *AudioPlayerComponent) Data(e ecs.Entity) *AudioPlayer
func (AudioPlayerComponent) Name ¶
func (AudioPlayerComponent) Name() string
Name implements ecs.BaseComponent
func (*AudioPlayerComponent) Remove ¶
func (c *AudioPlayerComponent) Remove(e ecs.Entity)
Remove a AudioPlayer data from entity e
Warning: DO NOT call remove inside the system entities loop
func (*AudioPlayerComponent) Setup ¶
func (c *AudioPlayerComponent) Setup(w ecs.BaseWorld, f ecs.Flag, key [4]byte)
Setup is called by ecs.BaseWorld
Do not call this directly
func (AudioPlayerComponent) UUID ¶
func (AudioPlayerComponent) UUID() string
UUID implements ecs.BaseComponent
func (*AudioPlayerComponent) Upsert ¶
func (c *AudioPlayerComponent) Upsert(e ecs.Entity, data interface{})
Upsert creates or updates a component data of an entity. Not recommended to be used directly. Use SetAudioPlayerComponentData to change component data outside of a system loop.
type Camera ¶
type Camera struct {
// contains filtered or unexported fields
}
func GetCameraComponentData ¶
func GetCameraComponentData(w ecs.BaseWorld, e ecs.Entity) *Camera
GetCameraComponentData gets the *Camera of Entity e
func NewCamera ¶
func NewCamera(drawTarget core.DrawTargetID) Camera
func (*Camera) SetViewRect ¶
type CameraComponent ¶
type CameraComponent struct {
// contains filtered or unexported fields
}
CameraComponent implements ecs.BaseComponent
func GetCameraComponent ¶
func GetCameraComponent(w ecs.BaseWorld) *CameraComponent
GetCameraComponent returns the instance of the component in a World
func (*CameraComponent) Data ¶
func (c *CameraComponent) Data(e ecs.Entity) *Camera
func (CameraComponent) Name ¶
func (CameraComponent) Name() string
Name implements ecs.BaseComponent
func (*CameraComponent) Remove ¶
func (c *CameraComponent) Remove(e ecs.Entity)
Remove a Camera data from entity e
Warning: DO NOT call remove inside the system entities loop
func (*CameraComponent) Setup ¶
func (c *CameraComponent) Setup(w ecs.BaseWorld, f ecs.Flag, key [4]byte)
Setup is called by ecs.BaseWorld
Do not call this directly
func (CameraComponent) UUID ¶
func (CameraComponent) UUID() string
UUID implements ecs.BaseComponent
func (*CameraComponent) Upsert ¶
func (c *CameraComponent) Upsert(e ecs.Entity, data interface{})
Upsert creates or updates a component data of an entity. Not recommended to be used directly. Use SetCameraComponentData to change component data outside of a system loop.
type CameraRealTimeEasingFn ¶
type CameraSystem ¶
type CameraSystem struct {
// contains filtered or unexported fields
}
CameraSystem implements ecs.BaseSystem
func GetCameraSystem ¶
func GetCameraSystem(w ecs.BaseWorld) *CameraSystem
GetCameraSystem returns the instance of the system in a World
func (*CameraSystem) ComponentAdded ¶
func (s *CameraSystem) ComponentAdded(e ecs.Entity, eflag ecs.Flag)
func (*CameraSystem) ComponentRemoved ¶
func (s *CameraSystem) ComponentRemoved(e ecs.Entity, eflag ecs.Flag)
func (*CameraSystem) ComponentResized ¶
func (s *CameraSystem) ComponentResized(cflag ecs.Flag)
func (*CameraSystem) ComponentWillResize ¶
func (s *CameraSystem) ComponentWillResize(cflag ecs.Flag)
func (*CameraSystem) DrawPriority ¶
func (s *CameraSystem) DrawPriority(ctx core.DrawCtx)
DrawPriority noop
func (CameraSystem) Name ¶
func (CameraSystem) Name() string
func (*CameraSystem) Priority ¶
func (*CameraSystem) Priority() int64
func (*CameraSystem) Setup ¶
func (s *CameraSystem) Setup(w ecs.BaseWorld)
func (*CameraSystem) UpdatePriority ¶
func (s *CameraSystem) UpdatePriority(ctx core.UpdateCtx)
UpdatePriority noop
func (*CameraSystem) V ¶
func (s *CameraSystem) V() *viewCameraSystem
type FollowTransform ¶
type FollowTransform struct {
// contains filtered or unexported fields
}
func GetFollowTransformComponentData ¶
func GetFollowTransformComponentData(w ecs.BaseWorld, e ecs.Entity) *FollowTransform
GetFollowTransformComponentData gets the *FollowTransform of Entity e
func (*FollowTransform) SetBounds ¶
func (c *FollowTransform) SetBounds(dz geom.Rect)
func (*FollowTransform) SetDeadZone ¶
func (c *FollowTransform) SetDeadZone(dz geom.Vec)
func (*FollowTransform) SetIsLocalOffset ¶
func (c *FollowTransform) SetIsLocalOffset(islocal bool)
func (*FollowTransform) SetOffset ¶
func (c *FollowTransform) SetOffset(dz geom.Rect)
func (*FollowTransform) SetTarget ¶
func (c *FollowTransform) SetTarget(e ecs.Entity)
type FollowTransformComponent ¶
type FollowTransformComponent struct {
// contains filtered or unexported fields
}
FollowTransformComponent implements ecs.BaseComponent
func GetFollowTransformComponent ¶
func GetFollowTransformComponent(w ecs.BaseWorld) *FollowTransformComponent
GetFollowTransformComponent returns the instance of the component in a World
func (*FollowTransformComponent) Data ¶
func (c *FollowTransformComponent) Data(e ecs.Entity) *FollowTransform
func (*FollowTransformComponent) Flag ¶
func (c *FollowTransformComponent) Flag() ecs.Flag
Flag returns the
func (FollowTransformComponent) Name ¶
func (FollowTransformComponent) Name() string
Name implements ecs.BaseComponent
func (*FollowTransformComponent) Remove ¶
func (c *FollowTransformComponent) Remove(e ecs.Entity)
Remove a FollowTransform data from entity e
Warning: DO NOT call remove inside the system entities loop
func (*FollowTransformComponent) Setup ¶
func (c *FollowTransformComponent) Setup(w ecs.BaseWorld, f ecs.Flag, key [4]byte)
Setup is called by ecs.BaseWorld
Do not call this directly
func (FollowTransformComponent) UUID ¶
func (FollowTransformComponent) UUID() string
UUID implements ecs.BaseComponent
func (*FollowTransformComponent) Upsert ¶
func (c *FollowTransformComponent) Upsert(e ecs.Entity, data interface{})
Upsert creates or updates a component data of an entity. Not recommended to be used directly. Use SetFollowTransformComponentData to change component data outside of a system loop.
type FollowTransformSystem ¶
type FollowTransformSystem struct {
// contains filtered or unexported fields
}
FollowTransformSystem implements ecs.BaseSystem
func GetFollowTransformSystem ¶
func GetFollowTransformSystem(w ecs.BaseWorld) *FollowTransformSystem
GetFollowTransformSystem returns the instance of the system in a World
func (*FollowTransformSystem) ComponentAdded ¶
func (s *FollowTransformSystem) ComponentAdded(e ecs.Entity, eflag ecs.Flag)
func (*FollowTransformSystem) ComponentRemoved ¶
func (s *FollowTransformSystem) ComponentRemoved(e ecs.Entity, eflag ecs.Flag)
func (*FollowTransformSystem) ComponentResized ¶
func (s *FollowTransformSystem) ComponentResized(cflag ecs.Flag)
func (*FollowTransformSystem) ComponentWillResize ¶
func (s *FollowTransformSystem) ComponentWillResize(cflag ecs.Flag)
func (*FollowTransformSystem) Draw ¶
func (s *FollowTransformSystem) Draw(ctx core.DrawCtx)
Draw noop
func (*FollowTransformSystem) DrawPriority ¶
func (s *FollowTransformSystem) DrawPriority(ctx core.DrawCtx)
DrawPriority noop
func (*FollowTransformSystem) Enabled ¶
func (s *FollowTransformSystem) Enabled() bool
Enabled checks if enabled
func (FollowTransformSystem) Name ¶
func (FollowTransformSystem) Name() string
func (*FollowTransformSystem) Priority ¶
func (*FollowTransformSystem) Priority() int64
func (*FollowTransformSystem) Setup ¶
func (s *FollowTransformSystem) Setup(w ecs.BaseWorld)
func (FollowTransformSystem) UUID ¶
func (FollowTransformSystem) UUID() string
UUID implements ecs.BaseSystem
func (*FollowTransformSystem) Update ¶
func (s *FollowTransformSystem) Update(ctx core.UpdateCtx)
Update calculates all transform matrices
func (*FollowTransformSystem) UpdatePriority ¶
func (s *FollowTransformSystem) UpdatePriority(ctx core.UpdateCtx)
UpdatePriority noop
func (*FollowTransformSystem) V ¶
func (s *FollowTransformSystem) V() *viewFollowTransformSystem
type Function ¶
func GetFunctionComponentData ¶
func GetFunctionComponentData(w ecs.BaseWorld, e ecs.Entity) *Function
GetFunctionComponentData gets the *Function of Entity e
type FunctionComponent ¶
type FunctionComponent struct {
// contains filtered or unexported fields
}
FunctionComponent implements ecs.BaseComponent
func GetFunctionComponent ¶
func GetFunctionComponent(w ecs.BaseWorld) *FunctionComponent
GetFunctionComponent returns the instance of the component in a World
func (*FunctionComponent) Data ¶
func (c *FunctionComponent) Data(e ecs.Entity) *Function
func (FunctionComponent) Name ¶
func (FunctionComponent) Name() string
Name implements ecs.BaseComponent
func (*FunctionComponent) Remove ¶
func (c *FunctionComponent) Remove(e ecs.Entity)
Remove a Function data from entity e
Warning: DO NOT call remove inside the system entities loop
func (*FunctionComponent) Setup ¶
func (c *FunctionComponent) Setup(w ecs.BaseWorld, f ecs.Flag, key [4]byte)
Setup is called by ecs.BaseWorld
Do not call this directly
func (FunctionComponent) UUID ¶
func (FunctionComponent) UUID() string
UUID implements ecs.BaseComponent
func (*FunctionComponent) Upsert ¶
func (c *FunctionComponent) Upsert(e ecs.Entity, data interface{})
Upsert creates or updates a component data of an entity. Not recommended to be used directly. Use SetFunctionComponentData to change component data outside of a system loop.
type FunctionSystem ¶
type FunctionSystem struct {
// contains filtered or unexported fields
}
FunctionSystem implements ecs.BaseSystem
func GetFunctionSystem ¶
func GetFunctionSystem(w ecs.BaseWorld) *FunctionSystem
GetFunctionSystem returns the instance of the system in a World
func (*FunctionSystem) ComponentAdded ¶
func (s *FunctionSystem) ComponentAdded(e ecs.Entity, eflag ecs.Flag)
func (*FunctionSystem) ComponentRemoved ¶
func (s *FunctionSystem) ComponentRemoved(e ecs.Entity, eflag ecs.Flag)
func (*FunctionSystem) ComponentResized ¶
func (s *FunctionSystem) ComponentResized(cflag ecs.Flag)
func (*FunctionSystem) ComponentWillResize ¶
func (s *FunctionSystem) ComponentWillResize(cflag ecs.Flag)
func (*FunctionSystem) Draw ¶
func (s *FunctionSystem) Draw(ctx core.DrawCtx)
func (*FunctionSystem) DrawPriority ¶
func (s *FunctionSystem) DrawPriority(ctx core.DrawCtx)
func (FunctionSystem) Name ¶
func (FunctionSystem) Name() string
func (*FunctionSystem) Priority ¶
func (*FunctionSystem) Priority() int64
func (*FunctionSystem) Setup ¶
func (s *FunctionSystem) Setup(w ecs.BaseWorld)
func (*FunctionSystem) Update ¶
func (s *FunctionSystem) Update(ctx core.UpdateCtx)
func (*FunctionSystem) UpdatePriority ¶
func (s *FunctionSystem) UpdatePriority(ctx core.UpdateCtx)
func (*FunctionSystem) V ¶
func (s *FunctionSystem) V() *viewFunctionSystem
type NewAudioPlayerInput ¶
type TrTweenTuple ¶
type TrTweenType ¶
type TrTweenType int
const ( TrTweenX TrTweenType = 1 TrTweenY TrTweenType = 2 TrTweenRotation TrTweenType = 3 TrTweenScaleXY TrTweenType = 4 TrTweenScaleX TrTweenType = 5 TrTweenScaleY TrTweenType = 6 )
type TrTweening ¶
type TrTweening struct {
// contains filtered or unexported fields
}
func GetTrTweeningComponentData ¶
func GetTrTweeningComponentData(w ecs.BaseWorld, e ecs.Entity) *TrTweening
GetTrTweeningComponentData gets the *TrTweening of Entity e
func NewTrTweening ¶
func NewTrTweening() TrTweening
func (*TrTweening) Play ¶
func (t *TrTweening) Play(name string) bool
func (*TrTweening) RemoveTween ¶
func (t *TrTweening) RemoveTween(name string) bool
func (*TrTweening) SetDoneCallback ¶
func (t *TrTweening) SetDoneCallback(fn func(name string)) *TrTweening
func (*TrTweening) SetTween ¶
func (t *TrTweening) SetTween(name string, ttype TrTweenType, from, to, duration float64, easingfn easing.Function) *TrTweening
type TrTweeningComponent ¶
type TrTweeningComponent struct {
// contains filtered or unexported fields
}
TrTweeningComponent implements ecs.BaseComponent
func GetTrTweeningComponent ¶
func GetTrTweeningComponent(w ecs.BaseWorld) *TrTweeningComponent
GetTrTweeningComponent returns the instance of the component in a World
func (*TrTweeningComponent) Data ¶
func (c *TrTweeningComponent) Data(e ecs.Entity) *TrTweening
func (TrTweeningComponent) Name ¶
func (TrTweeningComponent) Name() string
Name implements ecs.BaseComponent
func (*TrTweeningComponent) Remove ¶
func (c *TrTweeningComponent) Remove(e ecs.Entity)
Remove a TrTweening data from entity e
Warning: DO NOT call remove inside the system entities loop
func (*TrTweeningComponent) Setup ¶
func (c *TrTweeningComponent) Setup(w ecs.BaseWorld, f ecs.Flag, key [4]byte)
Setup is called by ecs.BaseWorld
Do not call this directly
func (TrTweeningComponent) UUID ¶
func (TrTweeningComponent) UUID() string
UUID implements ecs.BaseComponent
func (*TrTweeningComponent) Upsert ¶
func (c *TrTweeningComponent) Upsert(e ecs.Entity, data interface{})
Upsert creates or updates a component data of an entity. Not recommended to be used directly. Use SetTrTweeningComponentData to change component data outside of a system loop.
type TrTweeningSystem ¶
type TrTweeningSystem struct {
// contains filtered or unexported fields
}
TrTweeningSystem implements ecs.BaseSystem
func GetTrTweeningSystem ¶
func GetTrTweeningSystem(w ecs.BaseWorld) *TrTweeningSystem
GetTrTweeningSystem returns the instance of the system in a World
func (*TrTweeningSystem) ComponentAdded ¶
func (s *TrTweeningSystem) ComponentAdded(e ecs.Entity, eflag ecs.Flag)
func (*TrTweeningSystem) ComponentRemoved ¶
func (s *TrTweeningSystem) ComponentRemoved(e ecs.Entity, eflag ecs.Flag)
func (*TrTweeningSystem) ComponentResized ¶
func (s *TrTweeningSystem) ComponentResized(cflag ecs.Flag)
func (*TrTweeningSystem) ComponentWillResize ¶
func (s *TrTweeningSystem) ComponentWillResize(cflag ecs.Flag)
func (*TrTweeningSystem) DrawPriority ¶
func (s *TrTweeningSystem) DrawPriority(ctx core.DrawCtx)
DrawPriority noop
func (*TrTweeningSystem) Enabled ¶
func (s *TrTweeningSystem) Enabled() bool
Enabled checks if enabled
func (TrTweeningSystem) Name ¶
func (TrTweeningSystem) Name() string
func (*TrTweeningSystem) Priority ¶
func (*TrTweeningSystem) Priority() int64
func (*TrTweeningSystem) Setup ¶
func (s *TrTweeningSystem) Setup(w ecs.BaseWorld)
func (*TrTweeningSystem) Update ¶
func (s *TrTweeningSystem) Update(ctx core.UpdateCtx)
Update resolves active tweens
func (*TrTweeningSystem) UpdatePriority ¶
func (s *TrTweeningSystem) UpdatePriority(ctx core.UpdateCtx)
UpdatePriority noop
func (*TrTweeningSystem) V ¶
func (s *TrTweeningSystem) V() *viewTrTweeningSystem
type Transform ¶
type Transform struct {
// contains filtered or unexported fields
}
Transform is a hierarchy based matrix
func GetTransformComponentData ¶
func GetTransformComponentData(w ecs.BaseWorld, e ecs.Entity) *Transform
GetTransformComponentData gets the *Transform of Entity e
func NewTransform ¶
func (*Transform) ParentTransform ¶
type TransformComponent ¶
type TransformComponent struct {
// contains filtered or unexported fields
}
TransformComponent implements ecs.BaseComponent
func GetTransformComponent ¶
func GetTransformComponent(w ecs.BaseWorld) *TransformComponent
GetTransformComponent returns the instance of the component in a World
func (*TransformComponent) Data ¶
func (c *TransformComponent) Data(e ecs.Entity) *Transform
func (TransformComponent) Name ¶
func (TransformComponent) Name() string
Name implements ecs.BaseComponent
func (*TransformComponent) Remove ¶
func (c *TransformComponent) Remove(e ecs.Entity)
Remove a Transform data from entity e
Warning: DO NOT call remove inside the system entities loop
func (*TransformComponent) Setup ¶
func (c *TransformComponent) Setup(w ecs.BaseWorld, f ecs.Flag, key [4]byte)
Setup is called by ecs.BaseWorld
Do not call this directly
func (TransformComponent) UUID ¶
func (TransformComponent) UUID() string
UUID implements ecs.BaseComponent
func (*TransformComponent) Upsert ¶
func (c *TransformComponent) Upsert(e ecs.Entity, data interface{})
Upsert creates or updates a component data of an entity. Not recommended to be used directly. Use SetTransformComponentData to change component data outside of a system loop.
type TransformSystem ¶
type TransformSystem struct {
// contains filtered or unexported fields
}
TransformSystem implements ecs.BaseSystem
func GetTransformSystem ¶
func GetTransformSystem(w ecs.BaseWorld) *TransformSystem
GetTransformSystem returns the instance of the system in a World
func (*TransformSystem) ComponentAdded ¶
func (s *TransformSystem) ComponentAdded(e ecs.Entity, eflag ecs.Flag)
func (*TransformSystem) ComponentRemoved ¶
func (s *TransformSystem) ComponentRemoved(e ecs.Entity, eflag ecs.Flag)
func (*TransformSystem) ComponentResized ¶
func (s *TransformSystem) ComponentResized(cflag ecs.Flag)
func (*TransformSystem) ComponentWillResize ¶
func (s *TransformSystem) ComponentWillResize(cflag ecs.Flag)
func (*TransformSystem) DrawPriority ¶
func (s *TransformSystem) DrawPriority(ctx core.DrawCtx)
DrawPriority noop
func (*TransformSystem) Enabled ¶
func (s *TransformSystem) Enabled() bool
Enabled checks if enabled
func (*TransformSystem) GlobalToLocal ¶
func (s *TransformSystem) GlobalToLocal(gx, gy float64, e ecs.Entity) (x, y float64, ok bool)
func (*TransformSystem) GlobalToLocalTr ¶
func (s *TransformSystem) GlobalToLocalTr(gx, gy float64, tr *Transform) (x, y float64)
func (*TransformSystem) LocalToGlobal ¶
func (s *TransformSystem) LocalToGlobal(lx, ly float64, e ecs.Entity) (x, y float64, ok bool)
func (*TransformSystem) LocalToGlobalTr ¶
func (s *TransformSystem) LocalToGlobalTr(lx, ly float64, tr *Transform) (x, y float64)
func (TransformSystem) Name ¶
func (TransformSystem) Name() string
func (*TransformSystem) Priority ¶
func (*TransformSystem) Priority() int64
func (*TransformSystem) Setup ¶
func (s *TransformSystem) Setup(w ecs.BaseWorld)
func (*TransformSystem) Update ¶
func (s *TransformSystem) Update(ctx core.UpdateCtx)
Update calculates all transform matrices
func (*TransformSystem) UpdatePriority ¶
func (s *TransformSystem) UpdatePriority(ctx core.UpdateCtx)
UpdatePriority noop
func (*TransformSystem) V ¶
func (s *TransformSystem) V() *viewTransformSystem
type VICameraSystem ¶
type VIFollowTransformSystem ¶
type VIFollowTransformSystem struct { Entity ecs.Entity Transform *Transform FollowTransform *FollowTransform }
type VIFunctionSystem ¶
type VIFunctionSystem struct { Entity ecs.Entity Function *Function }
type VITrTweeningSystem ¶
type VITrTweeningSystem struct { Entity ecs.Entity Transform *Transform TrTweening *TrTweening }
type VITransformSystem ¶
type VITransformSystem struct { Entity ecs.Entity Transform *Transform }
type WatchAudioPlayer ¶
type WatchAudioPlayer interface { Entity() ecs.Entity Data() *AudioPlayer }
WatchAudioPlayer is a helper struct to access a valid pointer of AudioPlayer
func WatchAudioPlayerComponentData ¶
func WatchAudioPlayerComponentData(w ecs.BaseWorld, e ecs.Entity) WatchAudioPlayer
WatchAudioPlayerComponentData gets a pointer getter of an entity's AudioPlayer.
The pointer must not be stored because it may become invalid overtime.
type WatchCamera ¶
type WatchCamera interface { Entity() ecs.Entity Data() *Camera }
WatchCamera is a helper struct to access a valid pointer of Camera
func WatchCameraComponentData ¶
func WatchCameraComponentData(w ecs.BaseWorld, e ecs.Entity) WatchCamera
WatchCameraComponentData gets a pointer getter of an entity's Camera.
The pointer must not be stored because it may become invalid overtime.
type WatchFollowTransform ¶
type WatchFollowTransform interface { Entity() ecs.Entity Data() *FollowTransform }
WatchFollowTransform is a helper struct to access a valid pointer of FollowTransform
func WatchFollowTransformComponentData ¶
func WatchFollowTransformComponentData(w ecs.BaseWorld, e ecs.Entity) WatchFollowTransform
WatchFollowTransformComponentData gets a pointer getter of an entity's FollowTransform.
The pointer must not be stored because it may become invalid overtime.
type WatchFunction ¶
type WatchFunction interface { Entity() ecs.Entity Data() *Function }
WatchFunction is a helper struct to access a valid pointer of Function
func WatchFunctionComponentData ¶
func WatchFunctionComponentData(w ecs.BaseWorld, e ecs.Entity) WatchFunction
WatchFunctionComponentData gets a pointer getter of an entity's Function.
The pointer must not be stored because it may become invalid overtime.
type WatchTrTweening ¶
type WatchTrTweening interface { Entity() ecs.Entity Data() *TrTweening }
WatchTrTweening is a helper struct to access a valid pointer of TrTweening
func WatchTrTweeningComponentData ¶
func WatchTrTweeningComponentData(w ecs.BaseWorld, e ecs.Entity) WatchTrTweening
WatchTrTweeningComponentData gets a pointer getter of an entity's TrTweening.
The pointer must not be stored because it may become invalid overtime.
type WatchTransform ¶
type WatchTransform interface { Entity() ecs.Entity Data() *Transform }
WatchTransform is a helper struct to access a valid pointer of Transform
func WatchTransformComponentData ¶
func WatchTransformComponentData(w ecs.BaseWorld, e ecs.Entity) WatchTransform
WatchTransformComponentData gets a pointer getter of an entity's Transform.
The pointer must not be stored because it may become invalid overtime.
Source Files
¶
- audioplayer.go
- audioplayer_component.go
- camera.go
- camera_component.go
- camera_transformsystem.go
- followtransform.go
- followtransform_component.go
- followtransform_transformsystem.go
- function.go
- function_component.go
- function_system.go
- transform.go
- transform_component.go
- transform_system.go
- transformtween.go
- trtweening_component.go
- trtweening_system.go