0ad/binaries/data/mods/public/simulation/components/Sound.js

18 lines
402 B
JavaScript
Raw Normal View History

function Sound() {}
Sound.prototype.Init = function()
{
};
Sound.prototype.PlaySoundGroup = function(name)
{
if (name in this.template.SoundGroups)
{
var cmpSoundManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_SoundManager);
if (cmpSoundManager)
cmpSoundManager.PlaySoundGroup(this.template.SoundGroups[name], this.entity);
}
};
Engine.RegisterComponentType(IID_Sound, "Sound", Sound);