コード例 #1
0
 void Hello3(int choice)
 {
     if (choice == -1)
     {
         conversation.NewMonologue("I hope very much you'll be able to make it.");
     }
     else if (choice == 1)
     {
         gameState.IncrementArc();
         gameState.Overworld();
         gameState.SetMusicState("None");
     }
 }
コード例 #2
0
    // Update is called once per frame
    void Update()
    {
        if (gameState.CurrentState() == "Dialogue" && initiated != true)
        {
            if (gameState.GetInterlocutor() == characterName)
            {
                // Logic can be added here for which dialogue tree to start from
                Initialize();
                gameState.SetMusicState("Dialogue");

                if (gameState.GetArcState() == 2)
                {
                    Current = Reprimand1;
                    Current(-1);
                }
                else
                {
                    Current = Silence;
                    Current(-1);
                }
            }
        }
        if (gameState.CurrentState() == "Overworld" && initiated == true)
        {
            initiated = false;
        }
        if (initiated == true)
        {
            Current(GetChoice());
        }
    }
コード例 #3
0
    // Update is called once per frame
    void Update()
    {
        if (gameState.CurrentState() == "Dialogue" && initiated != true)
        {
            if (gameState.GetInterlocutor() == characterName)
            {
                // Logic can be added here for which dialogue tree to start from
                Initialize();
                gameState.SetMusicState("Dialogue");

                /* LOGIC GOES HERE! FOR NOW: GO TO THE ONLY DECISION */

                if (gameState.GetArcState() == 1)
                {
                    Current = Hello1;
                    Current(-1);
                }
                else if (gameState.GetArcState() == 2)
                {
                    Current = Appointment1;
                    Current(-1);
                }
            }
        }
        if (gameState.CurrentState() == "Overworld" && initiated == true)
        {
            initiated = false;
        }
        if (initiated == true)
        {
            Current(GetChoice());
        }
    }