/// <summary> /// /// Note: Always called within locked PlayerConfigLock and ConnectedContestants. /// </summary> private void SendContestantRoster() { bool atLeastOnePlayer = false; string evt = "Buzzer_Host_Roster"; if (BuzzerEnabled) { evt = "Buzzer_Host_Live_Roster"; } var data = new List <string>(); for (int index = 0; index < 4; index++) { var player = ConnectedContestants[index]; if (player != null && player.EODType.Equals(VMEODGameshowBuzzerPluginType.Player) && player.MyClient.Avatar != null) { atLeastOnePlayer = true; data.Add(player.MyClient.Avatar.ObjectID + ""); data.Add(player.MyScore + ""); data.Add((player.MyBuzzerEnabled ? "1" : "0")); } else { data.AddRange(new string[] { "0", "0", "0" }); } } // send to host UI MyClient.Send(evt, VMEODGameCompDrawACardData.SerializeStrings(data.ToArray())); // sent to object via Simantics Controller.SendOBJEvent(new Model.VMEODEvent((short)VMEODGameshowHostPluginEvents.Update_Players_Connected, (short)(atLeastOnePlayer ? 1 : 0))); }
private byte[] GetCurrentCardData() { if ((Game.CurrentCardText == null) || (Game.CurrentCardText == "")) { return(null); } else { return(VMEODGameCompDrawACardData.SerializeStrings(Game.CurrentCardText, Game.CurrentCardFrequency + "")); } }
byte[] GetDeckListBoxData() { if (Game.UniqueCardCount == 0) { return new byte[] { 0 } } ; List <String> deckListBoxList = new List <string>(); foreach (var card in Game.Deck) { // truncate each string to fit in the UIListBox but retain any possible Default strings in the enum below if (card.Text.Length > 40) { deckListBoxList.Add(card.Text.Substring(0, 40)); } else { deckListBoxList.Add(card.Text); } } return(VMEODGameCompDrawACardData.SerializeStrings(deckListBoxList.ToArray())); } byte[] GetCurrentCardData() { if ((Game.CurrentCardText == null) || (Game.CurrentCardText == "")) { return(null); } else { return(VMEODGameCompDrawACardData.SerializeStrings(Game.CurrentCardText, Game.CurrentCardFrequency + "")); } } byte[] GetGameInfoMessage() { return(VMEODGameCompDrawACardData.SerializeStrings(Game.GameTitle, Game.GameDescription)); } }
private byte[] GetDeckListBoxData() { if (Game.UniqueCardCount == 0) { return new byte[] { 0 } } ; List <String> deckListBoxList = new List <string>(); foreach (var card in Game.Deck) { // truncate each string to fit in the UIListBox but retain any possible Default strings in the enum below if (card.Text.Length > 40) { deckListBoxList.Add(card.Text.Substring(0, 40)); } else { deckListBoxList.Add(card.Text); } } return(VMEODGameCompDrawACardData.SerializeStrings(deckListBoxList.ToArray())); }
byte[] GetCardNumberData() { return(VMEODGameCompDrawACardData.SerializeStrings(Game.UniqueCardCount + "", Game.GrandTotalCardsCount + "")); }
private byte[] GetGameInfoMessage() { return(VMEODGameCompDrawACardData.SerializeStrings(Game.GameTitle, Game.GameDescription)); }