public void Start() { var crossGameState = GameObject.FindObjectOfType <CrossGameState>(); CrossGameState.ScoreInfo toShow = new CrossGameState.ScoreInfo(); if (crossGameState != null) { toShow = crossGameState.LastScore; } else { Debug.LogWarning("Did not find cross game state"); toShow = _debugScoreInfo; } setScore(toShow); }
public void Start() { var crossGameState = GameObject.FindObjectOfType <CrossGameState>(); CrossGameState.ScoreInfo toShow = new CrossGameState.ScoreInfo(); if (crossGameState != null) { toShow = crossGameState.GetHighScoreInfo(); } else { Debug.LogWarning("Did not find cross game state"); toShow = _debugScoreInfo; } SetHighScore(toShow); //#if UNITY_EDITOR if (CrossGameState.skipIntro) { StartGame(); } //#endif }
private void SetHighScore(CrossGameState.ScoreInfo toShow) { highScoreText.text = toShow.ScoreThisRun.ToString(); }
private void setScore(CrossGameState.ScoreInfo toShow) { timeAliveText.text = toShow.TimeAlive.ToString(); }