示例#1
0
    void UpdateAchievements()
    {
        // Update the pickupCounter and goal variables
        pickupCounter = pickupCounterObj.GetPickedUpCount();
        goal          = pickupCounterObj.GetActivePickups();

        if (!hasBronze)
        {
            if (BronzeStar())
            {
                bronzeStar.sprite = fullBronze;
                hasBronze         = true;
            }
        }
        else if (!hasSilver)
        {
            if (SilverStar())
            {
                silverStar.sprite = fullSilver;
                hasSilver         = true;
            }
        }
        else if (!hasGold)
        {
            if (GoldStar())
            {
                goldStar.sprite = fullGold;
                hasGold         = true;
            }
        }
    }
示例#2
0
    // Use this for initialization
    void Start()
    {
        // Set all star sprites to empty
        bronzeStar.sprite = emptyStar;
        silverStar.sprite = emptyStar;
        goldStar.sprite   = emptyStar;

        // Get the pickup counter script and set the ints to the appropriate value
        pickupCounterObj = GameObject.FindGameObjectWithTag("Pickup Counter").GetComponent <PickupCounter>();
        pickupCounter    = pickupCounterObj.GetPickedUpCount();
        goal             = pickupCounterObj.GetActivePickups();
    }
示例#3
0
 public void SetScore()
 {
     totalPickups   = pickupCounters.GetActivePickups();
     messesPickedUp = pickupCounters.GetPickedUpCount();
 }