Esempio n. 1
0
 private void ShowStars()
 {
     foreach (GameObject star in instantiatedStars)
     {
         star.GetComponent <Renderer>().enabled = true;
         StarSparkle starSparkle = star.GetComponent <StarSparkle>();
         starSparkle.Show();
         starSparkle.FadeIn();
     }
 }
Esempio n. 2
0
    public void changeToDay()
    {
        if (isDay)
        {
            return;
        }

        isDay = true;

        foreach (GameObject star in instantiatedStars)
        {
            StarSparkle starSparkle = star.GetComponent <StarSparkle>();
            starSparkle.FadeOut();

            //CircleCollider2D collider = star.GetComponent<CircleCollider2D>();
            //collider.enabled = false;

            Invoke("ResetStars", 5f);
        }
    }