コード例 #1
0
 void OnTriggerEnter2D(Collider2D collider)
 {
     if (collider.CompareTag ("enemyBullet")) {
         int rand = Random.Range(0,9);
         if(rand < ChanceProtecao){
             collider.Recycle();
             Explosao.Spawn(collider.transform.position);
         }
     }
 }