void GameOver() { stick.SetActive(false); if (PlayerPrefs.GetString("Controls") == "DPad") { dpad.SetActive(false); } stop.moveEnabled = false; lives = 0; int coinAdd = 5 + (score / 10 * 4); PlayerPrefs.SetInt("Total_Coins", PlayerPrefs.GetInt("Total_Coins") + coinAdd); PlayerPrefs.SetInt("Total_Wordsnake_Games_Played", PlayerPrefs.GetInt("Total_Wordsnake_Games_Played") + 1); wordCount = 0; updateHighScore(score); anim.SetTrigger("GameOver"); achScr.AchOne(); achScr.AchTwo(); achScr.AchThree(); achScr.AchFour(); achScr.AchFive(); achScr.AchSix(); score = 0; PlayAd(); }
public void ReturnDetails(string achievements) { if (_popUpPanel.gameObject.activeInHierarchy == false) { _popUpPanel.gameObject.SetActive(true); } if (achievementName[achievements].getName() != "??????") { _name.text = achievementName[achievements].getName(); } else { _name.text = "??????"; } _description.text = achievementName[achievements].getDescription(); _image = achievementName[achievements].getImage(); _progress.text = achievementName[achievements].getTotal() + " / " + achievementName[achievements].getGoal(); _coins.text = achievementName[achievements].getCoins(); achScr.AchOne(); if (_coins.text.Equals("")) { _coin.gameObject.SetActive(false); } else { _coin.gameObject.SetActive(true); } }