Available on all targets
new(backendItem:AudioResource)
backendItem:AudioResource
asset:SoundAsset
@:value(0)group:Int = 0
@:value(0.5)volume:Float = 0.5
Default volume when playing this sound.
@:value(0)pan:Float = 0
Default pan when playing this sound.
@:value(1)pitch:Float = 1
Default pitch when playing this sound.
read onlyduration:Float
Sound duration.
@:value({ loop : false, position : 0 })play(position:Float = 0, loop:Bool = false, ?volume:Float, ?pan:Float, ?pitch:Float):SoundPlayer
Play the sound at requested position. If volume/pan/pitch are not provided, sound instance properties will be used instead.
@:dox(show)dispose(entity:Entity):Void
@:dox(show)destroy(entity:Entity):Void
read onlyhasData:Bool
data:Dynamic
@:value(null)id:String = null
read onlydestroyed:Bool
read onlydisposed:Bool
@:value(null)read onlyautoruns:Array<Autorun> = null
@editablecomponents:ReadOnlyMap<String, Component>
Public components mapping. Contain components created separately with component() or macro-based components as well.
component()
scriptContent:ScriptContent
Available with script plugin
script:Script
dispose():Void
Schedules destroy, at the end of the current frame.
unbindEvents():Void
Remove all events handlers from this entity.
autorun(run:() ‑> Void, ?afterRun:() ‑> Void):Autorun
Creates a new Autorun instance with the given callback associated with the current entity.
Autorun
Parameters:
run
The run callback
Returns:
The autorun instance
tween(?easing:Easing, duration:Float, fromValue:Float, toValue:Float, update:(Float, Float) ‑> Void):Tween
className():String
inlineclearComponents():Void
component<C>(?name:String, ?component:Null<C>):C
hasComponent(name:String):Bool
removeComponent(name:String):Void