Esempio n. 1
0
 void IFixedUpdating.OnFixedUpdate()
 {
     bullets = game.bullets;
     foreach (var bullet in game.bullets)
     {
         if (!bullet.canCheck)
         {
             continue;
         }
         Collider[] colliders = Physics.OverlapSphere(bullet.transform.position, bullet.radius);
         foreach (var collider in colliders)
         {
             HitBoxComponent hitBoxComponent = collider.gameObject.GetComponent <HitBoxComponent>();
             if (hitBoxComponent)
             {
                 hitBoxComponent.ActivateAttack(bullet.transform.position);
             }
         }
         if (colliders.Length != 0 || bullet.transform.position.y < -5f)
         {
             StartCoroutine(WaitBeforeVFXEnded(bullet));
         }
     }
 }