Ejemplo n.º 1
0
 private void OnCollisionEnter2D(Collision2D obstacle)
 {
     if (obstacle.gameObject.tag == "Bomb")
     {
         int   bombs     = bombManager.transform.childCount;
         float aliveTime = 0;
         foreach (Transform bomb in bombManager.transform)
         {
             float bombActiveTime = Time.timeSinceLevelLoad - bomb.GetComponent <BombTrigger>().activeTime;
             aliveTime += bombActiveTime;
         }
         brickManager.ScoreCalculator(bombs, aliveTime);
     }
 }