Esempio n. 1
0
 void StartBeam()
 {
     isDamaging = false;
     beamPoints.Clear();
     objectsHit    = new List <GameObject>();
     beamDistances = new List <float>();
     ShootBeam(beamStart.position, beamStart.up, currentMaxDistance, 0);
     if (isDamaging)
     {
         AudioFW.AdjustPitch("Laser", 2.5f);
         if (objectsHit[objectsHit.Count - 1].GetComponent <Destructible>() != null)
         {
             if (objectsHit[objectsHit.Count - 1].GetComponent <Destructible>().isFriendly)
             {
                 AudioFW.PlayLoop("Screamer");
             }
         }
     }
     else
     {
         AudioFW.AdjustPitch("Laser", 0.5f);
         AudioFW.StopLoop("Screamer");
     }
 }