예제 #1
0
    void Start()
    {
        rb2d = GetComponent<Rigidbody2D> ();
        weapon = GetComponent<Weapon> ();
        healthScript = GetComponent<HealthScript> ();
        score = GetComponent<Score> ();
        animator = GetComponent<Animator> ();

        dead = false;
        maxHp = healthScript.getHp();
        rechargeTime = shieldsRechargeTime;

        //Check whether to display combo multiplier or not
        if (score.isCooldown () && score.getCombo() > 1) {
            comboText.text = "Combo x" + score.getCombo ();
        } else {
            comboText.text = "";
        }
        //Display Score
        scoreText.text = "Score: " + score.getScore();

        //Display Shields
        shieldsText.text = "Shields: " + healthScript.getHp();;
    }