| Package | com.pblabs.sound |
| Class | public class BackgroundMusicComponent |
| Inheritance | BackgroundMusicComponent TickedComponent EntityComponent Object |
| Property | Defined By | ||
|---|---|---|---|
| autoStart : Boolean = true | BackgroundMusicComponent | ||
![]() | isRegistered : Boolean [read-only]
Whether or not the component is currently registered with an entity. | EntityComponent | |
| music : SoundResource | BackgroundMusicComponent | ||
| musicUrl : String | BackgroundMusicComponent | ||
![]() | name : String [read-only]
The name given to the component when it is added to an entity. | EntityComponent | |
![]() | owner : IEntity
A reference to the entity that this component currently belongs to. | EntityComponent | |
| playing : Boolean [read-only] | BackgroundMusicComponent | ||
![]() | registerForTicks : Boolean
Set to register/unregister for tick updates. | TickedComponent | |
![]() | updatePriority : Number = 0.0
The update priority for this component. | TickedComponent | |
| Property | Defined By | ||
|---|---|---|---|
| handle : SoundHandle | BackgroundMusicComponent | ||
| Method | Defined By | ||
|---|---|---|---|
onTick(tickRate:Number):void [override] | BackgroundMusicComponent | ||
![]() |
Registers the component with an entity. | EntityComponent | |
![]() | reset():void
This is called by an entity on all of its components any time a component
is added or removed. | EntityComponent | |
start():void | BackgroundMusicComponent | ||
stop():void | BackgroundMusicComponent | ||
![]() | unregister():void
Unregisters the component from an entity. | EntityComponent | |
| Method | Defined By | ||
|---|---|---|---|
onAdd():void [override] | BackgroundMusicComponent | ||
onRemove():void [override] | BackgroundMusicComponent | ||
![]() | onReset():void
This is called anytime a component is added or removed from the owner entity. | EntityComponent | |
| autoStart | property |
public var autoStart:Boolean = true| handle | property |
protected var handle:SoundHandle| music | property |
public var music:SoundResource| musicUrl | property |
public var musicUrl:String| playing | property |
playing:Boolean [read-only] public function get playing():Boolean| onAdd | () | method |
override protected function onAdd():void| onRemove | () | method |
override protected function onRemove():void| onTick | () | method |
override public function onTick(tickRate:Number):voidParameters
tickRate:Number |
| start | () | method |
public function start():void| stop | () | method |
public function stop():void