public void applyTones(int x, int y, DialogueBox theTip) { // Applying tones to Text Boxes for (var i = 0; i < buttons.Count; i++) { if (buttons[i].GetSelected()) { //CHECK MATRIX BS // Move to character state //double[,] final = tfx.MatrixMult(tfx, cf); ////Console.WriteLine(final[2, 3]); ////Console.WriteLine("HEY THE BUTTON I AM DRAGGING IS: " + buttons[i].getTone().ToString()); // Get UI Text Boxes var playerDialogues = this.getPlayerDialogues(); for (var j = 0; j < playerDialogues.Count; j++) { var boxBounds = playerDialogues[j].getBoxBounds(); //change color if the button is hovering over the textbox if (contains(buttons[i])) { for (int k = 0; k < playerDialogues.Count; k++) { playerDialogues[k].setPrevColor(playerDialogues[k].getBoxColor("curr")); playerDialogues[k].setBoxColor(buttons[i].getTonalColor()); playerDialogues[k].setAffected(true); playerDialogues[k].setTone(buttons[i].getTone()); if (theTip.init == true) { theTip.loadNewDialogue("tooltip3", "Click/Space to Speak"); } ////Console.WriteLine("MY TONE IS: " + playerDialogues[0].getTone()); //IF THE PLAYER DRAGGED IN BLUNT //HAVE THE TARGET CHARS REACT ANGRILY if (playerDialogues[0].getTone() == tone.Blunt) { //only pgets called when dragged!! keys will not work // Program.getGame().getTargets(); //Console.WriteLine("hello"); //applyReactionToBlunt(Program.getGame().getTargets()); } } break; } } buttons[i].snapBack(); buttons[i].SetSelected(false); break; } } }
public void applyToneShortcut(UIButton button, DialogueBox theTip) { if (button.getDisabled() == false) { for (int i = 0; i < playerDialogues.Count; i++) { rootBackgroundBorder.OutlineColor = button.getTonalColor(); playerDialogues[i].setPrevColor(playerDialogues[i].getBoxColor("curr")); playerDialogues[i].setBoxColor(button.getTonalColor()); playerDialogues[i].setTone(button.getTone()); if (theTip.init == true) { theTip.loadNewDialogue("tooltip3", "Click/space to speak"); } } } }
public void advanceConversation(string speaker, List<DialogueObj> responseList, List<DialogueObj> responseListNPC) { int pickPlayer = 0; int pickNPC = 0; if (responseList != null) { Random rnd = new Random(); pickPlayer = rnd.Next(0, responseList.Count); pickNPC = rnd.Next(0, responseListNPC.Count); } if (currentState == "game") { if (dialogueIndex == "AI") { playerDialogueBox.init = false; playerDialogueBox.active = false; dialogueBox.active = true; if (dialogueBox.checkNext()) { dialogueIndex = "root"; dialogueBox.active = false; playerDialogueBox.active = false; } } else if (dialogueIndex == "root") { dialogueBox.init = false; playerDialogueBox.init = true; dialogueIndex = "player"; } else if (dialogueIndex == "player") { dialogueBox.init = false; dialogueBox.active = false; if (playerDialogueBox.active && !dialogueBox.active) { if (playerDialogueBox.printTime != 0 && playerDialogueBox.getAnimationStart() && !playerDialogueBox.getAwaitInput()) { playerDialogueBox.setPrintTime(0); } else { if (playerDialogueBox.checkNext()) { playerDialogueBox.active = false; dialogueBox.active = true; dialogueBox.init = true; if (responseListNPC[pickNPC].inext == "") { //if there is no interjector dialogueIndex = "AI"; dialogueBox.loadNewDialogue(speaker, responseListNPC[pickNPC].content); sound_man.playChatter(speaker); } else { //if there is an interjector dialogueIndex = "interject"; dialogueBox.loadNewDialogue(speaker, responseListNPC[pickNPC].content); } } } } } else if (dialogueIndex == "interject") { if (dialogueBox.checkNext()) { dialogueBox.loadNewDialogue(speaker, responseListNPC[pickNPC].content); if (responseListNPC[pickNPC].inext == "") { dialogueIndex = "AI"; } } } // DO STUFF HERE MEGA JANK INCOMING } else if (currentState == "tutorial") { if (jankList[0].id == "1") { db_states('p'); tooltip.init = true; tooltip.loadNewDialogue("tooltip1", "Press Space to Advance"); playerDialogueBox.loadNewDialogue("player", jankList[0].content); } else if (jankList[0].id == "2") { tooltip.init = false; db_states('p'); playerDialogueBox.loadNewDialogue("player", jankList[0].content); } else if (jankList[0].id == "3") { db_states('a'); dialogueBox.loadNewDialogue("alex", jankList[0].content); sound_man.playChatter("alex"); } else if (jankList[0].id == "4") { db_states('p'); playerDialogueBox.loadNewDialogue("player", jankList[0].content); } else if (jankList[0].id == "5") { db_states('r'); tooltip.init = true; tooltip.loadNewDialogue("tooltip2", "Drag tone to your dialogue"); } else if (jankList[0].id == "6") { db_states('p'); playerDialogueBox.loadNewDialogue("player", jankList[0].content); } else if (jankList[0].id == "7") { db_states('a'); dialogueBox.loadNewDialogue("alex", jankList[0].content); sound_man.playChatter("alex"); } else if (jankList[0].id == "8") { db_states('r'); } else if (jankList[0].id == "9") { db_states('p'); playerDialogueBox.loadNewDialogue("player", jankList[0].content); } else if (jankList[0].id == "10") { db_states('a'); dialogueBox.loadNewDialogue("alex", jankList[0].content); sound_man.playChatter("alex"); } else if (jankList[0].id == "11") { db_states('p'); playerDialogueBox.loadNewDialogue("player", jankList[0].content); } else if (jankList[0].id == "12") { db_states('a'); dialogueBox.loadNewDialogue("dad", jankList[0].content); sound_man.playChatter("dad"); } else if (jankList[0].id == "13") { db_states('p'); playerDialogueBox.loadNewDialogue("player", jankList[0].content); } else if (jankList[0].id == "14") { db_states('r'); } else if (jankList[0].id == "15") { db_states('p'); playerDialogueBox.loadNewDialogue("player", jankList[0].content); } else if (jankList[0].id == "16") { db_states('a'); dialogueBox.loadNewDialogue("dad", jankList[0].content); sound_man.playChatter("dad"); } else if (jankList[0].id == "17") { db_states('p'); playerDialogueBox.loadNewDialogue("player", jankList[0].content); } else if (jankList[0].id == "18") { db_states('p'); playerDialogueBox.loadNewDialogue("player", jankList[0].content); } else if (jankList[0].id == "19") { db_states('a'); dialogueBox.loadNewDialogue("mom", jankList[0].content); sound_man.playChatter("mom"); } else if (jankList[0].id == "20") { db_states('p'); playerDialogueBox.loadNewDialogue("player", jankList[0].content); } else if (jankList[0].id == "21") { db_states('r'); } else if (jankList[0].id == "22") { db_states('p'); playerDialogueBox.loadNewDialogue("player", jankList[0].content); } else if (jankList[0].id == "23") { db_states('a'); dialogueBox.loadNewDialogue("mom", jankList[0].content); sound_man.playChatter("mom"); } else if (jankList[0].id == "24") { db_states('r'); } else if (jankList[0].id == "25") { db_states('p'); playerDialogueBox.loadNewDialogue("player", jankList[0].content); } else if (jankList[0].id == "26") { db_states('a'); dialogueBox.loadNewDialogue("mom", jankList[0].content); sound_man.playChatter("mom"); } else if (jankList[0].id == "27") { db_states('p'); playerDialogueBox.loadNewDialogue("player", jankList[0].content); } else { db_states('a'); dialogueBox.loadNewDialogue("dad", "Hey, it's good to have you home."); sound_man.playChatter("dad"); SetState("game"); } } }