Documentation ¶
Index ¶
- func SetOrbitalMovementComponentData(w ecs.BaseWorld, e ecs.Entity, data OrbitalMovement)
- type OrbitalMovement
- type OrbitalMovementComponent
- func (c *OrbitalMovementComponent) Data(e ecs.Entity) *OrbitalMovement
- func (c *OrbitalMovementComponent) Flag() ecs.Flag
- func (OrbitalMovementComponent) Name() string
- func (c *OrbitalMovementComponent) Remove(e ecs.Entity)
- func (c *OrbitalMovementComponent) Setup(w ecs.BaseWorld, f ecs.Flag, key [4]byte)
- func (OrbitalMovementComponent) UUID() string
- func (c *OrbitalMovementComponent) Upsert(e ecs.Entity, data interface{})
- type OrbitalMovementSystem
- func (s *OrbitalMovementSystem) AddScale()
- func (s *OrbitalMovementSystem) ComponentAdded(e ecs.Entity, eflag ecs.Flag)
- func (s *OrbitalMovementSystem) ComponentRemoved(e ecs.Entity, eflag ecs.Flag)
- func (s *OrbitalMovementSystem) ComponentResized(cflag ecs.Flag)
- func (s *OrbitalMovementSystem) ComponentWillResize(cflag ecs.Flag)
- func (s *OrbitalMovementSystem) Disable()
- func (s *OrbitalMovementSystem) Draw(ctx core.DrawCtx)
- func (s *OrbitalMovementSystem) DrawPriority(ctx core.DrawCtx)
- func (s *OrbitalMovementSystem) Enable()
- func (s *OrbitalMovementSystem) Enabled() bool
- func (OrbitalMovementSystem) Name() string
- func (s *OrbitalMovementSystem) Paused() bool
- func (*OrbitalMovementSystem) Priority() int64
- func (s *OrbitalMovementSystem) PushFrame()
- func (s *OrbitalMovementSystem) SetBgs(bgs []*ebiten.Image)
- func (s *OrbitalMovementSystem) SetFgs(fgs []*ebiten.Image)
- func (s *OrbitalMovementSystem) Setup(w ecs.BaseWorld)
- func (s *OrbitalMovementSystem) SubScale()
- func (s *OrbitalMovementSystem) TogglePause()
- func (OrbitalMovementSystem) UUID() string
- func (s *OrbitalMovementSystem) Update(ctx core.UpdateCtx)
- func (s *OrbitalMovementSystem) UpdatePriority(ctx core.UpdateCtx)
- func (s *OrbitalMovementSystem) V() *viewOrbitalMovementSystem
- type VIOrbitalMovementSystem
- type WatchOrbitalMovement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetOrbitalMovementComponentData ¶
func SetOrbitalMovementComponentData(w ecs.BaseWorld, e ecs.Entity, data OrbitalMovement)
SetOrbitalMovementComponentData updates/adds a OrbitalMovement to Entity e
Types ¶
type OrbitalMovement ¶
type OrbitalMovement struct { Speed float64 Dx float64 Dy float64 Ox float64 Oy float64 R float64 AngleR float64 ChildSprite ecs.Entity HueShift bool }
func GetOrbitalMovementComponentData ¶
func GetOrbitalMovementComponentData(w ecs.BaseWorld, e ecs.Entity) *OrbitalMovement
GetOrbitalMovementComponentData gets the *OrbitalMovement of Entity e
type OrbitalMovementComponent ¶
type OrbitalMovementComponent struct {
// contains filtered or unexported fields
}
OrbitalMovementComponent implements ecs.BaseComponent
func GetOrbitalMovementComponent ¶
func GetOrbitalMovementComponent(w ecs.BaseWorld) *OrbitalMovementComponent
GetOrbitalMovementComponent returns the instance of the component in a World
func (*OrbitalMovementComponent) Data ¶
func (c *OrbitalMovementComponent) Data(e ecs.Entity) *OrbitalMovement
func (*OrbitalMovementComponent) Flag ¶
func (c *OrbitalMovementComponent) Flag() ecs.Flag
Flag returns the
func (OrbitalMovementComponent) Name ¶
func (OrbitalMovementComponent) Name() string
Name implements ecs.BaseComponent
func (*OrbitalMovementComponent) Remove ¶
func (c *OrbitalMovementComponent) Remove(e ecs.Entity)
Remove a OrbitalMovement data from entity e
Warning: DO NOT call remove inside the system entities loop
func (*OrbitalMovementComponent) Setup ¶
func (c *OrbitalMovementComponent) Setup(w ecs.BaseWorld, f ecs.Flag, key [4]byte)
Setup is called by ecs.BaseWorld
Do not call this directly
func (OrbitalMovementComponent) UUID ¶
func (OrbitalMovementComponent) UUID() string
UUID implements ecs.BaseComponent
func (*OrbitalMovementComponent) Upsert ¶
func (c *OrbitalMovementComponent) Upsert(e ecs.Entity, data interface{})
Upsert creates or updates a component data of an entity. Not recommended to be used directly. Use SetOrbitalMovementComponentData to change component data outside of a system loop.
type OrbitalMovementSystem ¶
type OrbitalMovementSystem struct {
// contains filtered or unexported fields
}
OrbitalMovementSystem implements ecs.BaseSystem
func GetOrbitalMovementSystem ¶
func GetOrbitalMovementSystem(w ecs.BaseWorld) *OrbitalMovementSystem
GetOrbitalMovementSystem returns the instance of the system in a World
func (*OrbitalMovementSystem) AddScale ¶
func (s *OrbitalMovementSystem) AddScale()
func (*OrbitalMovementSystem) ComponentAdded ¶
func (s *OrbitalMovementSystem) ComponentAdded(e ecs.Entity, eflag ecs.Flag)
func (*OrbitalMovementSystem) ComponentRemoved ¶
func (s *OrbitalMovementSystem) ComponentRemoved(e ecs.Entity, eflag ecs.Flag)
func (*OrbitalMovementSystem) ComponentResized ¶
func (s *OrbitalMovementSystem) ComponentResized(cflag ecs.Flag)
func (*OrbitalMovementSystem) ComponentWillResize ¶
func (s *OrbitalMovementSystem) ComponentWillResize(cflag ecs.Flag)
func (*OrbitalMovementSystem) Draw ¶
func (s *OrbitalMovementSystem) Draw(ctx core.DrawCtx)
Draw noop
func (*OrbitalMovementSystem) DrawPriority ¶
func (s *OrbitalMovementSystem) DrawPriority(ctx core.DrawCtx)
DrawPriority noop
func (*OrbitalMovementSystem) Enabled ¶
func (s *OrbitalMovementSystem) Enabled() bool
Enabled checks if enabled
func (OrbitalMovementSystem) Name ¶
func (OrbitalMovementSystem) Name() string
func (*OrbitalMovementSystem) Paused ¶
func (s *OrbitalMovementSystem) Paused() bool
func (*OrbitalMovementSystem) Priority ¶
func (*OrbitalMovementSystem) Priority() int64
func (*OrbitalMovementSystem) PushFrame ¶
func (s *OrbitalMovementSystem) PushFrame()
func (*OrbitalMovementSystem) SetBgs ¶
func (s *OrbitalMovementSystem) SetBgs(bgs []*ebiten.Image)
func (*OrbitalMovementSystem) SetFgs ¶
func (s *OrbitalMovementSystem) SetFgs(fgs []*ebiten.Image)
func (*OrbitalMovementSystem) Setup ¶
func (s *OrbitalMovementSystem) Setup(w ecs.BaseWorld)
func (*OrbitalMovementSystem) SubScale ¶
func (s *OrbitalMovementSystem) SubScale()
func (*OrbitalMovementSystem) TogglePause ¶
func (s *OrbitalMovementSystem) TogglePause()
func (OrbitalMovementSystem) UUID ¶
func (OrbitalMovementSystem) UUID() string
UUID implements ecs.BaseSystem
func (*OrbitalMovementSystem) Update ¶
func (s *OrbitalMovementSystem) Update(ctx core.UpdateCtx)
Update positions
func (*OrbitalMovementSystem) UpdatePriority ¶
func (s *OrbitalMovementSystem) UpdatePriority(ctx core.UpdateCtx)
UpdatePriority noop
func (*OrbitalMovementSystem) V ¶
func (s *OrbitalMovementSystem) V() *viewOrbitalMovementSystem
type VIOrbitalMovementSystem ¶
type VIOrbitalMovementSystem struct { Entity ecs.Entity OrbitalMovement *OrbitalMovement Sprite *graphics.Sprite DrawLayer *graphics.DrawLayer Transform *components.Transform }
type WatchOrbitalMovement ¶
type WatchOrbitalMovement interface { Entity() ecs.Entity Data() *OrbitalMovement }
WatchOrbitalMovement is a helper struct to access a valid pointer of OrbitalMovement
func WatchOrbitalMovementComponentData ¶
func WatchOrbitalMovementComponentData(w ecs.BaseWorld, e ecs.Entity) WatchOrbitalMovement
WatchOrbitalMovementComponentData gets a pointer getter of an entity's OrbitalMovement.
The pointer must not be stored because it may become invalid overtime.