

export enum SoundType
{
    crash,die,extraspeed,gold,jump,land,xp,fly
}

export default class PlaySoundManager
{
    static SoundVolume = 100;
    static CanPlaySound = true;

    static SoundPath(_type:SoundType):string
    {
        return "subpackage/res/sound/" + SoundType[_type] + ".wav";
    }

    static NomalSources:Laya.SoundChannel;
    public static Play(type:SoundType)
    {
        if(PlaySoundManager.CanPlaySound)
        {
            this.NomalSources = Laya.SoundManager.playSound(this.SoundPath(type));
        }
    }

}