function Sound() {} Sound.prototype.Schema = "Lists the sound groups associated with this unit." + "" + "" + "actor/human/movement/walk.xml" + "actor/human/movement/walk.xml" + "attack/weapon/sword.xml" + "actor/human/death/death.xml" + "" + "" + "" + "" + /* TODO: make this more specific, like a list of specific elements */ "" + "" + "" + "" + "" + ""; Sound.prototype.Init = function() { }; Sound.prototype.Serialize = null; // we have no dynamic state to save Sound.prototype.GetSoundGroup = function(name) { return this.template.SoundGroups[name] || ""; }; 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);