private void Start() { _nameText = new GameObject[5]; _scoreText = new GameObject[5]; for (var i = 0; i < 5; ++i) { _nameText[i] = FindObjectOfType <GameUiCreator>().CreateNameText(scoreBoardPanel); GameUiChanger.SetPosition(_nameText[i], new Vector2(0, 260 - 130 * i)); _scoreText[i] = FindObjectOfType <GameUiCreator>().CreateScoreText(scoreBoardPanel); GameUiChanger.SetPosition(_scoreText[i], new Vector2(0, 260 - 130 * i)); } }
public void HideScoreBoard() { GameUiChanger.ChangePosition(scoreBoardPanel, new Vector2(720, 0), 1f); }
public void ShowScoreBoard() { GameUiChanger.SetText(yourPositionText, "Your Position: " + _yourPosition); GameUiChanger.ChangePosition(scoreBoardPanel, new Vector2(0, 0), 1f); }