Esempio n. 1
0
    // This function is called when we click the sphere
    public void Landed(string choiceType)
    {
        // at any time before we end the trial, we can assign our observations to the 'trial' dictionary
        // e.g.
        print("recieivng data" + choiceType);
        trialLogger.trial["Choice"] = choiceType.ToString();

        // now we end the trial, which stores data for this trial, then increments the trial number
        trialLogger.EndTrial();
        print("saved data" + choiceType);
        // if we are at the max number of trials, we quit the game
        // note: CSV is saved on exit automatically
        if (trialLogger.currentTrialNumber >= numberOfTrials)
        {
            QuitGame();
        }

        // here we could have some time for feedback, loading the next trial etc



        trialLogger.StartTrial();
    }
    // This function is called when we click the sphere
    public void SphereClicked(Vector3 spherePosition)
    {
        // at any time before we end the trial, we can assign our observations to the 'trial' dictionary
        // e.g.
        trialLogger.trial["sphere_x"] = spherePosition.x.ToString();
        trialLogger.trial["sphere_y"] = spherePosition.y.ToString();

        // now we end the trial, which stores data for this trial, then increments the trial number
        trialLogger.EndTrial();

        // if we are at the max number of trials, we quit the game
        // note: CSV is saved on exit automatically
        if (trialLogger.currentTrialNumber >= numberOfTrials)
        {
            QuitGame();
        }

        // here we could have some time for feedback, loading the next trial etc
        // but we will just start the next trial immediately
        trialLogger.StartTrial();

        // now we update the trial number on screen
        trialNumDisplay.UpdateTrialNumber(trialLogger.currentTrialNumber);
    }
Esempio n. 3
0
 public void Lose()
 {
     source.PlayOneShot(crash);
     logger.EndTrial();
 }
Esempio n. 4
0
    private void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.tag == "ThinkPlatforms_Tipo2")
        {
            if (other.gameObject.GetComponent <PensamentoNumberInfo>() != null)
            {
                if (other.gameObject.GetComponent <PensamentoNumberInfo>().numberPensamento == 1)
                {
                    pensamentoController_Script.tipo_resposta_Pesamento = "Resposta 1";
                }
                if (other.gameObject.GetComponent <PensamentoNumberInfo>().numberPensamento == 2)
                {
                    pensamentoController_Script.tipo_resposta_Pesamento = "Resposta 2";
                }
                if (other.gameObject.GetComponent <PensamentoNumberInfo>().numberPensamento == 3)
                {
                    pensamentoController_Script.tipo_resposta_Pesamento = "Resposta 3";
                }
            }
        }

        //if (other.gameObject.tag == "Botao")
        //{
        //    other.gameObject.SetActive(false);
        //}

        if (other.gameObject.CompareTag("FimDemo"))
        {
            mainScript_Canvas.agradecimentosNoah();
        }


        if (other.gameObject.tag == "BeginCityTest")
        {
            trialLogger.StartTrial();
            other.gameObject.SetActive(false);
        }

        if (other.gameObject.tag == "EndCityTest")
        {
            if (cityStateInfo == "MetroEscola")
            {
                trialLogger.trial["Local"] = "Metro Escola";
            }

            if (cityStateInfo == "PortariaMetro")
            {
                trialLogger.trial["Local"] = "Portaria Metro";
            }

            if (cityStateInfo == "PapelariaMercado")
            {
                trialLogger.trial["Local"] = "Papelaria Mercado";
            }
            trialLogger.EndTrial();
            other.gameObject.SetActive(false);
        }

        if (other.gameObject.tag == "DayTimeChange")
        {
            other.gameObject.SetActive(false);
            GOController.dayChangeNumber += 1;
            if (GOController.dayChangeNumber == 4)
            {
                GOController.activateDayChange = true;
            }
            //if (GOController.dayChangeNumber == 6)
            //{
            //    GOController.activateDayChange = true;
            //}
            if (GOController.dayChangeNumber <= 4)
            {
                StartCoroutine(ReturnDayTimeChangeOBJ(10, other.gameObject));
            }
        }

        if (GOController.deactActvAreas)
        {
            #region Activate Areas
            if (other.gameObject.name == "QuartoNoah_BG_ForCamera")
            {
                for (int i = 0; i < GOController.gameAreas.Length; i++)
                {
                    if (GOController.gameAreas[i].name == "QuartoNoah")
                    {
                        GOController.gameAreas[i].SetActive(true);
                    }
                }
            }

            if (other.gameObject.name == "SalaNoah_BG_ForCamera")
            {
                for (int i = 0; i < GOController.gameAreas.Length; i++)
                {
                    if (GOController.gameAreas[i].name == "SalaDeEstar")
                    {
                        GOController.gameAreas[i].SetActive(true);
                    }
                }
            }

            if (other.gameObject.name == "PortariaNoah_BG_ForCamera")
            {
                for (int i = 0; i < GOController.gameAreas.Length; i++)
                {
                    if (GOController.gameAreas[i].name == "Predio")
                    {
                        GOController.gameAreas[i].SetActive(true);
                    }
                }
            }

            if (other.gameObject.name == "Escola_BG_ForCamera")
            {
                for (int i = 0; i < GOController.gameAreas.Length; i++)
                {
                    if (GOController.gameAreas[i].name == "Escola")
                    {
                        GOController.gameAreas[i].SetActive(true);
                    }
                }
            }

            if (other.gameObject.name == "SalaAula_BG_ForCamera")
            {
                for (int i = 0; i < GOController.gameAreas.Length; i++)
                {
                    if (GOController.gameAreas[i].name == "SalaDeAula")
                    {
                        GOController.gameAreas[i].SetActive(true);
                    }
                }
            }

            // Nao colocar o refeitorio pois buga a mudança de tempo no dia
            if (other.gameObject.name == "Refeitorio_BG_ForCamera")
            {
                for (int i = 0; i < GOController.gameAreas.Length; i++)
                {
                    if (GOController.gameAreas[i].name == "Refeitorio")
                    {
                        GOController.gameAreas[i].SetActive(true);
                    }
                }
            }

            if (other.gameObject.name == "MetroEscola_BG_ForCamera")
            {
                for (int i = 0; i < GOController.gameAreas.Length; i++)
                {
                    if (GOController.gameAreas[i].name == "Rua_Parent")
                    {
                        GOController.gameAreas[i].SetActive(true);
                    }
                }
            }

            if (other.gameObject.name == "PapelariaMercado_BG_ForCamera")
            {
                for (int i = 0; i < GOController.gameAreas.Length; i++)
                {
                    if (GOController.gameAreas[i].name == "Dia_2_3_PapelariaMercado_BG")
                    {
                        GOController.gameAreas[i].SetActive(true);
                    }
                }
            }
            #endregion
        }
        #region Camera Bounds
        if (changeCameraSize)
        {
            // Camera Size = 5f
            if (other.gameObject.name == "Papelaria_BG_ForCamera" ||
                other.gameObject.name == "QuartoNoah_BG_ForCamera" ||
                other.gameObject.name == "SalaNoah_BG_ForCamera" ||
                other.gameObject.name == "Escola_BG_ForCamera" ||
                other.gameObject.name == "SalaAula_BG_ForCamera" ||
                other.gameObject.name == "Refeitorio_BG_ForCamera")
            {
                BoxCollider2D boxBounds = other.gameObject.GetComponent <BoxCollider2D>();
                camera2DFollow_Script.minCameraPos = boxBounds.bounds.min;
                camera2DFollow_Script.maxCameraPos = boxBounds.bounds.max;
                camera2DFollow_Script.halfHeight   = mainCamera.orthographicSize;
                camera2DFollow_Script.halfWidth    = camera2DFollow_Script.halfHeight * Screen.width / Screen.height;
                mainCamera.orthographicSize        = 5f;
            }
            //-----------------

            if (other.gameObject.name == "PortariaNoah_BG_ForCamera")
            {
                BoxCollider2D boxBounds = other.gameObject.GetComponent <BoxCollider2D>();
                camera2DFollow_Script.minCameraPos = boxBounds.bounds.min;
                camera2DFollow_Script.maxCameraPos = boxBounds.bounds.max;
                camera2DFollow_Script.halfHeight   = mainCamera.orthographicSize;
                camera2DFollow_Script.halfWidth    = camera2DFollow_Script.halfHeight * Screen.width / Screen.height;
                mainCamera.orthographicSize        = 5.36f;
            }

            // Camera Size = 5.83f
            if (other.gameObject.name == "MetroEscola_BG_ForCamera" ||
                other.gameObject.name == "PapelariaMercado_BG_ForCamera")
            {
                BoxCollider2D boxBounds = other.gameObject.GetComponent <BoxCollider2D>();
                camera2DFollow_Script.minCameraPos = boxBounds.bounds.min;
                camera2DFollow_Script.maxCameraPos = boxBounds.bounds.max;
                camera2DFollow_Script.halfHeight   = mainCamera.orthographicSize;
                camera2DFollow_Script.halfWidth    = camera2DFollow_Script.halfHeight * Screen.width / Screen.height;
                mainCamera.orthographicSize        = 5.83f;
            }

            if (other.gameObject.CompareTag("PensamentoEscolha"))
            {
                BoxCollider2D boxBounds = other.gameObject.GetComponent <BoxCollider2D>();
                camera2DFollow_Script.minCameraPos = boxBounds.bounds.min;
                camera2DFollow_Script.maxCameraPos = boxBounds.bounds.max;
                camera2DFollow_Script.halfHeight   = mainCamera.orthographicSize;
                camera2DFollow_Script.halfWidth    = camera2DFollow_Script.halfHeight * Screen.width / Screen.height;
                mainCamera.orthographicSize        = 7.05f;
            }
            //

            //if (other.gameObject.transform.name == "PapelariaMercado_BG_ForCamera")
            //{
            //    camera2DFollow_Script.minCameraPos = camera2DFollow_Script.Nivel3_PapelariaMercado_minCam_Pos;
            //    camera2DFollow_Script.maxCameraPos = camera2DFollow_Script.Nivel3_PapelariaMercado_maxCam_Pos;
            //    mainCamera.orthographicSize = 5.83f;
            //    cityStateInfo = "PapelariaMercado";
            //}
        }
        #endregion
    }
Esempio n. 5
0
 public void FinalLevel()
 {
     experimentController.Ender();
     experimentController.EndTrial();
 }
Esempio n. 6
0
    //private void checkResult_Pensamento_Tipo2()
    //{
    //    if (isPrologo)
    //    {
    //        if (tipo_resposta_Pesamento == "Resposta 1")
    //        {

    //        }
    //        if (tipo_resposta_Pesamento == "Resposta 2")
    //        {

    //        }
    //        if (tipo_resposta_Pesamento == "Resposta 3")
    //        {

    //        }
    //    }
    //}

    private void checkTrialLogger()
    {
        if (puzzleInfo == 0)
        {
            trialLogger.trial["Plataforma de escolha"] = "Prologo";
            if (tipo_resposta_Pesamento == "Resposta 1")
            {
                trialLogger.trial["Escolha"] = "Escolheu a caneta mais comum";
            }
            if (tipo_resposta_Pesamento == "Resposta 2")
            {
                trialLogger.trial["Escolha"] = "Escolheu a caneta mais ergonomica";
            }
            if (tipo_resposta_Pesamento == "Resposta 3")
            {
                trialLogger.trial["Escolha"] = "Escolheu a caneta mais estranha";
            }
            trialLogger.EndTrial();
        }

        if (puzzleInfo == 1)
        {
            trialLogger.trial["Plataforma de escolha"] = "Dia 1 - James";
            if (tipo_resposta_Pesamento == "Resposta 1")
            {
                trialLogger.trial["Escolha"] = "Sera que ele ta falando comigo mesmo?";
            }
            if (tipo_resposta_Pesamento == "Resposta 2")
            {
                trialLogger.trial["Escolha"] = "Devo responder por educacao?";
            }
            if (tipo_resposta_Pesamento == "Resposta 3")
            {
                trialLogger.trial["Escolha"] = "Talvez se eu der uma chance pra ele...";
            }
            trialLogger.EndTrial();
        }

        if (puzzleInfo == 2)
        {
            trialLogger.trial["Plataforma de escolha"] = "Dia 1 - Isaac";
            if (tipo_resposta_Pesamento == "Resposta 1")
            {
                trialLogger.trial["Escolha"] = "Acho que vou ficar na minha mesmo, outra pessoa deve saber";
            }
            if (tipo_resposta_Pesamento == "Resposta 2")
            {
                trialLogger.trial["Escolha"] = "Mas e se eu nao tiver 100% de certeza? E se eu acabar falando errado?";
            }
            if (tipo_resposta_Pesamento == "Resposta 3")
            {
                trialLogger.trial["Escolha"] = "Vou falar, eu ja vi esses nomes varias vezes, tenho certeza de quem sao.";
            }
            trialLogger.EndTrial();
        }

        if (puzzleInfo == 3)
        {
            trialLogger.trial["Plataforma de escolha"] = "Dia 2 - Sam";
            if (tipo_resposta_Pesamento == "Resposta 1")
            {
                trialLogger.trial["Escolha"] = "Provavelmente ela vai me zuar como as outras pessoas, acho melhor ficar quieto.";
            }
            if (tipo_resposta_Pesamento == "Resposta 2")
            {
                trialLogger.trial["Escolha"] = "Sera que vao me encher por eu jogar agora?";
            }
            if (tipo_resposta_Pesamento == "Resposta 3")
            {
                trialLogger.trial["Escolha"] = "Devo falar? Mas eu sou bom, espero que ela nao me ache convencido...";
            }
            trialLogger.EndTrial();
        }

        if (puzzleInfo == 4)
        {
            trialLogger.trial["Plataforma de escolha"] = "Dia 3 - Sam";
            if (tipo_resposta_Pesamento == "Resposta 1")
            {
                trialLogger.trial["Escolha"] = "O que sera que eu respondo? E seu eu falar algo que ela nao goste?";
            }
            if (tipo_resposta_Pesamento == "Resposta 2")
            {
                trialLogger.trial["Escolha"] = "Meu deus ela veio! Mas nao posso demonstrar que to muito feliz.";
            }
            if (tipo_resposta_Pesamento == "Resposta 3")
            {
                trialLogger.trial["Escolha"] = "Sera que devo fazer alguma brincadeira? Sera que ela nao ligaria?";
            }
            trialLogger.EndTrial();
        }

        if (puzzleInfo == 5)
        {
            trialLogger.trial["Plataforma de escolha"] = "Dia 4 - Kitty Kei";
            if (tipo_resposta_Pesamento == "Resposta 1")
            {
                trialLogger.trial["Escolha"] = "Acho que ela nem deve ta querendo saber pra valer, ela nem me conhece direito.";
            }
            if (tipo_resposta_Pesamento == "Resposta 2")
            {
                trialLogger.trial["Escolha"] = "Provavelmente ela so deve estar sendo educada.";
            }
            if (tipo_resposta_Pesamento == "Resposta 3")
            {
                trialLogger.trial["Escolha"] = "Essa professora ate que parece legal.";
            }
            trialLogger.EndTrial();
        }

        if (puzzleInfo == 6)
        {
            trialLogger.trial["Plataforma de escolha"] = "Dia 4 - Sam";
            if (tipo_resposta_Pesamento == "Resposta 1")
            {
                trialLogger.trial["Escolha"] = "Provavelmente ela nem quer que eu va…";
            }
            if (tipo_resposta_Pesamento == "Resposta 2")
            {
                trialLogger.trial["Escolha"] = "Sera que ela quer mesmo que eu va?";
            }
            if (tipo_resposta_Pesamento == "Resposta 3")
            {
                trialLogger.trial["Escolha"] = "Talvez eu deva aceitar… Nunca se sabe quando alguem vai querer sair comigo de novo…";
            }
            trialLogger.EndTrial();
        }

        if (puzzleInfo == 7)
        {
            trialLogger.trial["Plataforma de escolha"] = "Dia 5";
            if (tipo_resposta_Pesamento == "Resposta 1")
            {
                trialLogger.trial["Escolha"] = "Esse jogo é mais focado no online, sera que eu deveria pegar? Interagir com pessoas…";
            }
            if (tipo_resposta_Pesamento == "Resposta 2")
            {
                trialLogger.trial["Escolha"] = "Esse jogo tem algo entre o online e jogar sozinho… Nao seria obrigado a interagir com pessoas, mas ainda poderia ter a chance…";
            }
            if (tipo_resposta_Pesamento == "Resposta 3")
            {
                trialLogger.trial["Escolha"] = "Hmmmm… Esse é legal, jogar completamente sozinho…";
            }
            trialLogger.EndTrial();
        }
    }