public Conversation(GameSession gameSession, Candidate candidate, ChoicePool pool)
    {
        m_GameSession = gameSession;
        m_ChoicePool  = pool;
        m_Personality = candidate.Personality;

        Choice opening;

        if (string.IsNullOrWhiteSpace(candidate.StartingConversationChoiceID))
        {
            opening = pool.Choices.Where(choice => choice.IsStartingNode).ToArray().GetRandom();
        }
        else
        {
            opening = GetChoiceForID(candidate.StartingConversationChoiceID);
        }

        Choice = new SubscriptionValue <Choice>(opening);
    }
Ejemplo n.º 2
0
 public void Load()
 {
     ChoicePool = JSONLoader.LoadFromFile <ChoicePool>(m_FilePath);
 }