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; } } }
// 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(); }
public void SetScore() { totalPickups = pickupCounters.GetActivePickups(); messesPickedUp = pickupCounters.GetPickedUpCount(); }