Example #1
0
    // Use this for initialization
    void Start()
    {
        //initialize variables and get object references
        currentHealth = maxHealth;
        //gameover = GameObject.FindGameObjectWithTag ("GameOver");
        //restartScript = gameover.GetComponent<RestartGame> ();
        myRenderer     = GetComponent <SpriteRenderer> ();
        countdownTimer = timeSpentRed;

        myHealthDisplay = GetComponent <HealthDisplay> ();
        if (myHealthDisplay.enabled)
        {
            myHealthDisplay.SetupDisplay(this);
        }
    }