MCPcopy
hub / github.com/EngoEngine/engo / AddByInterface

Method AddByInterface

common/audio.go:141–144  ·  view source on GitHub ↗

AddByInterface Allows an Entity to be added directly using the Audioable interface, which every entity containing the BasicEntity and AnimationComponent anonymously, automatically satisfies.

(i ecs.Identifier)

Source from the content-addressed store, hash-verified

139// which every entity containing the BasicEntity and AnimationComponent anonymously,
140// automatically satisfies.
141func (a *AudioSystem) AddByInterface(i ecs.Identifier) {
142 o, _ := i.(Audioable)
143 a.Add(o.GetBasicEntity(), o.GetAudioComponent())
144}
145
146// Remove removes an entity from the AudioSystem
147func (a *AudioSystem) Remove(basic ecs.BasicEntity) {

Callers

nothing calls this directly

Calls 3

AddMethod · 0.95
GetBasicEntityMethod · 0.80
GetAudioComponentMethod · 0.65

Tested by

no test coverage detected