Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionButton ¶
type ActionButton struct { World *engine.World Entity *engine.Entity Target mixins.TargetSelection Invert bool SendPress bool SendRelease bool SendHold bool State bool }
ActionButton sends a signal along when action button is pressed/released.
func (*ActionButton) Despawn ¶
func (g *ActionButton) Despawn()
func (*ActionButton) Touch ¶
func (g *ActionButton) Touch(other *engine.Entity)
func (*ActionButton) Update ¶
func (g *ActionButton) Update()
type Animation ¶
type Animation struct { SpriteBase Entity *engine.Entity Anim animation.State }
Animation is a simple entity type that renders a static sprite. It can be optionally solid and/or opaque.
type ExitButton ¶
type ExitButton struct {
SwitchableSprite
}
ExitButton shows as Esc key or Start button depending on input device.
type MovableSprite ¶
MovableSprite is a simple entity type that renders a static sprite. It can be optionally solid and/or opaque. Can be toggled from outside and will move back/forth.
func (*MovableSprite) Update ¶
func (s *MovableSprite) Update()
type MovingAnimation ¶
type MovingAnimation struct { Animation mixins.Moving mixins.Fadable mixins.NonSolidTouchable World *engine.World Entity *engine.Entity Alpha float64 FadeOnTouch bool RespawnOnTouch bool StopOnTouch bool FramesToMove int FramesToFade int }
MovingAnimation is a simple entity type that moves in a specified direction. Optionally despawns when hitting solid.
func (*MovingAnimation) Touch ¶
func (s *MovingAnimation) Touch(other *engine.Entity)
func (*MovingAnimation) Update ¶
func (s *MovingAnimation) Update()
type Sprite ¶
type Sprite struct {
SpriteBase
}
Sprite is a simple entity type that renders a static sprite. It can be optionally solid and/or opaque.
type SpriteBase ¶
type SpriteBase struct {
ZDefault int
}
SpriteBase is a base class for sprites. To instantiate it, just set the entity image, then forward to this.
func (*SpriteBase) Despawn ¶
func (s *SpriteBase) Despawn()
func (*SpriteBase) Touch ¶
func (s *SpriteBase) Touch(other *engine.Entity)
func (*SpriteBase) Update ¶
func (s *SpriteBase) Update()
type SwitchableAnimation ¶
SwitchableAnimation is a simple entity type that renders an animation. Can be toggled from outside.
func (*SwitchableAnimation) Update ¶
func (s *SwitchableAnimation) Update()
type SwitchableSprite ¶
SwitchableSprite is a simple entity type that renders a static sprite. It can be optionally solid and/or opaque. Can be toggled from outside.
func (*SwitchableSprite) Update ¶
func (s *SwitchableSprite) Update()
type SwitchableText ¶
SwitchableText is a simple entity type that renders text. Can be toggled from outside.
func (*SwitchableText) SetState ¶
func (s *SwitchableText) SetState(originator, predecessor *engine.Entity, state bool)
func (*SwitchableText) Update ¶
func (s *SwitchableText) Update()