aego/data
A data type registered by a module or a project appears here as a struct. A script field AssetRef<T> holds a record, TableRef<T> a table; fields are read through the reference. Module data types carry the module's name, such as AudioEvent, so they do not collide with a game's own types. See Data assets.
Example
package demo
import (
"aego/audio"
"aego/log"
)
script Jumper {
@export var Jump AssetRef<AudioEvent>
func Ready() {
if Jump == nil {
log.Info("no jump event set")
return
}
log.Info("jump volume " + string(Jump.Volume))
audio.PlayEvent(Jump)
}
}
Functions
| AudioEvent | | AudioEvent is an audio event asset. |
- AudioEvent value type AudioEvent is an audio event asset.