示例#1
0
        private static void SyncSoundManager(Session Session, ClientMessage Message)
        {
            RoomInstance Instance = RoomManager.GetInstanceByRoomId(Session.CurrentRoomId);

            if (Instance == null)
            {
                return;
            }

            if (Instance != null && Instance.MusicController.IsPlaying)
            {
                Session.SendData(MusicPlayingComposer.Compose(Instance.MusicController.CurrentSong.SongData.Id,
                                                              Instance.MusicController.SongQueuePosition, Instance.MusicController.SongSyncTimestamp));
            }
        }
示例#2
0
 public void BroadcastCurrentSongData(RoomInstance Instance)
 {
     Instance.BroadcastMessage(MusicPlayingComposer.Compose(mSong == null ? 0 : mSong.SongData.Id,
                                                            mSongQueuePosition, 0));
 }