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; }
public void AddScore() { score = mss.getScore(); print(name + score); HighScoreManager2._instance.SaveHighScore(name, score); hsc.enabled = false; lbc.enabled = true; loadHighscores = true; GetLeaderboard(); }