void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { if (e.id == "SetBeanPot") { SetBeanPot(e.val); } }
void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { if (e.id == "New Decider") { Events.instance.Raise(new SelectDeciderEvent(e.message1)); } }
protected override void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { if (!ThisScreen) { return; } if (e.id == "YesAddTime" && !Timer.instance.CountingDown) { if (!Player.instance.IsDecider) { MessageMatcher.instance.RemoveMessage("NoAddTime"); } if (Player.instance.IsDecider) { timer.Interactable = false; Timer.instance.AllAddSeconds(TimerValues.extraTime); MessageSender.instance.SendMessageToAll("AcceptAddTime", e.message1); } } if (e.id == "AcceptAddTime") { if (e.message1 == Player.instance.Name) { Player.instance.MyBeanPool.OnAddTime(); } } }
void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { if (e.id == "UpdatePlayerScore") { UpdatePlayerScore(e.message1, e.val); } }
/** * Events */ void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { if (e.id == "OnDisconnectedFromServer") { OnDisconnectedFromServer(); } }
void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { if (e.id == "Winning Player") { Player.instance.WinningPlayer = e.message1; } }
void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { if (e.id == "RaiseMessagesMatch") { RaiseMessagesMatch(e.message1, e.message2); } }
void OnAllReceiveMessage(AllReceiveMessageEvent e) { switch (e.id) { case "ReceiveVotableItems": ReceiveVotableItems(e.message1, e.message2, e.val); break; case "ReceiveWinningAgendaItem": ReceiveWinningAgendaItem(e.message1, e.message2); break; } }
// TODO: call this w/o using the event /*void OnEnterNameEvent (EnterNameEvent e) { * if (e.name == "#Wade") { * cakeUnlocked = true; * GetLocalDeckNames (); * GetHostedDeckNames (); * } * }*/ void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { if (e.id == "OnServerLoadDeck" && e.message1 != "" && !MultiplayerManager.instance.Hosting) { LoadDeck(e.message1, e.val == 1); } }
void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { /*if (e.id == "OnServerLoadDeck") { * if (DeciderSelectionStyle.Host) { * GotoScreen ("Scoreboard", "Round"); * } else { * GotoScreen ("Choose Decider", "Decider"); * } * }*/ }
void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { if (e.id != "FinishReceivingWins") { return; } winningItems = AgendaItemsManager.instance.WinningItems; Update(); }
void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { if (e.id == "AssignRole") { if (e.message1 == Player.instance.Name) { Events.instance.Raise(new SetRoleEvent(deck.Roles[e.val])); } } }
void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { if (e.id == "UpdateAgendaItems") { UpdateAgendaItems(); } else if (e.id == "SendVotableItems") { SendVotableItems(); } }
void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { if (e.id == "ReceiveAddSeconds") { ReceiveAddSeconds(float.Parse(e.message1)); } else if (e.id == "ReceiveCountDown") { ReceiveCountDown(float.Parse(e.message1)); } }
void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { if (e.id == "SetHost") { hostId = e.message1; // cache host } else if (e.id == "SetDecider") { deciderId = e.message1; // cache decider } else if (e.id == "RequestClientConfirmation" && !MultiplayerManager.instance.Hosting) { SendMessageToHost("ConfirmClientReceived", e.message1); } }
void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { switch (e.id) { // Wifi case "OnSendPlayersToNextScreen": OnSendPlayersToNextScreen(); break; case "OnSendPlayersToScreen": OnSendPlayersToScreen(e.message1, e.message2); break; // Bluetooth case "OnGotoNextScreen": OnSendPlayersToNextScreen(); break; case "OnGotoScreen": OnSendPlayersToScreen(e.message1, e.message2); break; } }
void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { switch (e.id) { case "AcceptPlayer": AcceptPlayer(e.message1); break; case "RejectPlayer": RejectPlayer(e.message1); break; case "ClearPlayerList": ClearPlayerList(); break; case "AddPlayer": AddPlayer(e.message1); break; case "ListRefreshed": RaiseRefreshPlayerList(); break; } }
protected virtual void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { }
protected override void OnAllReceiveMessageEvent(AllReceiveMessageEvent e) { if (!ThisScreen) { return; } if (e.id == "UpdatePitcher") { pitching = (e.message1 == Player.instance.Name); if (!Player.instance.IsDecider) { currentPlayer = e.val; } } if (e.id == "YesAddTime" && !Timer.instance.CountingDown) { if (Player.instance.IsDecider) { timer.Interactable = false; Timer.instance.AllAddSeconds(TimerValues.extraTime); MessageSender.instance.SendMessageToAll("AcceptAddTime", e.message1); } } if (e.id == "NoAddTime") { if (Player.instance.IsDecider) { if (currentPlayer >= players.Count - 1) { ScreenElements.Enable("next"); ScreenElements.Enable("timesUp"); ScreenElements.Get <LabelElement> ("timesUp").Content = Copy.PitchTimeDecider2; MessageSender.instance.SendMessageToAll("FinishedPitchingPlayers"); } else { ScreenElements.Get <LabelElement> ("topLabel").Content = Copy.PitchInstructions(NextPlayer); timer.Interactable = true; MessageSender.instance.SendMessageToAll("NextPitchingPlayer", NextPlayer); } } } if (e.id == "AcceptAddTime") { if (e.message1 == Player.instance.Name) { Player.instance.MyBeanPool.OnAddTime(); } } if (e.id == "NextPitchingPlayer") { if (Player.instance.IsDecider) { return; } string nextPlayer = e.message1; if (nextPlayer == Player.instance.Name) { pitcherLabel.Content = "Your turn!"; } else { pitcherLabel.Content = string.Format("{0}'s turn", nextPlayer); } } if (e.id == "FinishedPitchingPlayers") { if (Player.instance.IsDecider) { return; } pitcherLabel.Content = ""; } }