target

package
v1.5.129 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CenterPrintTarget added in v1.5.6

type CenterPrintTarget struct {
	World *engine.World

	Text     string
	Font     *font.Face
	Imp      centerprint.Importance
	Pos      centerprint.InitialPosition
	BGColor  color.Color
	FGColor  color.Color
	FadeTime time.Duration
	Sound    *sound.Sound

	Centerprint *centerprint.Centerprint
}

CenterPrintTarget just displays a text to the screen.

func (*CenterPrintTarget) Despawn added in v1.5.6

func (t *CenterPrintTarget) Despawn()

func (*CenterPrintTarget) Precache added in v1.5.6

func (t *CenterPrintTarget) Precache(sp *level.Spawnable) error

func (*CenterPrintTarget) SetState added in v1.5.6

func (t *CenterPrintTarget) SetState(originator, predecessor *engine.Entity, state bool)

func (*CenterPrintTarget) Spawn added in v1.5.6

func (*CenterPrintTarget) Touch added in v1.5.6

func (t *CenterPrintTarget) Touch(other *engine.Entity)

func (*CenterPrintTarget) Update added in v1.5.6

func (t *CenterPrintTarget) Update()

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) Spawn

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) Spawn

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) Spawn

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 *sequence.Sequence
	Target   mixins.TargetSelection
	State    bool

	Matched bool
}

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, seq []rune)

func (*SequenceCollector) Despawn

func (s *SequenceCollector) Despawn()

func (*SequenceCollector) Spawn

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 []rune

	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) Spawn

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) Spawn

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
	Visual      visual

	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) Spawn

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) Spawn

func (*SwitchMusicTarget) Touch

func (s *SwitchMusicTarget) Touch(other *engine.Entity)

func (*SwitchMusicTarget) Update

func (s *SwitchMusicTarget) Update()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL