Documentation
¶
Overview ¶
Package audio are the components for audio and music
Index ¶
Constants ¶
View Source
const ( StateStopped = MusicPlayingState(iota) // StateStopped is the audio.MusicPlayingState for a stopped music StatePlaying // StatePlaying is the audio.MusicPlayingState for a playing music StatePaused // StatePaused is the audio.MusicPlayingState for a paused music )
Variables ¶
View Source
var Get = gets{ Music: func(e *goecs.Entity) Music { return e.Get(TYPE.Music).(Music) }, MusicState: func(e *goecs.Entity) MusicState { return e.Get(TYPE.MusicState).(MusicState) }, }
Get a audio component
View Source
var TYPE = types{ Music: reflect.TypeOf(Music{}), MusicState: reflect.TypeOf(MusicState{}), }
TYPE hold the reflect.Type for our audio components
Functions ¶
This section is empty.
Types ¶
type Music ¶
type Music struct {
Name string // Name is the filename for our music stream
}
Music represent an music stream
type MusicPlayingState ¶
type MusicPlayingState int32
MusicPlayingState represent the playing state for a music stream
type MusicState ¶
type MusicState struct { PlayingState MusicPlayingState // PlayingState is the current audio.MusicPlayingState for our music Name string // Name is the current music Name }
MusicState represent the state for a music
Click to show internal directories.
Click to hide internal directories.