Beispiel #1
0
 private void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.transform.tag == "Player" && player.transform.position.y > transform.position.y)
     {
         MySoundController.PlaySound("Shrinking");
         StopAllCoroutines();
         StartCoroutine(SetSize(0));
     }
 }
Beispiel #2
0
 private void OnCollisionExit2D(Collision2D collision)
 {
     if (collision.transform.tag == "Player")
     {
         MySoundController.PlaySound("Resetting");
         StopAllCoroutines();
         StartCoroutine(SetSize(1));
     }
 }
Beispiel #3
0
    //public AudioSource scoreCount,bgSound ;

    void Start()
    {
        Static = this;
    }