예제 #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.TryGetComponent <ColliderScript>(out ColliderScript collider))
     {
         if (transform.localScale.x > 0.175f)
         {
             transform.localScale -= new Vector3(0.025f, 0.025f);
         }
     }
     if (collision.TryGetComponent <Raindrops>(out Raindrops raindrops))
     {
         if (transform.localScale.x < 0.3f)
         {
             transform.localScale += new Vector3(0.01f, 0.01f);
             _speed += 0.1f;
             LevelUp.GainExp(10);
         }
     }
 }