Documentation ¶
Index ¶
- type DelayTarget
- type LogicalGate
- func (g *LogicalGate) Despawn()
- func (g *LogicalGate) MaybeSendEvent(sendEveryFrame bool)
- func (g *LogicalGate) SetState(originator, predecessor *engine.Entity, state bool)
- func (g *LogicalGate) Spawn(w *engine.World, sp *level.Spawnable, e *engine.Entity) error
- func (g *LogicalGate) Touch(other *engine.Entity)
- func (g *LogicalGate) Update()
- type PrintToConsoleTarget
- func (p *PrintToConsoleTarget) Despawn()
- func (p *PrintToConsoleTarget) SetState(originator, predecessor *engine.Entity, state bool)
- func (p *PrintToConsoleTarget) Spawn(w *engine.World, sp *level.Spawnable, e *engine.Entity) error
- func (p *PrintToConsoleTarget) Touch(other *engine.Entity)
- func (p *PrintToConsoleTarget) Update()
- type SequenceCollector
- func (s *SequenceCollector) Append(originator *engine.Entity, str string)
- func (s *SequenceCollector) Despawn()
- func (s *SequenceCollector) Spawn(w *engine.World, sp *level.Spawnable, e *engine.Entity) error
- func (s *SequenceCollector) Touch(other *engine.Entity)
- func (s *SequenceCollector) Update()
- type SequenceTarget
- func (s *SequenceTarget) Despawn()
- func (s *SequenceTarget) SetState(originator, predecessor *engine.Entity, state bool)
- func (s *SequenceTarget) Spawn(w *engine.World, sp *level.Spawnable, e *engine.Entity) error
- func (s *SequenceTarget) Touch(other *engine.Entity)
- func (s *SequenceTarget) Update()
- type SetStateTarget
- func (s *SetStateTarget) Despawn()
- func (s *SetStateTarget) SetState(originator, predecessor *engine.Entity, state bool)
- func (s *SetStateTarget) Spawn(w *engine.World, sp *level.Spawnable, e *engine.Entity) error
- func (s *SetStateTarget) Touch(other *engine.Entity)
- func (s *SetStateTarget) Update()
- type SoundTarget
- type SwitchMusicTarget
- func (s *SwitchMusicTarget) Despawn()
- func (s *SwitchMusicTarget) SetState(originator, predecessor *engine.Entity, state bool)
- func (s *SwitchMusicTarget) Spawn(w *engine.World, sp *level.Spawnable, e *engine.Entity) error
- func (s *SwitchMusicTarget) Touch(other *engine.Entity)
- func (s *SwitchMusicTarget) Update()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DelayTarget ¶
type DelayTarget struct { World *engine.World Entity *engine.Entity DelayFrames int Events []delayEvent Target mixins.TargetSelection Originator *engine.Entity }
DelayTarget delays all state changes by the given amount.
func (*DelayTarget) Despawn ¶
func (d *DelayTarget) Despawn()
func (*DelayTarget) SetState ¶
func (d *DelayTarget) SetState(originator, predecessor *engine.Entity, state bool)
func (*DelayTarget) Touch ¶
func (d *DelayTarget) Touch(other *engine.Entity)
func (*DelayTarget) Update ¶
func (d *DelayTarget) Update()
type LogicalGate ¶
type LogicalGate struct { World *engine.World Entity *engine.Entity Target mixins.TargetSelection Invert bool CountRequired int IgnoreOff bool IncomingState map[engine.EntityIncarnation]struct{} State bool Originator *engine.Entity }
LogicalGate sends a signal along if ANY incoming target triggers.
func (*LogicalGate) Despawn ¶
func (g *LogicalGate) Despawn()
func (*LogicalGate) MaybeSendEvent ¶
func (g *LogicalGate) MaybeSendEvent(sendEveryFrame bool)
func (*LogicalGate) SetState ¶
func (g *LogicalGate) SetState(originator, predecessor *engine.Entity, state bool)
func (*LogicalGate) Touch ¶
func (g *LogicalGate) Touch(other *engine.Entity)
func (*LogicalGate) Update ¶
func (g *LogicalGate) Update()
type PrintToConsoleTarget ¶
type PrintToConsoleTarget struct { World *engine.World Text string PrintFrames int PrevText string }
PrintToConsoleTarget prints the given text to console when activated. Setting state to ON saves the current text, setting state to OFF dumps it.
func (*PrintToConsoleTarget) Despawn ¶
func (p *PrintToConsoleTarget) Despawn()
func (*PrintToConsoleTarget) SetState ¶
func (p *PrintToConsoleTarget) SetState(originator, predecessor *engine.Entity, state bool)
func (*PrintToConsoleTarget) Touch ¶
func (p *PrintToConsoleTarget) Touch(other *engine.Entity)
func (*PrintToConsoleTarget) Update ¶
func (p *PrintToConsoleTarget) Update()
type SequenceCollector ¶
type SequenceCollector struct { World *engine.World Entity *engine.Entity Sequence string Target mixins.TargetSelection State bool Current string }
SequenceCollector waits for receiving strings, and sends a trigger event when the correct string was received.
func (*SequenceCollector) Append ¶
func (s *SequenceCollector) Append(originator *engine.Entity, str string)
func (*SequenceCollector) Despawn ¶
func (s *SequenceCollector) Despawn()
func (*SequenceCollector) Touch ¶
func (s *SequenceCollector) Touch(other *engine.Entity)
func (*SequenceCollector) Update ¶
func (s *SequenceCollector) Update()
type SequenceTarget ¶
type SequenceTarget struct { World *engine.World Entity *engine.Entity Target string Sequence string State bool }
SequenceTarget sends a given string to a SequenceCollector when triggered.
func (*SequenceTarget) Despawn ¶
func (s *SequenceTarget) Despawn()
func (*SequenceTarget) SetState ¶
func (s *SequenceTarget) SetState(originator, predecessor *engine.Entity, state bool)
func (*SequenceTarget) Touch ¶
func (s *SequenceTarget) Touch(other *engine.Entity)
func (*SequenceTarget) Update ¶
func (s *SequenceTarget) Update()
type SetStateTarget ¶
type SetStateTarget struct { World *engine.World Entity *engine.Entity Target mixins.TargetSelection State bool }
SetStateTarget overrides the boolean state of a warpzone or entity.
func (*SetStateTarget) Despawn ¶
func (s *SetStateTarget) Despawn()
func (*SetStateTarget) SetState ¶
func (s *SetStateTarget) SetState(originator, predecessor *engine.Entity, state bool)
func (*SetStateTarget) Touch ¶
func (s *SetStateTarget) Touch(other *engine.Entity)
func (*SetStateTarget) Update ¶
func (s *SetStateTarget) Update()
type SoundTarget ¶
type SoundTarget struct { World *engine.World Entity *engine.Entity Sound *sound.Sound Player *audiowrap.Player Target mixins.TargetSelection StopWhenOff bool State bool Originator *engine.Entity Active bool Frames int Frame int }
SoundTarget just changes the music track to the given one.
func (*SoundTarget) Despawn ¶
func (s *SoundTarget) Despawn()
func (*SoundTarget) SetState ¶
func (s *SoundTarget) SetState(originator, predecessor *engine.Entity, state bool)
func (*SoundTarget) Touch ¶
func (s *SoundTarget) Touch(other *engine.Entity)
func (*SoundTarget) Update ¶
func (s *SoundTarget) Update()
type SwitchMusicTarget ¶
type SwitchMusicTarget struct {
Music string
}
SwitchMusicTarget just changes the music track to the given one.
func (*SwitchMusicTarget) Despawn ¶
func (s *SwitchMusicTarget) Despawn()
func (*SwitchMusicTarget) SetState ¶
func (s *SwitchMusicTarget) SetState(originator, predecessor *engine.Entity, state bool)
func (*SwitchMusicTarget) Touch ¶
func (s *SwitchMusicTarget) Touch(other *engine.Entity)
func (*SwitchMusicTarget) Update ¶
func (s *SwitchMusicTarget) Update()