예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     score     = PlayerPrefs.GetInt("TotalC");
     text.text = "x" + score.ToString();
     if (instance == null)
     {
         instance = this;
     }
 }
예제 #2
0
    // Start is called before the first frame update
    void Start()
    {
        if (!scoreCoins)
        {
            scoreCoins = FindObjectOfType <ScoreCoins>();
        }

        if (!score)
        {
            score = FindObjectOfType <Score>();
        }
    }
예제 #3
0
    private void Start()
    {
        // Setup Health
        currentHealth = maxHealth;
        DoHealthBar(1);

        // Setup Score Objects
        if (!scoreCoins)
        {
            scoreCoins = FindObjectOfType <ScoreCoins>();
        }

        // Setup Score Objects
        if (!score)
        {
            score = FindObjectOfType <Score>();
        }
    }