예제 #1
0
    public void sendPerformancePinch()
    {
        PerformanceController performanceCtrl = new PerformanceController();

        performanceCtrl.addPerformance(this.AllGrabLeft, "30");
        performanceCtrl.addPerformance(this.AllGrabRigth, "10");
    }
예제 #2
0
 public void SendPerformance()
 {
     if (withFlexionExtension == true)
     {
         PerformanceController performanceCtrl = new PerformanceController();
         performanceCtrl.addPerformance((int)this.Flexion, "31");
         performanceCtrl.addPerformance((int)this.Extension, "32");
     }
 }
예제 #3
0
    public void sendPerformanceTouch()
    {
        PerformanceController performanceCtrl = new PerformanceController();

        performanceCtrl.addPerformance((int)handsManager.indexFlexionThreshold, "17");
        performanceCtrl.addPerformance((int)handsManager.middleFlexionThreshold, "18");
        performanceCtrl.addPerformance((int)handsManager.pinkyFlexionThreshold, "19");
        performanceCtrl.addPerformance((int)handsManager.indexFlexionThreshold, "20");
    }
예제 #4
0
    public void sendPerformanceTouch()
    {
        MoleBodyBehaviour     molesBh         = new MoleBodyBehaviour();
        PerformanceController performanceCtrl = new PerformanceController();

        performanceCtrl.addPerformance(this.FpinchMiddleL, "27");
        performanceCtrl.addPerformance(this.FpinchIndexL, "26");
        performanceCtrl.addPerformance(this.FpinchRingL, "25");
        performanceCtrl.addPerformance(this.FpinchPinkL, "28");
        performanceCtrl.addPerformance(this.FpinchThumbL, "29");
    }
    public void EndGame()
    {
        MainPanel.SetActive(false);
        PauseButton.SetActive(false);
        ResultPanel.SetActive(true);

        //print("puntos, " + total + " totales " + score +" deberia ser "+((score/total)*100));
        StopAllCoroutines();
        GiantRobot.enabled = false;
        InGame             = false;
        int    result     = Mathf.RoundToInt((score / total) * 100);
        string idMinigame = "2";
        GameSessionController gameCtrl = new GameSessionController();

        gameCtrl.addGameSession(result, this.FinalTotalRepetition, this.FinalTotalTime, score, idMinigame);
        results.Minigame = idMinigame;
        results          = ResultPanel.GetComponent <PutDataResults>();
        results.updateData(result, 0);

        int angle = (int)Maxangle;
        PerformanceController performanceCtrl = new PerformanceController();

        performanceCtrl.addPerformance(angle, this.GetMovement());

        //ParametersFIght pmFight = ParametersFIght();
        if (PlaylistManager.pm != null && PlaylistManager.pm.active)
        {
            PlaylistManager.pm.NextGame();
        }
        ;
    }
예제 #6
0
    public void EndGame()
    {
        //saveData ();

        int    performance_game      = Mathf.RoundToInt(((float)score_script.score_obtain / (float)score_script.score_max) * 100);
        int    performance_loaded_BD = 0;
        string idMinigame            = "6";

        results_script.Minigame = idMinigame;
        GameSessionController gameCtrl = new GameSessionController();

        if (modo_juego == 1)
        {
            gameCtrl.addGameSession(performance_game, select_jugabilidad, 0, score_script.score_obtain, idMinigame);
        }
        if (modo_juego == 1)
        {
            gameCtrl.addGameSession(performance_game, 0, select_jugabilidad, score_script.score_obtain, idMinigame);
        }
        results_script.updateData(performance_game, performance_loaded_BD);
        gestureManager.SetActive(false);
        spawnnerEnemies.can_spawn = false;
        hasStart = false;
        //paramenters_canvas.SetActive (true);

        PerformanceController performanceCtrl = new PerformanceController();

        performanceCtrl.addPerformance((int)Range, "38");

        FinalAnimation();
        if (PlaylistManager.pm != null && PlaylistManager.pm.active)
        {
            PlaylistManager.pm.NextGame();
        }
    }
    public void EndGame()
    {
        int performance_game = 0;

        if (score_script.score_max > 0)
        {
            performance_game = Mathf.RoundToInt(((float)score_script.score_obtain / (float)score_script.score_max) * 100);
        }

        int    performance_loaded_BD   = 0;
        string idMinigame              = "9";
        GameSessionController gameCtrl = new GameSessionController();

        if (HoldParametersVecinosInvasores.use_time == true)
        {
            gameCtrl.addGameSession(performance_game, 0, HoldParametersVecinosInvasores.select_jugabilidad, score_script.score_obtain, idMinigame);
        }
        if (HoldParametersVecinosInvasores.use_time == false)
        {
            gameCtrl.addGameSession(performance_game, HoldParametersVecinosInvasores.select_jugabilidad, 0, score_script.score_obtain, idMinigame);
        }


        PerformanceController performanceCtrl = new PerformanceController();

        if (HoldParametersVecinosInvasores.type_game == 0)
        {
            performanceCtrl.addPerformance(score_script.TouchPositive, "9");
        }
        if (HoldParametersVecinosInvasores.type_game == 1)
        {
            performanceCtrl.addPerformance(score_script.TouchPositive, "10");
        }
        results_script.Minigame = idMinigame;
        results_script.updateData(performance_game, performance_loaded_BD);

        hasStart = false;
        foreach (MonoBehaviour behaviour in array_scrips_disabled)
        {
            behaviour.enabled = false;
        }

        FinalAnimation();
    }
예제 #8
0
    public void sendPerformancePinch()
    {
        PerformanceController performanceCtrl = new PerformanceController();

        performanceCtrl.addPerformance(keysManager.FpinchMiddleL, "23");
        performanceCtrl.addPerformance(keysManager.FpinchIndexL, "21");
        performanceCtrl.addPerformance(keysManager.FpinchRingL, "24");
        performanceCtrl.addPerformance(keysManager.FpinchPinkL, "22");
        performanceCtrl.addPerformance(keysManager.FpinchMiddleR, "23");
        performanceCtrl.addPerformance(keysManager.FpinchIndexR, "21");
        performanceCtrl.addPerformance(keysManager.FpinchRingR, "24");
        performanceCtrl.addPerformance(keysManager.FpinchPinkR, "22");
    }
예제 #9
0
    public void finalizarJuego()
    {
        //guardarDatos ();
        repeticionesRestantes = 0;
        repeticionesText.text = "0/0";
        game_over             = true;


        print("acabo juego");
        desempenio = (puntos / repeticionesTotales) * 100;
        string idMinigame            = "4";
        int    performance_loaded_BD = 0;

        panelResultados.SetActive(true);
        GameSessionController gameCtrl = new GameSessionController();

        if (modoPlay == 0)
        {
            float rep = 0;
            gameCtrl.addGameSession(desempenio, rep, valorPlay, desempenio, idMinigame);
            PerformanceController performanceCtrl = new PerformanceController();
            int angle = (int)anguloMax;

            performanceCtrl.addPerformance(angle, this.GetMovement());
        }
        if (modoPlay == 1)
        {
            float timer = 0;
            int   angle = (int)anguloMax;
            gameCtrl.addGameSession(desempenio, valorPlay, timer, desempenio, idMinigame);
            PerformanceController performanceCtrl = new PerformanceController();
            performanceCtrl.addPerformance(angle, this.GetMovement());
        }
        Debug.Log(desempenio);
        Debug.Log(performance_loaded_BD);
        Debug.Log(resultados + "resultados");
        if (resultados != null)
        {
            Debug.Log("entre");
            resultados.Minigame = idMinigame;

            resultados.updateData(desempenio, performance_loaded_BD);
        }

        if (PlaylistManager.pm != null && PlaylistManager.pm.active)
        {
            PlaylistManager.pm.NextGame();
        }

        //hasStart = false;
    }
예제 #10
0
    public void EndGame()
    {
        //saveData ();

        int angle = (int)HoldParametersGreatJourney.select_angle_max;
        GameSessionController gameCtrl = new GameSessionController();

        int    performance_game      = Mathf.RoundToInt(((float)score_script.score_obtain / (float)score_script.score_max) * 100);
        int    performance_loaded_BD = 0;
        string idMinigame            = "3";

        if (HoldParametersGreatJourney.use_time == true)
        {
            float repetitionsC = 0;
            gameCtrl.addGameSession(performance_game, repetitionsC, HoldParametersGreatJourney.select_jugabilidad, score_script.score_obtain, idMinigame);
        }
        if (HoldParametersGreatJourney.use_time == false)
        {
            float repetitionsC = 0;
            gameCtrl.addGameSession(performance_game, HoldParametersGreatJourney.select_jugabilidad, repetitionsC, score_script.score_obtain, idMinigame);
        }
        PerformanceController performanceCtrl = new PerformanceController();

        performanceCtrl.addPerformance(angle, this.GetMovement());
        results_script.Minigame = "3";
        results_script.updateData(performance_game, performance_loaded_BD);

        hasStart = false;
        //paramenters_canvas.SetActive (true);
        foreach (MonoBehaviour behaviour in array_scrips_disabled)
        {
            behaviour.enabled = false;
        }

        FinalAnimation();



        if (PlaylistManager.pm != null && PlaylistManager.pm.active)
        {
            PlaylistManager.pm.NextGame();
        }
    }
예제 #11
0
    public void EndGame()
    {
        /*_angleMinLeft = 0;
         * sliderMinLeft.value = 0;
         * sliderLeft.value = 0;
         * _angleLeft = 0;*/

        MainPanel.SetActive(false);
        pausa.SetActive(false);
        ResultPanel.SetActive(true);
        danceTaichi.SetActive(false);
        danceUnityChan.SetActive(false);
        StopAllCoroutines();
        InGame = false;
        int    result     = Mathf.RoundToInt((score / lanzamiento) * 100);
        string idMinigame = "1";

        //print(lanzamiento);
        movimientoLateral = false;
        int angle = (int)_angleLeft;
        GameSessionController gameCtrl = new GameSessionController();

        gameCtrl.addGameSession(score, this.FinalTotalRepetition, this.FinalTotalTime, result, idMinigame);
        PerformanceController performanceCtrl = new PerformanceController();

        performanceCtrl.addPerformance(angle, this.GetMovement());
        results          = ResultPanel.GetComponent <PutDataResults>();
        results.Minigame = idMinigame;
        results.updateData(result, 0);


        if (PlaylistManager.pm != null && PlaylistManager.pm.active)

        {
            PlaylistManager.pm.NextGame();
        }
    }
예제 #12
0
    public void EndGame()
    {
        player.SetActive(false);
        mainPanel.SetActive(false);
        string idMiniGame = "7";

        TherapySessionObject objTherapy = TherapySessionObject.tso;

        if (objTherapy != null)
        {
            //objTherapy.fillLastSession(score, fullScore, (int)totalTime, "0");
            //objTherapy.saveLastGameSession();

            //objTherapy.savePerformance((int)kickScript.BestLeftHipFrontAngle, "4");
            //objTherapy.savePerformance((int)kickScript.BestRightHipFrontAngle, "5");
        }
        GameSessionDAO gameDao = new GameSessionDAO();
        int            finalScore;

        if (fullScore > 0)
        {
            finalScore = (int)(((float)score / fullScore) * 100.0f);
        }
        else
        {
            finalScore = 0;
        }
        resultsScoreText.text = "Desempeño: " + finalScore + "%";

        //int angle = (int)_angleLeft;
        GameSessionController gameCtrl        = new GameSessionController();
        PerformanceController performanceCtrl = new PerformanceController();

        if (this.withTime == true)
        {
            if (JogBool == true && CrouchBool == true && JumpBool == true)
            {
                gameCtrl.addGameSession(finalScore, 0, totalTime, score, idMiniGame);
                performanceCtrl.addPerformance((int)JogThreshold, "16");
                performanceCtrl.addPerformance((int)CrouchThreshold, "8");
                performanceCtrl.addPerformance((int)JumpThreshold, "7");
            }
            if (JogBool == false && CrouchBool == true && JumpBool == true)
            {
                gameCtrl.addGameSession(finalScore, 0, totalTime, score, idMiniGame);
                performanceCtrl.addPerformance((int)CrouchThreshold, "8");
                performanceCtrl.addPerformance((int)JumpThreshold, "7");
            }
            if (JogBool == false && CrouchBool == false && JumpBool == true)
            {
                gameCtrl.addGameSession(finalScore, 0, totalTime, score, idMiniGame);
                performanceCtrl.addPerformance((int)JumpThreshold, "7");
            }
            if (JogBool == false && CrouchBool == true && JumpBool == false)
            {
                gameCtrl.addGameSession(finalScore, 0, totalTime, score, idMiniGame);
                performanceCtrl.addPerformance((int)CrouchThreshold, "8");
            }
            if (JogBool == true && CrouchBool == false && JumpBool == true)
            {
                gameCtrl.addGameSession(finalScore, 0, totalTime, score, idMiniGame);
                performanceCtrl.addPerformance((int)JogThreshold, "16");
                performanceCtrl.addPerformance((int)JumpThreshold, "7");
            }
            if (JogBool == true && CrouchBool == true && JumpBool == false)
            {
                gameCtrl.addGameSession(finalScore, 0, totalTime, score, idMiniGame);
                performanceCtrl.addPerformance((int)JogThreshold, "16");
                performanceCtrl.addPerformance((int)CrouchThreshold, "8");
            }
            if (JogBool == true && CrouchBool == false && JumpBool == false)
            {
                gameCtrl.addGameSession(finalScore, 0, totalTime, score, idMiniGame);
                performanceCtrl.addPerformance((int)JogThreshold, "16");
            }
        }
        if (this.withTime == false)
        {
            if (JogBool == true && CrouchBool == true && JumpBool == true)
            {
                gameCtrl.addGameSession(finalScore, 0, totalRepetitions, score, idMiniGame);
                performanceCtrl.addPerformance((int)JogThreshold, "16");
                performanceCtrl.addPerformance((int)CrouchThreshold, "8");
                performanceCtrl.addPerformance((int)JumpThreshold, "7");
            }
            if (JogBool == false && CrouchBool == true && JumpBool == true)
            {
                gameCtrl.addGameSession(finalScore, 0, totalRepetitions, score, idMiniGame);
                performanceCtrl.addPerformance((int)CrouchThreshold, "8");
                performanceCtrl.addPerformance((int)JumpThreshold, "7");
            }
            if (JogBool == false && CrouchBool == false && JumpBool == true)
            {
                gameCtrl.addGameSession(finalScore, 0, totalRepetitions, score, idMiniGame);
                performanceCtrl.addPerformance((int)JumpThreshold, "7");
            }
            if (JogBool == false && CrouchBool == true && JumpBool == false)
            {
                gameCtrl.addGameSession(finalScore, 0, totalRepetitions, score, idMiniGame);
                performanceCtrl.addPerformance((int)CrouchThreshold, "8");
            }
            if (JogBool == true && CrouchBool == false && JumpBool == true)
            {
                gameCtrl.addGameSession(finalScore, 0, totalRepetitions, score, idMiniGame);
                performanceCtrl.addPerformance((int)JogThreshold, "16");
                performanceCtrl.addPerformance((int)JumpThreshold, "7");
            }
            if (JogBool == true && CrouchBool == true && JumpBool == false)
            {
                gameCtrl.addGameSession(finalScore, 0, totalRepetitions, score, idMiniGame);
                performanceCtrl.addPerformance((int)JogThreshold, "16");
                performanceCtrl.addPerformance((int)CrouchThreshold, "8");
            }
            if (JogBool == true && CrouchBool == false && JumpBool == false)
            {
                gameCtrl.addGameSession(finalScore, 0, totalRepetitions, score, idMiniGame);
                performanceCtrl.addPerformance((int)JogThreshold, "16");
            }
        }

        if (objTherapy != null)
        {
            resultsBestScoreText.text = "Mejor: " + objTherapy.getGameRecord() + "%";
        }
        else
        {
            resultsBestScoreText.text = "Mejor:" + gameDao.GetScore(idMiniGame) + "%";
        }

        if (finalScore <= 60)
        {
            //resultMessage.GetComponent<TextMesh>().text = "¡Muy bien!";
            star1.sprite = starOn;
            star2.sprite = starOff;
            star3.sprite = starOff;
        }
        else if (finalScore <= 90)
        {
            //resultMessage.GetComponent<TextMesh>().text = "¡Grandioso!";
            star1.sprite = starOn;
            star2.sprite = starOn;
            star3.sprite = starOff;
        }
        else if (finalScore <= 100)
        {
            //resultMessage.GetComponent<TextMesh>().text = "¡Increíble!";
            star1.sprite = starOn;
            star2.sprite = starOn;
            star3.sprite = starOn;
        }

        StartCoroutine(DelayedFinalAnimation());
        //resultsPanel.SetActive(true);
    }
    public void SaveAndShowResults()
    {
        TherapySessionObject objTherapy = TherapySessionObject.tso;

        if (objTherapy != null)
        {
            objTherapy.fillLastSession(score, totalRepetitions, (int)totalTime, level.ToString());
            objTherapy.saveLastGameSession();

            objTherapy.savePerformance((int)kickScript.BestLeftHipFrontAngle, "4");
            objTherapy.savePerformance((int)kickScript.BestRightHipFrontAngle, "5");
        }
        string         idMinigame = "5";
        GameSessionDAO gameDao    = new GameSessionDAO();
        int            finalScore;

        if (totalRepetitions > 0)
        {
            finalScore = (int)(((float)score / totalRepetitions) * 100.0f);
        }
        else
        {
            finalScore = 0;
        }
        resultsScoreText.text = "Desempeño: " + finalScore + "%";

        float totalRepFloat = (float)totalRepetitions;
        ParametersScreenManagerTiroLibre pmTiroLibre = new ParametersScreenManagerTiroLibre();

        pmTiroLibre.SendGame(finalScore, totalRepFloat, totalTime, score, idMinigame);
        if (useFrontPlane == true)
        {
            PerformanceController performanceCtrl = new PerformanceController();
            performanceCtrl.addPerformance((int)this.FrontAngle1, "36");
            performanceCtrl.addPerformance((int)this.FrontAngle2, "37");
            performanceCtrl.addPerformance((int)this.FrontAngle3, "38");
        }
        if (useBackPlane == true)
        {
            PerformanceController performanceCtrl = new PerformanceController();
            performanceCtrl.addPerformance((int)this.BackAngle1, "33");
            performanceCtrl.addPerformance((int)this.BackAngle2, "34");
            performanceCtrl.addPerformance((int)this.BackAngle3, "35");
        }

        if (objTherapy != null)
        {
            resultsBestScoreText.text = "Mejor: " + objTherapy.getGameRecord() + "%";
        }
        else
        {
            resultsBestScoreText.text = "Mejor:" + gameDao.GetScore(idMinigame) + "%";
        }

        if (finalScore <= 60)
        {
            //resultMessage.GetComponent<TextMesh>().text = "¡Muy bien!";
            star1.sprite = starOn;
            star2.sprite = starOff;
            star3.sprite = starOff;
        }
        else if (finalScore <= 90)
        {
            //resultMessage.GetComponent<TextMesh>().text = "¡Grandioso!";
            star1.sprite = starOn;
            star2.sprite = starOn;
            star3.sprite = starOff;
        }
        else if (finalScore <= 100)
        {
            //resultMessage.GetComponent<TextMesh>().text = "¡Increíble!";
            star1.sprite = starOn;
            star2.sprite = starOn;
            star3.sprite = starOn;
        }

        resultsPanel.SetActive(true);


        //playlist block
        if (PlaylistManager.pm != null && PlaylistManager.pm.active)
        {
            PlaylistManager.pm.NextGame();
        }
    }