예제 #1
0
        private void LoadSongTriggered(object sender, LoadSongData data)
        {
            LogMessage("Received LoadSong:\nName: " + data.name +
                       "\nFilename: " + data.file +
                       "\nSoundcloud ID: " + data.soundcloud, Color.SlateGray);

            //Create music controller (should be created already when we joined, but just to be on the safe side)
            CreatePlayback();

            HasGameEnded = false;
        }
예제 #2
0
        private void event_loadsong(SocketIOClient.Messages.IMessage message)
        {
            Debug.WriteLine("\nevent_loadsong:\n" + message.MessageText);
            EventJson <LoadSongData> received = JsonConvert.DeserializeObject <EventJson <LoadSongData> >(message.Json.ToJsonString());

            //Validate
            if (!received.Validate())
            {
                return;
            }

            LoadSongData data = received.args[0].data;

            LoadSongTriggered?.Invoke(this, data);
        }