Ejemplo n.º 1
0
    /// <summary>
    /// Check if dialogue variables match current Global + Player + NPC variables.
    /// </summary>
    /// <param name="dialogueVars">The list of dialogue variables to check.</param>
    /// <param name="npc">The NPC to check.</param>
    /// <returns>Returns true if all dialogue variables are fulfilled.</returns>
    private bool MatchVars(List <string> dialogueVars, NPC npc)
    {
        List <string> currentVars = new List <string>();

        currentVars.AddRange(npc.npcVars);
        currentVars.AddRange(Player.Instance.playerVars);
        currentVars.AddRange(GameController.Instance.globalVars);

        return(ListComparer.ContainsAll(currentVars, dialogueVars));
    }
Ejemplo n.º 2
0
 /// <summary>
 /// Check if dialogue party member requirements match the player's current party.
 /// </summary>
 /// <param name="dialoguePartyMembers">The list of dialogue party member ids to check.</param>
 /// <returns>Returns true if the player's party contains the required members.</returns>
 private bool MatchParty(List <string> dialoguePartyMembers)
 {
     return(ListComparer.ContainsAll(Player.Instance.party, dialoguePartyMembers));
 }