Documentation
¶
Index ¶
Constants ¶
const SpeedMessageType string = "SpeedMessage"
SpeedMessageType is the unique type identifier for SpeedMessage.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SpeedComponent ¶
SpeedComponent stores speed for an entity.
func (*SpeedComponent) GetSpeedComponent ¶
func (s *SpeedComponent) GetSpeedComponent() *SpeedComponent
GetSpeedComponent provides type safe access to SpeedComponent.
type SpeedFace ¶
type SpeedFace interface {
GetSpeedComponent() *SpeedComponent
}
SpeedFace enforces type safe access to the underlying SpeedComponent.
type SpeedMessage ¶
type SpeedMessage struct {
*ecs.BasicEntity
engo.Point
}
SpeedMessage updates the speed of an object within the system.
func (SpeedMessage) Type ¶
func (SpeedMessage) Type() string
Type returns a unique string representation for SpeedMessage.
type SpeedSystem ¶
SpeedSystem handles speed and position updates for entities.
func (*SpeedSystem) Add ¶
func (ss *SpeedSystem) Add( basic *ecs.BasicEntity, space *common.SpaceComponent, speed *SpeedComponent, )
Add an entity to the SpeedSystem.
func (*SpeedSystem) AddByInterface ¶
func (ss *SpeedSystem) AddByInterface(i ecs.Identifier)
AddByInterface adds entities to the system via Speedable interface.
func (*SpeedSystem) New ¶
func (ss *SpeedSystem) New(*ecs.World)
New initialises SpeedSystem when it's added to the world.
func (*SpeedSystem) Remove ¶
func (ss *SpeedSystem) Remove(b ecs.BasicEntity)
Remove an entity from the SpeedSystem.
func (*SpeedSystem) Update ¶
func (ss *SpeedSystem) Update(dt float32)
Update the SpeedSystem this frame.