Ejemplo n.º 1
0
    public override void Update()
    {
        if (active)
        {
            Game.paused   = true;
            talk          = true;
            delay_counter = 0f;
            //SoundController.instance.PlayEffect(talk_effect);
            source.Play();
        }

        if (talk)
        {
            if (delay_counter >= delay)
            {
                Textbox.CreateTextbox(dialogue, 0.005f);
                talk          = false;
                delay_counter = 0f;
            }
            else
            {
                delay_counter += Time.deltaTime;
            }
        }

        UpdateActivity();
    }
Ejemplo n.º 2
0
 void Update()
 {
     if (scene_stage == 0)         // Wait to open chest
     {
         if (chest.active)         // open the chest - start scene
         {
             Game.paused = true;
             scene_stage = 1;
         }
     }
     else if (scene_stage == 1)         // Open chest and look inside
     {
         Textbox.CreateTextbox(chest_dialogue, 0.005f);
         scene_stage = 2;
     }
     else if (scene_stage == 2)         // Reveal hidden area
     {
         if (!Textbox.text_box.active)
         {
             hidden_area.SetActive(true);
             scene_stage = 3;
             timer       = 0f;
         }
     }
     else if (scene_stage == 3)
     {
         if (timer >= 1f)
         {
             Textbox.CreateTextbox(end_dialogue, 0.005f);
             scene_stage = 4;
             timer       = 0f;
         }
         else
         {
             timer += Time.deltaTime;
         }
     }
     else if (scene_stage == 4)
     {
         if (!Textbox.text_box.active)
         {
             Fade.instance.LoadScene("Credits");
             Game.spoke_to_bartender = false;
             Game.pushed_statue      = false;
             Game.stage  = 0;
             Game.puzzle = "";
             scene_stage = 99;
         }
     }
 }
Ejemplo n.º 3
0
    public override void Update()
    {
        if (active)
        {
            Game.paused   = true;
            talk          = true;
            delay_counter = 0f;
            //SoundController.instance.PlayEffect(talk_effect);
            source.Play();
        }

        if (talk)
        {
            if (delay_counter >= delay)
            {
                if (Game.stage == 0)
                {
                    if (!Game.spoke_to_bartender)
                    {
                        Textbox.CreateTextbox(intro, 0.005f);
                    }
                    else
                    {
                        Textbox.CreateTextbox(post_intro, 0.005f);
                    }
                }
                else if (Game.stage == 1)
                {
                    if (!talked_to)
                    {
                        Textbox.CreateTextbox(basement, 0.005f);
                    }
                    else
                    {
                        Textbox.CreateTextbox(self, 0.005f);
                    }
                }
                else if (Game.stage == 2)
                {
                    if (!talked_to)
                    {
                        Textbox.CreateTextbox(ruins, 0.005f);
                    }
                    else
                    {
                        Textbox.CreateTextbox(tavern, 0.005f);
                    }
                }
                else if (Game.stage == 3)
                {
                    if (!talked_to)
                    {
                        if (Game.puzzle == "lever")
                        {
                            Textbox.CreateTextbox(lever_puzzle, 00.005f);
                        }
                        else if (Game.puzzle == "button")
                        {
                            Textbox.CreateTextbox(button_puzzle, 0.005f);
                        }
                        else
                        {
                            Textbox.CreateTextbox(path_puzzle, 0.01f);
                        }
                    }
                    else
                    {
                        Textbox.CreateTextbox(gossip, 0.005f);
                    }
                }

                talk                    = false;
                talked_to               = true;
                delay_counter           = 0f;
                Game.spoke_to_bartender = true;
            }
            else
            {
                delay_counter += Time.deltaTime;
            }
        }

        UpdateActivity();
    }