private static void HandleMessage(NetworkMessage netMsg)
 {
     netMsg.ReadMessage <EntitySoundManager.EntitySoundMessage>(EntitySoundManager.sharedMessage);
     if (EntitySoundManager.sharedMessage.networkIdentity)
     {
         EntitySoundManager.EmitSoundLocal(NetworkSoundEventCatalog.GetAkIdFromNetworkSoundEventIndex(EntitySoundManager.sharedMessage.networkSoundEventIndex), EntitySoundManager.sharedMessage.networkIdentity.gameObject);
     }
     EntitySoundManager.sharedMessage.Clear();
 }
        // Token: 0x060026F7 RID: 9975 RVA: 0x000A9ACC File Offset: 0x000A7CCC
        public static void EmitSoundServer(NetworkSoundEventIndex networkSoundEventIndex, GameObject gameObject)
        {
            NetworkIdentity component = gameObject.GetComponent <NetworkIdentity>();

            if (!component)
            {
                Debug.LogWarningFormat("Cannot emit sound \"{0}\" on object \"{1}\": Object has no NetworkIdentity.", new object[]
                {
                    NetworkSoundEventCatalog.GetAkIdFromNetworkSoundEventIndex(networkSoundEventIndex),
                    gameObject
                });
                return;
            }
            EntitySoundManager.EmitSoundServer(networkSoundEventIndex, component);
        }
Exemplo n.º 3
0
 private static void HandleMessage(NetworkMessage netMsg)
 {
     netMsg.ReadMessage <PointSoundManager.NetworkSoundEventMessage>(PointSoundManager.sharedMessage);
     PointSoundManager.EmitSoundLocal(NetworkSoundEventCatalog.GetAkIdFromNetworkSoundEventIndex(PointSoundManager.sharedMessage.soundEventIndex), PointSoundManager.sharedMessage.position);
 }