void OnGUI() { switch (status) { case PlayerStatus.Died: style_normal.Render(new Rect(32, 0, 200, 100), "You Failed!"); break; default: style_normal.Render(new Rect(32, 0, 200, 100), ("Score: " + score)); break; } if (text_visible) { Rect r = new Rect(Screen.width / 2 - 100, Screen.height / 2 - 100, 200, 200); switch (status) { case PlayerStatus.Goaled: style_big.Render(r, ":)"); break; case PlayerStatus.Died: style_big.Render(r, ":("); break; } } }
void OnGUI() { Rect r = new Rect(Screen.width / 2 - 100, Screen.height / 2 - 100, 200, 200); int score = (GameManager.Instance != null)? GameManager.Instance.score : -1; style.Render(r, "Score: " + score); }
void OnGUI() { if (visible) { if (0 < left) { Rect r = new Rect(Screen.width / 2 - 100, Screen.height / 2 - 100, 200, 200); style_big.Render(r, left.ToString()); } else if (current != null) { Rect r = new Rect(Screen.width / 2 + 100, 0, 200, 72); style_normal.Render(r, "Use me! ->"); } } }