class SongEventDataRaw
package funkin.data.song
implements ICloneable<SongEventDataRaw>
import funkin.data.song.SongData
Available on all platforms
The raw underlying data for a song event.
This value gets wrapped in an abstract to allow operators to be overloaded.
Constructor
Variables
activated:Bool = false
Whether this event has been activated. This is only used internally by the game during gameplay. It should not be serialized.
eventKind:String
The kind of the event.
Examples include "FocusCamera" and "PlayAnimation"
Custom events can be added by scripts with the ScriptedSongEvent class.
optionalvalue:Dynamic = null
The data for the event. This can allow the event to include information used for custom behavior. Data type depends on the event kind. It can be anything that's JSON serializable.
Methods
buildTooltip():String
Build the tooltip string for this particular instance of the song event.
Returns:
A tooltip string, containing readable values for the event's data.
clone():SongEventDataRaw
Clone this event data, creating an independent instance with identical data.
Returns:
The newly created event data.
getArray(key:String):Array<Dynamic>
Retrieve a field from this event's data, as an Array<Dynamic> value.
Parameters:
key | The name of the field to retrieve. |
|---|
Returns:
The field value, or null if not provided.
getBool(key:String):Null<Bool>
Retrieve a field from this event's data, as a Bool value.
Parameters:
key | The name of the field to retrieve. |
|---|
Returns:
The field value, or null if not provided.
getBoolArray(key:String):Array<Bool>
Retrieve a field from this event's data, as an Array<Bool> value.
Parameters:
key | The name of the field to retrieve. |
|---|
Returns:
The field value, or null if not provided.
getDynamic(key:String):Null<Dynamic>
Retrieve a field from this event's data, as a Dynamic value.
Parameters:
key | The name of the field to retrieve. |
|---|
Returns:
The field value, or null if not provided.
getFloat(key:String):Null<Float>
Retrieve a field from this event's data, as a Float value.
Parameters:
key | The name of the field to retrieve. |
|---|
Returns:
The field value, or null if not provided.
getFloatArray(key:String):Array<Float>
Retrieve a field from this event's data, as an Array<Float> value.
Parameters:
key | The name of the field to retrieve. |
|---|
Returns:
The field value, or null if not provided.
getHandler():Null<SongEvent>
Retrieve the SongEvent handler class for this event.
Returns:
The handler class, or null if not found.
getInt(key:String):Null<Int>
Retrieve a field from this event's data, as an Int value.
Parameters:
key | The name of the field to retrieve. |
|---|
Returns:
The field value, or null if not provided.
getSchema():Null<SongEventSchema>
Retrieve the SongEventSchema for this event.
Returns:
The schema, or null if not found.
getStepTime(force:Bool = false):Float
Get the position of the event in the song, in steps.
This value is cached for performance. Use force to require a recalculation.
Parameters:
force | Force the value to be recalculated. |
|---|
Returns:
The position of the event in the song, in steps.
getString(key:String):String
Retrieve a field from this event's data, as a String value.
Parameters:
key | The name of the field to retrieve. |
|---|
Returns:
The field value, or null if not provided.
getStringArray(key:String):Array<Float>
Retrieve a field from this event's data, as an Array<String> value.
Parameters:
key | The name of the field to retrieve. |
|---|
Returns:
The field value, or null if not provided.