LCOV - code coverage report
Current view: top level - simulation/helpers - Sound.js (source / functions) Hit Total Coverage
Test: lcov.info Lines: 3 4 75.0 %
Date: 2023-04-02 12:52:40 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /**
       2             :  * Simple wrapper function for playing sounds that are associated with entities
       3             :  * @param name Typically one of 'walk', 'run', 'attack', 'death', 'build',
       4             :  *     'gather_fruit', 'gather_grain', 'gather_wood', 'gather_stone', 'gather_metal'
       5             :  */
       6             : function PlaySound(name, ent)
       7             : {
       8           4 :         var cmpSound = Engine.QueryInterface(ent, IID_Sound);
       9           4 :         if (cmpSound)
      10           0 :                 cmpSound.PlaySoundGroup(name);
      11             : }
      12             : 
      13           4 : Engine.RegisterGlobal("PlaySound", PlaySound);

Generated by: LCOV version 1.14