void OnGUI() { GameObject shipInfo = GameObject.Find("MonkeyShip"); GameObject cameraInfo = GameObject.Find("Main Camera"); //GUI.Label (new Rect (0, 20, 150, 100), "Screen DPI: " + Screen.dpi); scoreStyle.fontSize = (int)(Screen.width * 0.03); GUI.Label(new Rect(Screen.width * 0.4f, Screen.height * 0.05f, Screen.width * 0.3f, Screen.height * 0.4f), "Score: " + (int)Mathf.Round(score), scoreStyle); // Show game over menu // Submit highscore via return key on keyboard Event e = Event.current; if (e.keyCode == KeyCode.Return && submitted == false) { gameover = false; highScoreScript.StartCoroutine(highScoreScript.PostScores(stringToEdit, (int)Mathf.Round(score))); submitted = true; Debug.Log("You have successfully submitted name: " + stringToEdit + " Score: " + (int)Mathf.Round(score)); StartCoroutine("Submitted"); } }
public void SendHS() { HS.StartCoroutine(HS.PostScores(EnterName.text, Int32.Parse(EnterValue.text))); transform.parent.gameObject.SetActive(false); }