public override void OnNPCSpokenTo(Constants.People person, string topic) { base.OnNPCSpokenTo(person, topic); if (person == Constants.People.Receptionist) { if (topic == "CCTV" && storyGraph.IsStateActive("Question Receptionist about CCTV")) { storyGraph.CompleteState("Question Receptionist about CCTV"); } } else if (person == Constants.People.JamesBond) { if (topic == "CCTV" && storyGraph.IsStateActive("Question Bond about CCTV")) { storyGraph.CompleteState("Question Bond about CCTV"); } } else if (person == Constants.People.TheQueen) { if (topic == "Meeting with Bond" && storyGraph.IsStateActive("Question Queen about meeting with Bond")) { storyGraph.CompleteState("Question Queen about meeting with Bond"); } } else if (person == Constants.People.DonaldTrump) { if (topic == "Money" && storyGraph.IsStateActive("Question Trump about money")) { storyGraph.CompleteState("Question Trump about money"); } } }
//! Called when the player accuses an NPC and checks if successful. /*! * \param person person accused. * \return Boolean of whether accusation was successful. */ public virtual bool CheckAccusation(Constants.People person) { /* Called when the player accuses someone to check whether the accusation succeeded. * Returns true if the accusation was successful and false if not */ return(false); }
public override void OnNPCSpokenTo(Constants.People person) { base.OnNPCSpokenTo(person); if (person == Constants.People.TheQueen && storyGraph.IsStateActive("Intro")) { storyGraph.CompleteState("Intro"); } }
public override bool CheckAccusation(Constants.People person) { if (storyGraph.IsStateUnlocked("Accuse Dumbledore") && person == Constants.People.Dumbledore) { return(true); } else { return(false); } }
public virtual void OnNPCSpokenTo(Constants.People person) //! Called when an NPC is spoken to. /*! * \param npc Constants.People npc constant spoken to. */ { /* Called when the player begins speaking to an NPC. */ Debug.Log("NPC spoken to " + person.ToString()); }
public override void OnNPCSpokenTo(Constants.People person) { base.OnNPCSpokenTo(person); if (person == Constants.People.Receptionist) { if (storyGraph.IsStateActive("Intro")) { storyGraph.CompleteState("Intro"); } } }
public virtual void OnNPCSpokenTo(Constants.People person, string topic) //! Called when an NPC is spoken to about a particular topic. /*! * \param person Constants.People * \param topic string */ { /* Called when the player speaks to an NPC about a certain topic */ Debug.LogFormat("NPC spoken to {0} about topic {1}", person.ToString(), topic); }
//! Gets the dialogue for the current person being interacted with. /*! * \param person NPC being interacted with. * \return Dialogue for the current person */ public Dictionary <string, string> GetCurrentDialogueForPerson(Constants.People person) { // Returns a (topic -> text) dictionary if (!currentDialogue.ContainsKey(person)) { throw new Exception("No dialogue found for person: " + person); } // Make a clone of the dialogue dictionary so that it can be edited safely by the recipient Dictionary <string, string> dialogueClone = new Dictionary <string, string>(); foreach (var key in currentDialogue[person].Keys) { dialogueClone[key] = currentDialogue[person][key]; } return(dialogueClone); }
//! Gets the dialogue for the current person from the story graph. /*! * \param npc Current NPC being interacted with. * \return Dictionary of dialogue for person. */ public Dictionary <string, string> GetCurrentDialogueForPerson(Constants.People npc) { return(storyScript.GetStoryGraph().GetCurrentDialogueForPerson(npc)); }
//! Sets the player icon for the person selected. /*! * \param person Person object. */ public void SetPlayerIcon(Constants.People person) { Sprite img = Resources.Load(person.ToString()) as Sprite; PlayerIcon.GetComponent <Image>().sprite = img; }