public void SetText() { Action <string> textSelected = (string pText) => { mLabel.Text = pText; ScaleText(); }; mQuestionPanel.AskQuestion("Enter text", textSelected, mLabel.Text); }
public void Button_SignOut_Clicked() { questionPanel.AskQuestion("Do you really want to sign out?", SignOut_QuestionPanel_Yes, SignOut_QuestionPanel_No, SignOut_QuestionPanel_Maybe); }
void FirstDay() { string[] day1FirstDialogue = new string[] { "This is " + mNetworkManager.myPlayer.uSelectedStation.uName + ". The public access TV station you've worked at for several years", "Here comes your boss, " + mNetworkManager.myPlayer.uBossName }; Action day1FirstDialogueFinished = () => { Action managerArrived = () => { print("ARRIVED"); Action day1DialogueFinished = () => { Action <string> showNameSelected = (string pShowName) => { mNetworkManager.myPlayer.networkView.RPC("SetShowName", RPCMode.All, pShowName); string[] dialogue = new string[] { "Great. " + pShowName + "! I like it!", "You have " + Game.NUMBER_OF_DAYS.ToString() + " days to save your job and win the ratings war. Don't let me down!" }; Action dialogueFinished = () => { mDialogueManager.WaitForReady(); }; mDialogueManager.StartDialogue(dialogue, dialogueFinished); }; mQuestionPanel.AskQuestion("The show will be \"" + mNetworkManager.myPlayer.uTheme + "\"\n\nWhat shall we call the new show?", showNameSelected); }; System.Random rnd = new System.Random(); string otherStation = mNetworkManager.players.Where(p => p.uID != mNetworkManager.mMyClientID).Select(p => p.uStationName).OrderBy(x => rnd.Next()).FirstOrDefault(); if (otherStation == null) { // Should only happen when debugging with one player otherStation = "The other stations"; } string[] day1SecondDialogue = new string[] { "Good morning, " + mNetworkManager.myPlayer.uName + "!", "Listen... I've been meaning to talk to you", "You see, things aren't going so great at " + mNetworkManager.myPlayer.uSelectedStation.uName, otherStation + " are killing us in the ratings", "The bosses... they wanted to let you go... " + mNetworkManager.myPlayer.uOldTheme + " just isn't doing it any more", "We're trying to recreate " + mNetworkManager.myPlayer.uSelectedStation.uName + " to be new, exciting, vibrant", "You've got one week to turn it around - and we're giving you a new show to run", "Our market research suggests that " + mNetworkManager.myPlayer.uTheme + " would really be a big hit with modern audiences", }; mDialogueManager.StartDialogue(day1SecondDialogue, day1DialogueFinished); }; mManager.Show(managerArrived); }; if (Game.DEBUG_MODE) { mNetworkManager.myPlayer.networkView.RPC("SetShowName", RPCMode.All, "TempShowName"); mDialogueManager.WaitForReady(); } else { mDialogueManager.StartDialogue(day1FirstDialogue, day1FirstDialogueFinished); } }