Ejemplo n.º 1
0
    //public string[] highScoresNames = new string[3];


    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(this);
        }
        highScores[0] = 5000;
        //highScoresNames[0] = "CODY";
        highScores[1] = 3000;
        //highScoresNames[0] = "GOD";
        highScores[2] = 1000;
        //highScoresNames[0] = "BOB";
    }
Ejemplo n.º 2
0
    private void Start()
    {
        Scoreholder currentScore = FindObjectOfType <Scoreholder>();

        if (currentScore.score > currentScore.highScores[0])
        {
            currentScore.highScores[2] = currentScore.highScores[1];
            //currentScore.highScoresNames[2] = currentScore.highScoresNames[1];
            currentScore.highScores[1] = currentScore.highScores[0];
            //currentScore.highScoresNames[1] = currentScore.highScoresNames[0];
            currentScore.highScores[0] = currentScore.score;
        }
        else if (currentScore.score > currentScore.highScores[1])
        {
            currentScore.highScores[2] = currentScore.highScores[1];
            //currentScore.highScoresNames[2] = currentScore.highScoresNames[1];
            currentScore.highScores[1] = currentScore.score;
        }
        else if (currentScore.score > currentScore.highScores[2])
        {
            currentScore.highScores[2] = currentScore.score;
        }
    }
Ejemplo n.º 3
0
 private void Start()
 {
     total = FindObjectOfType <Scoreholder>();
 }
Ejemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     tim         = FindObjectOfType <Scoreholder>();
     ending.text = tim.score.ToString();
 }