namespace NT { /**
     * Represents a sound effect.
     */ export class SoundEffect { private _player : HTMLAudioElement ; /** The asset path of this effect. */ public assetPath : string ; param assetPath param loop public constructor ( assetPath , loop ) { this . _player = new Audio ( assetPath ) ; this . _player . loop = loop ; } /** Indicates if this effect is looping. */ public get loop ( ) : boolean { return this . _player . loop ; } /** Sets whether or not this effect should loop. */ public set loop ( value ) { this . _player . loop = value ; } /**
         * Performs desctruction routines on this object.
         */ public destroy ( ) { this . _player = undefined ; } /**
         * Plays this effect. If called more than once or while being played,
         * the effect is played from the beginning.
         */ public play ( ) { if ( ! this . _player . paused ) { this . stop ( ) ; } this . _player . play ( ) ; } /**
         * Pauses this effect.
         */ public pause ( ) { this . _player . pause ( ) ; } /**
         * Stops this effect and resets its position to the beginning.
         */ public stop ( ) { this . _player . pause ( ) ; this . _player . currentTime = 0 ; } } }