// Start is called before the first frame update
    void Start()
    {
        //  GameObject thePlayer = GameObject.Find("PlayerCollider");
        // PlayerHP playerScript = thePlayer.GetComponent<PlayerHP>();
        //numOfStars = playerScript.achievement;
        Scores.Stop();


        int enemies   = Scores.enemiesDefeated;
        int sideQuest = Scores.seedCollected;

        if (enemies > 11)
        {
            numOfStars++;
        }
        if (DesertQuestScript.checkStatus())
        {
            numOfStars++;
        }
        StarImage image1 = createStarImage(new Vector2(0, 10));
        StarImage image2 = createStarImage(new Vector2(70, 10));
        StarImage image3 = createStarImage(new Vector2(140, 10));

        Debug.Log("Number of stars is: " + numOfStars);
        //showStars(numOfStars);
    }
 // Start is called before the first frame update
 void Start()
 {
     if (ForestQuestScript.checkStatus() == true)
     {
         forestQuest.text        = "Forest Quest Complete";
         forestQuestImage.sprite = forestQuestComplete;
     }
     if (DesertQuestScript.checkStatus() == true)
     {
         desertQuest.text        = "Desert Quest Complete";
         desertQuestImage.sprite = desertQuestComplete;
     }
 }
예제 #3
0
 void OnTriggerEnter2D(Collider2D other)
 {
     GetComponent <AudioSource>().Play();
     Destroy(gameObject);
     DesertQuestScript.completeObjective();
 }