Esempio n. 1
0
 private void OnTriggerEnter(Collider other)
 {
     if ((other.tag == "EnemyProjectile" || other.tag == "powerUp" || other.tag == "Enemy" || other.tag == "SquadManager") ||
         other.tag == "DodgeSection" || other.tag == "Particles" && !toDestroy)
     {
         TimeBehaviour tb = other.GetComponent <TimeBehaviour>();
         if (tb)
         {
             if (inTimeWarp)
             {
                 tb.SlowDown(timeWarpSlowdownAmount, timeWarpSlowdownDuration);
             }
             else
             {
                 tb.SlowDown(slowdownAmount, slowdownDuration);
             }
         }
         ParticleTimeReducer ptr = other.GetComponent <ParticleTimeReducer>();
         if (ptr)
         {
             if (inTimeWarp)
             {
                 ptr.SlowDown(timeWarpSlowdownAmount, timeWarpSlowdownDuration);
             }
             else
             {
                 ptr.SlowDown(slowdownAmount, slowdownDuration);
             }
         }
     }
 }