Documentation
¶
Overview ¶
Package events contain the events for our engine
Index ¶
- type ChangeGameStage
- type ChangeMasterVolumeEvent
- type ChangeMusicVolumeEvent
- type DelaySignal
- type GameCloseEvent
- type KeyDownEvent
- type KeyUpEvent
- type MouseDownEvent
- type MouseMoveEvent
- type MouseUpEvent
- type MusicStateChangeEvent
- type PauseMusicEvent
- type PlayMusicEvent
- type PlaySoundEvent
- type ResumeMusicEvent
- type StopMusicEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeGameStage ¶
type ChangeGameStage struct { // Stage is the name of the stage to change to, it must be created with engine.AddGameStage Stage string }
ChangeGameStage is an event that indicates that change game stage, all entities, systems, sprites sheets and textures will be removed. If the Stage does not exist the game.Run method will return an error. Stages must be created with engine.AddGameStage
type ChangeMasterVolumeEvent ¶ added in v0.1.9
type ChangeMasterVolumeEvent struct {
Volume float32 // Volume to be set
}
ChangeMasterVolumeEvent to a given Volume
type ChangeMusicVolumeEvent ¶ added in v0.1.9
ChangeMusicVolumeEvent is an event to change the volume of a music stream
type DelaySignal ¶ added in v0.1.5
type DelaySignal struct { Signal interface{} // Signal that will be emitted after the Time Time float32 // Time to this Signal to be emitted, in seconds }
DelaySignal is a signal that will happen after a time
type GameCloseEvent ¶
type GameCloseEvent struct{}
GameCloseEvent is an event that indicates that game need to close
type KeyDownEvent ¶ added in v0.1.6
KeyDownEvent this event triggers when a key is down
type KeyUpEvent ¶ added in v0.1.6
KeyUpEvent this event triggers when a key is up
type MouseDownEvent ¶ added in v0.1.6
type MouseDownEvent struct { // Point is the geometry.Point where the mouse is when pressed Point geometry.Point // MouseButton is the device.MouseButton been pressed MouseButton device.MouseButton }
MouseDownEvent is an event that indicates that the mouse is pressed
type MouseMoveEvent ¶
MouseMoveEvent is an event that indicates that the mouse is moving
type MouseUpEvent ¶
type MouseUpEvent struct { // Point is the geometry.Point where the mouse is when released Point geometry.Point // MouseButton is the device.MouseButton been released MouseButton device.MouseButton }
MouseUpEvent is an event that indicates that the mouse is release
type MusicStateChangeEvent ¶
type MusicStateChangeEvent struct { Name string // Name of the music Old audio.MusicPlayingState // Old is the previous audio.MusicPlayingState New audio.MusicPlayingState // New is the current audio.MusicPlayingState }
MusicStateChangeEvent is a event trigger when a music state change
type PauseMusicEvent ¶
type PauseMusicEvent struct {
Name string
}
PauseMusicEvent is an event to pause a music stream
type PlayMusicEvent ¶
PlayMusicEvent is an event to play a music stream
type PlaySoundEvent ¶
PlaySoundEvent is an event to play a sound wave
type ResumeMusicEvent ¶
type ResumeMusicEvent struct {
Name string
}
ResumeMusicEvent is an event to resume a music stream
type StopMusicEvent ¶
type StopMusicEvent struct {
Name string
}
StopMusicEvent is an event to play a music stream