Beispiel #1
0
    public IEnumerator teleporteComIMGs()
    {
        if (scriptTeleporte.comendoDia1)
        {
            scriptTeleporte.noahComendo_Dia1.enabled = true;
        }
        else if (scriptTeleporte.comendoDia2)
        {
            scriptTeleporte.noahComendo_Dia2.enabled = true;
        }
        else if (scriptTeleporte.comendoDia3)
        {
            scriptTeleporte.noahComendo_Dia3.enabled = true;
        }
        else if (scriptTeleporte.mercado)
        {
            scriptTeleporte.noahMercado.enabled = true;
        }
        else if (scriptTeleporte.papelaria)
        {
            scriptTeleporte.noahPapelaria.enabled = true;
        }
        scriptPlatformer2DUserControl.iNeverFreeze = false;
        yield return(new WaitForSeconds(3f));

        scriptTeleporte.teleportar();
        scriptTeleporte.gameObject.SetActive(false);
        scriptPlatformer2DUserControl.iNeverFreeze = true;
        yield return(new WaitForSeconds(0.5f));

        scriptTeleporte.noahComendo_Dia1.enabled = false;
        scriptTeleporte.noahComendo_Dia2.enabled = false;
        scriptTeleporte.noahComendo_Dia3.enabled = false;
        scriptTeleporte.noahMercado.enabled      = false;
        scriptTeleporte.noahPapelaria.enabled    = false;
    }
Beispiel #2
0
    IEnumerator sairDaSala()
    {
        script_Audio_MainScript.tocar_SinalEscola();
        img_efeito_minigame.gameObject.SetActive(true);
        yield return(new WaitForSeconds(1.5f));

        teleportePescola.teleportar();
        teleporteEscola.SetActive(false);
        panel.SetActive(false);

        yield return(new WaitForSeconds(1.5f));

        Cursor.visible = false;
        script_Platformer2DUserControl.iNeverFreeze = true;
        img_efeito_minigame.gameObject.SetActive(false);
        panel.SetActive(true);
        gameObject.SetActive(false);
    }
    public IEnumerator sairDaSala()
    {
        script_Audio_MainScript.tocar_SinalEscola();
        state = FSMState.Entry;
        if (gameObject.name != "_NPCs_(SALADEAULA)_1")
        {
            if (gameObject.name != "_NPCs_(SALADEAULA)_2")
            {
                if (gameObject.name != "_NPCs_(SALADEAULA)_3")
                {
                    img_efeito_minigame.gameObject.SetActive(true);
                }
            }
        }

        if (SceneManager.GetActiveScene().buildIndex == 3)
        {
            scrip_Main_Memoria.countFINAL = 0;
        }

        yield return(new WaitForSeconds(1.5f));

        desativarTUDO();
        script_Platformer2DUserControl.iNeverFreeze = true;
        script_Teleporte.teleportar();
        script_Teleporte.enabled = false;
        //script_pensamentoController.trocaPosicao_PTipo1 = true;
        state = FSMState.SoDeBoa;
        yield return(new WaitForSeconds(1.5f));

        if (gameObject.name != "_NPCs_(SALADEAULA)_1")
        {
            if (gameObject.name != "_NPCs_(SALADEAULA)_2")
            {
                if (gameObject.name != "_NPCs_(SALADEAULA)_3")
                {
                    img_efeito_minigame.gameObject.SetActive(false);
                }
            }
        }
    }
Beispiel #4
0
    IEnumerator sairDaSala()
    {
        if (SceneManager.GetActiveScene().name == "Dia_1")
        {
            teleporteSaindoAula2.SetActive(false);
        }
        script_Audio_MainScript.tocar_SinalEscola();
        img_efeito_minigame.gameObject.SetActive(true);
        yield return(new WaitForSeconds(1.5f));

        teleportePescola.teleportar();
        teleporteEscola.SetActive(false);
        panel.SetActive(false);

        yield return(new WaitForSeconds(1.5f));

        img_efeito_minigame.gameObject.SetActive(false);
        script_Platformer2DUserControl.iNeverFreeze = true;
        gameObject.SetActive(false);
        panel.SetActive(true);
    }
    public IEnumerator sairDaSala_2()
    {
        script_Audio_MainScript.tocar_SinalEscola();
        script_TeleporteSAM.gameObject.SetActive(true);
        state = FSMState.Entry;
        img_efeito_minigame.gameObject.SetActive(true);
        yield return(new WaitForSeconds(1.5f));

        Cursor.visible = false;
        script_Platformer2DUserControl.iNeverFreeze = true;
        desativarTUDO();
        script_TeleporteSAM.teleportar();
        if (SceneManager.GetActiveScene().buildIndex == 4)
        {
            CompleteAFrase.SetActive(false);
        }
        script_TeleporteSAM.gameObject.SetActive(false);
        //script_pensamentoController.trocaPosicao_PTipo1 = true;
        state = FSMState.SoDeBoa;
        yield return(new WaitForSeconds(1.5f));

        img_efeito_minigame.gameObject.SetActive(false);
    }
    public void passarObj()
    {
        current_objs_array_index += 1;

        if (!isso_é_resposta_de_algo)
        {
            for (int i = 0; i < objs_de_dialogo.Length; i++)
            {
                if (current_objs_array_index == objs_de_dialogo.Length - 1)
                {
                    objs_de_dialogo[i].SetActive(false);
                    script_Platformer2DUserControl.iNeverFreeze = true;
                    player_canvas.enabled = false;
                    // current_objs_array_index = 0;
                    state = FSMState.SoDeBoa;
                    exclamationSprite.SetActive(true);
                    _caixaMental.SetActive(false);
                    if (interagir_somente_1_vez)
                    {
                        boxC.enabled = false;
                    }
                    else
                    {
                        boxC.enabled = true;
                    }

                    if (ativar_minigame_p1)
                    {
                        StartCoroutine(irParaMiniGames_P1());
                        script_Platformer2DUserControl.iNeverFreeze = true;
                    }
                    else if (ativar_minigame_p2)
                    {
                        StartCoroutine(irParaMiniGames_P2());
                        script_Platformer2DUserControl.iNeverFreeze = true;
                    }
                    else
                    {
                        script_Platformer2DUserControl.iNeverFreeze = true;
                        if (gameObject.name == "depois_notidiLeonard")
                        {
                            StartCoroutine(finalizarDia());
                            boxC.enabled = false;
                        }
                        else
                        {
                            gameObject.SetActive(false);
                        }
                    }
                    if (gameObject.name == "_ANTESDETELEPORTAR_")
                    {
                        teleporte_escola_sala_Dia_1.teleportar();
                    }
                    if (gameObject.name == "NoahForoSAM")
                    {
                        //script_Controller_Assorted_Dialogues_Notifi_leonard_foto_noah_HELP_ACIMA.StartCoroutine(Dia_4_finalizarDia());
                    }
                    if (gameObject.name == "Comida")
                    {
                        //teleporte_escola_sala_Dia_1.teleportar();
                        colisorParaRefeitorio.SetActive(true);
                    }
                    if (gameObject.name == "MesaSozinho")
                    {
                        //teleporte_escola_sala_Dia_1.teleportar();
                        colisorParaRefeitorio.SetActive(false);
                    }
                    if (gameObject.name == "_NPCs_(SALADEAULA2)")
                    {
                        /*// print("sdfasfsaf");
                         * _caixaMental.SetActive(false);
                         * script_Platformer2DUserControl.iNeverFreeze = false;*/
                        CacaPalavras.SetActive(true);

                        /* state = FSMState.Entry;
                         * colisorParaRefeitorio.SetActive(false);*/
                    }
                    if (gameObject.name == "Aula_MemoriaGame")
                    {
                        /*// print("sdfasfsaf");
                         * _caixaMental.SetActive(false);
                         * script_Platformer2DUserControl.iNeverFreeze = false;*/
                        JogoMemoria.SetActive(true);

                        /* state = FSMState.Entry;
                         * colisorParaRefeitorio.SetActive(false);*/
                    }
                    if (gameObject.name == "SamChega_Dia2Resposta_2")
                    {
                        script_movimento_Sam.movimento  = true;
                        script_movimento_Sam.velocidade = -5;
                        //conversaVoltando_2.SetActive(true);
                        gameObject.SetActive(true);
                        StartCoroutine(sairSAM());
                    }
                    if (gameObject.name == "SamEncontraNoah_Resposta2_2")
                    {
                        script_movimento_Sam.movimento  = true;
                        script_movimento_Sam.velocidade = -10;
                        // conversaVoltando_2.SetActive(true);
                        gameObject.SetActive(true);
                        StartCoroutine(sairSAM());
                    }
                    if (gameObject.name == "Aula_perguntandoSam")
                    {
                        gameObject.SetActive(true);
                        StartCoroutine(sairDaSala_2());
                    }
                    if (gameObject.name == "Aula_CompleteAFrase")
                    {
                        CompleteAFrase.SetActive(true);
                    }
                    if (gameObject.name == "Notifi_leonard_foto_noah_HELP_ACIMA")
                    {
                        script_Controller_Assorted_Dialogues_Notifi_leonard_foto_noah_HELP_ACIMA.StartCoroutine(script_Controller_Assorted_Dialogues_Notifi_leonard_foto_noah_HELP_ACIMA.Dia_3_finalizarDia());
                    }
                    if (gameObject.name == "VACA")
                    {
                        vaca_2.SetActive(true);
                        //state = FSMState.Notificacao;
                    }

                    if (gameObject.name == "VACA_HELP_ACIMA")
                    {
                        script_Canvas_MainScript.StartCoroutine(script_Canvas_MainScript.coroutineApresentacaoNOAH());
                        //state = FSMState.Notificacao;
                    }

                    if (gameObject.name == "NoahForoSAM")
                    {
                        img_SamGrandona.SetActive(false);
                    }
                }
                else if (objs_de_dialogo[i] != objs_de_dialogo[current_objs_array_index])
                {
                    objs_de_dialogo[i].SetActive(false);
                }
                else
                {
                    objs_de_dialogo[current_objs_array_index].SetActive(true);
                }
            }
        }
        else
        {
            if (script_pensamentoController.tipo_resposta_Pesamento == "Resposta 1")
            {
                for (int i = 0; i < objs_de_dialogo_R1.Length; i++)
                {
                    if (objs_de_dialogo_R1[i] != objs_de_dialogo_R1[current_objs_array_index])
                    {
                        objs_de_dialogo_R1[i].SetActive(false);
                    }
                    else
                    {
                        objs_de_dialogo_R1[current_objs_array_index].SetActive(true);
                    }


                    if (current_objs_array_index == objs_de_dialogo_R1.Length - 1)
                    {
                        objs_de_dialogo_R1[i].SetActive(false);
                        script_Platformer2DUserControl.iNeverFreeze = true;
                        player_canvas.enabled = false;
                        // current_objs_array_index = 0;
                        state = FSMState.SoDeBoa;
                        exclamationSprite.SetActive(true);
                        _caixaMental.SetActive(false);
                        if (gameObject.name == "_NPCs_(SALADEAULA)RESPOSTA")
                        {
                            StartCoroutine(sairDaSala());
                        }

                        /* if (gameObject.name == "_NPCs_(SALADEAULA)RESPOSTA")
                         * {
                         *   StartCoroutine(sairDaSala());
                         * }*/
                        if (gameObject.name == "SamChega_Dia2Resposta")
                        {
                            conversaVoltando_2.SetActive(true);
                            gameObject.SetActive(false);
                        }
                        if (gameObject.name == "SamEncontraNoah_Resposta2")
                        {
                            conversaVoltando_2.SetActive(true);
                            gameObject.SetActive(false);
                        }
                    }
                }
            }
            else if (script_pensamentoController.tipo_resposta_Pesamento == "Resposta 2")
            {
                for (int i = 0; i < objs_de_dialogo_R2.Length; i++)
                {
                    if (objs_de_dialogo_R2[i] != objs_de_dialogo_R2[current_objs_array_index])
                    {
                        objs_de_dialogo_R2[i].SetActive(false);
                    }
                    else
                    {
                        objs_de_dialogo_R2[current_objs_array_index].SetActive(true);
                    }


                    if (current_objs_array_index == objs_de_dialogo_R2.Length - 1)
                    {
                        objs_de_dialogo_R2[i].SetActive(false);
                        script_Platformer2DUserControl.iNeverFreeze = true;
                        player_canvas.enabled = false;
                        // current_objs_array_index = 0;
                        state = FSMState.SoDeBoa;
                        exclamationSprite.SetActive(true);
                        _caixaMental.SetActive(false);
                        if (gameObject.name == "_NPCs_(SALADEAULA)RESPOSTA")
                        {
                            StartCoroutine(sairDaSala());
                        }
                        if (gameObject.name == "SamChega_Dia2Resposta")
                        {
                            conversaVoltando_2.SetActive(true);
                            gameObject.SetActive(false);
                        }
                        if (gameObject.name == "SamEncontraNoah_Resposta2")
                        {
                            conversaVoltando_2.SetActive(true);
                            gameObject.SetActive(false);
                        }
                    }
                }
            }
            else if (script_pensamentoController.tipo_resposta_Pesamento == "Resposta 3")
            {
                for (int i = 0; i < objs_de_dialogo_R3.Length; i++)
                {
                    if (objs_de_dialogo_R3[i] != objs_de_dialogo_R3[current_objs_array_index])
                    {
                        objs_de_dialogo_R3[i].SetActive(false);
                    }
                    else
                    {
                        objs_de_dialogo_R3[current_objs_array_index].SetActive(true);
                    }

                    if (current_objs_array_index == objs_de_dialogo_R3.Length - 1)
                    {
                        objs_de_dialogo_R3[i].SetActive(false);
                        script_Platformer2DUserControl.iNeverFreeze = true;
                        player_canvas.enabled = false;
                        // current_objs_array_index = 0;
                        state = FSMState.SoDeBoa;
                        exclamationSprite.SetActive(true);
                        _caixaMental.SetActive(false);
                        if (gameObject.name == "_NPCs_(SALADEAULA)RESPOSTA")
                        {
                            StartCoroutine(sairDaSala());
                        }
                        if (gameObject.name == "SamChega_Dia2Resposta")
                        {
                            conversaVoltando_2.SetActive(true);
                            gameObject.SetActive(false);
                        }
                        if (gameObject.name == "SamEncontraNoah_Resposta2")
                        {
                            conversaVoltando_2.SetActive(true);
                            gameObject.SetActive(false);
                        }
                    }
                }
            }
        }
    }
Beispiel #7
0
    void mental_State()
    {
        if (!esta_voltando_minigame_Mental)
        {
            if (gameObject.name == "Estante_IT")
            {
                imgCanetas.enabled = true;
            }
            if (Noah_pensa_depois)
            {
                main_Sprite.sprite      = array_sprite_depois_doInicial[current_array_index_Mental];
                player_text_mental.text = array_mental_depois_doInicial[current_array_index_Mental];

                if (current_array_index_Mental == array_mental_depois_doInicial.Length - 1)
                {
                    if (ativar_minigame_P1)
                    {
                        StartCoroutine(irParaMiniGames_P1());
                    }
                    else if (ativar_minigame_P2)
                    {
                        StartCoroutine(irParaMiniGames_P2());
                    }
                    else
                    {
                        desativaBang_Balao();
                        desativaBang_Mental();
                        state = FSMState.soDeBoa;
                    }
                }
            }
            else
            {
                main_Sprite.sprite      = array_sprite_inicial[current_array_index_Mental];
                player_text_mental.text = array_dialogo_inicial[current_array_index_Mental];


                if (current_array_index_Mental == array_dialogo_inicial.Length - 1)
                {
                    if (gameObject.name == "indoDormir")
                    {
                        img_efeito_minigame.gameObject.SetActive(true);
                        StartCoroutine(acabandoDia1());
                    }
                    if (gameObject.name == "Comida_IT")
                    {
                        print("asfasfasfasf");
                        aula1.SetActive(false);
                        aula2.SetActive(true);
                        sala1.SetActive(false);
                        sala2.SetActive(true);
                    }
                    if (ativar_minigame_P1)
                    {
                        StartCoroutine(irParaMiniGames_P1());
                    }
                    else if (ativar_minigame_P2)
                    {
                        StartCoroutine(irParaMiniGames_P2());
                    }
                    else
                    {
                        if (gameObject.name == "SalaDeAula_IT")
                        {
                            script_teleporte.teleportar();
                        }
                        desativaBang_Balao();
                        desativaBang_Mental();
                        state = FSMState.soDeBoa;
                    }
                }
            }
        }
        else
        {
            player_text_mental.text = array_mental_depois_minigame[current_array_index_Mental];
            main_Sprite.sprite      = array_sprite_depois_minigame[current_array_index_Mental];

            if (current_array_index_Mental == array_mental_depois_minigame.Length - 1)
            {
                desativaBang_Balao();
                desativaBang_Mental();
                state = FSMState.soDeBoa;
            }
        }
    }