示例#1
0
 private void OnParticleCollision(GameObject other)
 {
     if (other.gameObject.tag == "PlayerBeamWeapon")
     {
         hitPoints--;
         guiTextHandler.AddToScore(hitScore);
         hitPool.PopEffect(transform);
         AudioSource.PlayClipAtPoint(hit, transform.position);
         if (hitPoints <= 0)
         {
             guiTextHandler.AddToScore(killScore);
             killPool.PopEffect(transform);
             AudioSource.PlayClipAtPoint(explode, transform.position);
             Destroy(this.gameObject);
         }
     }
 }