Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
    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
    }
Exemplo n.º 3
0
 private void SetHighScore(CrossGameState.ScoreInfo toShow)
 {
     highScoreText.text = toShow.ScoreThisRun.ToString();
 }
Exemplo n.º 4
0
 private void setScore(CrossGameState.ScoreInfo toShow)
 {
     timeAliveText.text = toShow.TimeAlive.ToString();
 }