Packageverlocity.ents.sound
Classpublic class SoundEmitter
InheritanceSoundEmitter Inheritance Entity Inheritance Object



Public Properties
 PropertyDefined By
 InheritedbaseClass : Object
[read-only] Returns the entity base class.
Entity
 InheriteddefaultHealth : int
[read-only] A getter that returns the default health the entity has.
Entity
 Inherited_display : Boolean
[read-only] Returns if this entity base contains display functionality (will not Init until spawned).
Entity
 Inherited_dynamic : Boolean
[read-only] Returns if the entity is dynamic.
Entity
 Inheritedhealth : int
[read-only] A getter that returns the current health value of the entity.
Entity
 Inherited_id : int
Returns the registration ID of the entity.
Entity
 InheritedmaxHealth : int
A getter that returns the maximum health this entity can have.
Entity
  x : Number
Returns the X position of the emitter
SoundEmitter
Public Methods
 MethodDefined By
 Inherited
_Dispose():void
Cleans the entity's data.
Entity
 Inherited
_Update():void
Called each engine tick, do not override this.
Entity
 Inherited
Construct():void
Called before the entity is spawned to setup the constants of the entity.
Entity
 Inherited
DeInit():void
Called when the entity is deleted.
Entity
 Inherited
EnableUpdate(bUpdate:Boolean = true):void
Sets if the entity will update each engine tick.
Entity
 Inherited
GetClass():Object
Returns the class of the entity.
Entity
 Inherited
GetOwner():Object
Returns the current owner of the entity.
Entity
 Inherited
GetType():String
Returns the current string type of the entity.
Entity
 Inherited
Init():void
Called when the entity is first registered/spawned.
Entity
 Inherited
Is(cClass:Class):Boolean
Returns if the entity matches a class.
Entity
 Inherited
IsDead():Boolean
Returns if the entity is dead.
Entity
 Inherited
IsHealthZero():Boolean
Returns if the health is zero.
Entity
 Inherited
IsProtected():Boolean
Returns if the entity is protected.
Entity
 Inherited
IsT(sCheckType:String):Boolean
Returns if the entity is matches a type (lowercase only).
Entity
 Inherited
IsUpdating():Boolean
Returns if the entity is updating.
Entity
 Inherited
Remove():void
Marks the entity for removal.
Entity
 Inherited
Removes all health of the entity.
Entity
 Inherited
Reset():void
Resets the entity to its original values.
Entity
 Inherited
Resets the entity's health to the default health.
Entity
 Inherited
SetDefaultHealth(setHealth:int = 100):void
Sets the default health of this entity.
Entity
 Inherited
SetHealth(newHealth:int):void
Sets the health value of this entity.
Entity
 Inherited
SetOwner(newOwner:Object):void
Sets the owner of the entity.
Entity
 Inherited
SetProtected(bProtected:Boolean = true):void
Protects an entity from being removed by clean up calls, such as CleanSlate.
Entity
 Inherited
SetType(sSetType:String):void
Sets the string type of the entity.
Entity
  
SetVolume(nNewVolume:Number):void
Sets the volume of the emitting sound
SoundEmitter
  
StartEmitting(sSound:*, nStartVolume:Number = 1, bLoops:Boolean = false):void
Starts emitting a location based sound
SoundEmitter
  
StopEmitting(bFade:Boolean = false):void
Stops emitting the sound and kills the emitter
SoundEmitter
 Inherited
TakeDamage(iDamageAmount:int):void
Subtracts the current health.
Entity
 Inherited
Update():void
Called each engine tick.
Entity
Protected Methods
 MethodDefined By
 Inherited
OnDeath():void
Called when the entity's health is now 0.
Entity
 Inherited
Called when the entity's health has been changed.
Entity
 Inherited
Called when the entity took damage via TakeDamage function.
Entity
Property Detail
xproperty
x:Number

Returns the X position of the emitter


Implementation
    public function get x():Number
    public function set x(value:Number):void
Method Detail
SetVolume()method
public function SetVolume(nNewVolume:Number):void

Sets the volume of the emitting sound

Parameters

nNewVolume:Number

StartEmitting()method 
public function StartEmitting(sSound:*, nStartVolume:Number = 1, bLoops:Boolean = false):void

Starts emitting a location based sound

Parameters

sSound:*
 
nStartVolume:Number (default = 1)
 
bLoops:Boolean (default = false)

StopEmitting()method 
public function StopEmitting(bFade:Boolean = false):void

Stops emitting the sound and kills the emitter

Parameters

bFade:Boolean (default = false) — Fade out