Exemple #1
0
 void Explode()
 {
     // 1 0.5 0.25
     // check the size of the rock
     if (transform.localScale.x > 0.5f)
     {
         mainRef.BreakRock(2, transform.position, 0.5f);
     }
     else if (transform.localScale.x <= 0.5f && transform.localScale.x > 0.25f)
     {
         mainRef.BreakRock(3, transform.position, 0.25f);
     }
     mainRef.updateScore(1);
     mainRef.rocks.Remove(this);
     Destroy(gameObject);
 }