// Update is called once per frame void Update() { /*if (AbsoluteGameState == GameState.KnockedOut) { * PoliceAppear.FinalHardSlap = true; * }*/ if (Input.GetKeyUp(KeyCode.Alpha1) || Input.GetKeyUp(KeyCode.Keypad1)) { CheckSlapList(1); AbsoluteGameState = dialogueExecuter.Step(); Debug.Log(AbsoluteGameState); } if (Input.GetKeyUp(KeyCode.Alpha2) || Input.GetKeyUp(KeyCode.Keypad2)) { CheckSlapList(2); AbsoluteGameState = dialogueExecuter.Step(); Debug.Log(AbsoluteGameState); } if (Input.GetKeyUp(KeyCode.Alpha3) || Input.GetKeyUp(KeyCode.Keypad3)) { CheckSlapList(3); AbsoluteGameState = dialogueExecuter.Step(); Debug.Log(AbsoluteGameState); } // Currently using input key 'c' to advance dialogue. May change it to a different key, and add 1,2,3 for inputs later. /* if (Input.GetKeyUp (KeyCode.C)) { * AbsoluteGameState = dialogueExecuter.Step (); * Debug.Log (AbsoluteGameState); * } * * * * // Input key 'B' triggers the start of the conversation with the First Woman. This is to be replaced by proximity trigger * // or proximity + button press. * * if (AbsoluteGameState == GameState.HeadingToFirstWoman && Input.GetKeyUp (KeyCode.B)) { * AbsoluteGameState = GameState.TalkingToFirstWoman; * dialogueExecuter = new DialogueExecuter (TextPanel, Dialoguetextbox, FirstWomanDialogue, AbsoluteGameState); * } * * // Input 'P' gives you a pizza slice. A second 'P' then triggers second dialogue with the woman. * * if (AbsoluteGameState == GameState.HeadingToBuyPizza && Input.GetKeyUp (KeyCode.P)) { * AbsoluteGameState = GameState.ObtainedPizza; * } * * if (AbsoluteGameState == GameState.ObtainedPizza && Input.GetKeyUp (KeyCode.P)) { * AbsoluteGameState = GameState.TalkingToFirstWomanWithPizza; * dialogueExecuter = new DialogueExecuter (TextPanel, Dialoguetextbox, FirstWomanDialogue2, AbsoluteGameState); * * } */ }
public void StartTalk(int charID, GameObject NPCObj) { Dialogue foundDialogue = FuckOff; //Default option if nothing else matches. GameObject NPC = Lisa; Debug.Log("Triggered StartTalk."); switch (charID) { case 1: NPC = Fred; if (AbsoluteGameState == GameState.HeadingToFred) { AbsoluteGameState = GameState.TalkingToFred; foundDialogue = OpeningDialogue; } break; case 2: NPC = Lisa; if (AbsoluteGameState == GameState.HeadingToFirstWoman) { AbsoluteGameState = GameState.TalkingToFirstWoman; foundDialogue = FirstWomanDialogue; } if (AbsoluteGameState == GameState.ObtainedPizza) { AbsoluteGameState = GameState.TalkingToFirstWomanWithPizza; foundDialogue = FirstWomanDialogue2; } break; case 3: NPC = Tina; if (AbsoluteGameState == GameState.HeadingToSecondWoman) { AbsoluteGameState = GameState.TalkingToSecondWoman; foundDialogue = SecondWomanDialogue; } if (AbsoluteGameState == GameState.ObtainedChinese) { AbsoluteGameState = GameState.TalkingToSecondWomanWithChinese; foundDialogue = SecondWomanDialogue2; } break; case 4: NPC = Chrystal; if (AbsoluteGameState == GameState.HeadingToProstitute) { AbsoluteGameState = GameState.TalkingToProstitute; foundDialogue = ProstituteDialogue; } if (AbsoluteGameState == GameState.ObtainedCash) { AbsoluteGameState = GameState.TalkingToProstituteWithCash; foundDialogue = ProstituteDialogue2; } break; default: foundDialogue = FuckOff; break; } Debug.Log("Which dialogue using? " + foundDialogue.name); dialogueExecuter = new DialogueExecuter(TextPanel, Dialoguetextbox, foundDialogue, AbsoluteGameState, PCobj, NPC); AbsoluteGameState = dialogueExecuter.Step(); }