Exemplo n.º 1
0
    public void setWorldState(eStates state)
    {
        if (state == eStates.PowerSwiping)
        {
            valamansAnimator.SetTrigger("Idle");
            powerSwiping();
            playPowerUp();
            valamies.isKinematic = true;
        }
        if (state == eStates.AngleSwiping)
        {
            valamansAnimator.SetTrigger("Idle");
            valamies.isKinematic = true;
        }

        if (state == eStates.Flying)
        {
            Invoke("D", 1);
            print("Flying");
        }

        if (state == eStates.Endgame)
        {
            //   _audioSource.clip = scream;
            _audioSource.Play();
            highscoreCanvas.SetActive(true);
            finalSCOREtext.text = mss.getScore().ToString();
        }

        gameState = state;
    }
Exemplo n.º 2
0
 public void AddScore()
 {
     score = mss.getScore();
     print(name + score);
     HighScoreManager2._instance.SaveHighScore(name, score);
     hsc.enabled    = false;
     lbc.enabled    = true;
     loadHighscores = true;
     GetLeaderboard();
 }