void ShowScore() { fin = true; if (score > finalScore) { finalScore = score; } if (finalScore > PlayerPrefs.GetFloat("CGampScore")) { PlayerPrefs.SetFloat("CGampScore", finalScore); } else { finalScore = PlayerPrefs.GetFloat("CGampScore"); } UI.SetActive(false); scoreBoard.SetActive(true); CGAMPspawnSystem.GetComponent <SpawnCGamp>().enabled = false; StingspawnSystem.GetComponent <SpawnSting>().enabled = false; scoreBoard.transform.position = new Vector3(transform.position.x, transform.position.y, transform.position.z + 1); lives = 3; Username.GetComponent <TMPro.TextMeshPro>().text = FacebookManager.Instance.ProfileName + ": " + score.ToString(); if (FacebookManager.Instance.ProfilePic != null) { ProfilePic.GetComponent <Image>().sprite = FacebookManager.Instance.ProfilePic; } }
void ShowScore() { if (score > finalScore) { finalScore = score; } if (finalScore > PlayerPrefs.GetFloat("MemoryScore")) { PlayerPrefs.SetFloat("MemoryScore", finalScore); } else { finalScore = PlayerPrefs.GetFloat("MemoryScore"); } lives = 5; UI.SetActive(false); Capsules.SetActive(false); Spheres.GetComponent <Randomsphere>().Getclonei().SetActive(false); Spheres.GetComponent <Randomsphere>().Getclonej().SetActive(false); Spheres.GetComponent <Randomsphere>().Getclonek().SetActive(false); scoreBoard.SetActive(true); scoreBoard.transform.position = new Vector3(transform.position.x, transform.position.y, transform.position.z + 35); Username.GetComponent <TMPro.TextMeshPro>().text = FacebookManager.Instance.ProfileName + ": " + score.ToString(); if (FacebookManager.Instance.ProfilePic != null) { ProfilePic.GetComponent <Image>().sprite = FacebookManager.Instance.ProfilePic; } }