2010-04-04 23:24:39 +02:00
|
|
|
function Sound() {}
|
|
|
|
|
|
|
|
Sound.prototype.Init = function()
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2010-04-06 01:09:34 +02:00
|
|
|
Sound.prototype.GetSoundGroup = function(name)
|
|
|
|
{
|
|
|
|
return this.template.SoundGroups[name] || "";
|
|
|
|
};
|
|
|
|
|
2010-04-04 23:24:39 +02:00
|
|
|
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);
|