Esempio n. 1
0
 public void DecreasePoints(string team)
 {
     if (pointsManagerScript.GetTeamPoints(int.Parse(team)) > 0)
     {
         pointsManagerScript.AddPoint(team, -1);
     }
 }
Esempio n. 2
0
    /*
     * Sets the value for dead to true
     * Gets the ZombieFSM and calls the Die method on it
     * Increase the points by the zombies point value
     * Andre Redid the die method so that it fits the boss.
     */
    void Die()
    {
        dead = true;
        Debug.Log("isDead");
        //  checks if the boss is dead
        if (isBoss)
        {
            Debug.Log("bossisDead");
            PointsManager.AddPoint(pointsValue * 10);                                                            // Add boss points

            SurvivalInstint.AddPoints();                                                                         // Add skill points
            GameObject.FindGameObjectWithTag("Vic").gameObject.transform.GetChild(0).gameObject.SetActive(true); // Display victory sign
        }
        else
        {
            PointsManager.AddPoint(pointsValue);

            GetComponent <ZombieFSM>().Die();
        }

        animator.SetTrigger("isDead");
        Debug.Log("animationisDead");
        Debug.Log("Destroy");
        Destroy(this.gameObject, 0.5f);
    }
Esempio n. 3
0
    public void AddPoint()
    {
        string btnName = this.name;
        string team    = btnName.Substring(8, 1);
        int    points  = int.Parse(btnName.Substring(12, 1));

        pointsManagerScript.AddPoint(team, points);
    }