示例#1
0
 protected override bool IsPlaying(Entity e)
 {
     if (EntityManager.HasComponent <AudioHTMLSource>(e))
     {
         AudioHTMLSource audioHtmlSource = EntityManager.GetComponentData <AudioHTMLSource>(e);
         if (audioHtmlSource.sourceID > 0)
         {
             return(AudioHTMLNativeCalls.IsPlaying(audioHtmlSource.sourceID));
         }
     }
     return(false);
 }
示例#2
0
        protected static int IsPlaying(EntityManager mgr, Entity e)
        {
            if (mgr.HasComponent <AudioSourceID>(e))
            {
                AudioSourceID audioSourceID = mgr.GetComponentData <AudioSourceID>(e);
                if (audioSourceID.sourceID > 0)
                {
                    return(AudioHTMLNativeCalls.IsPlaying((int)audioSourceID.sourceID));
                }
            }

            return(0);
        }