Exemplo n.º 1
0
 public void changeCarHealth()
 {
     if (currentHP < 0)
     {
         carController.ChangeMaxSpeed(0);
         Explosion();
     }
     else if (currentHP >= 0 && currentHP < 20)
     {
         carController.ChangeMaxSpeed(40);
         FireDamage();
         Smoke();
     }
     else if (currentHP >= 20 && currentHP < 40)
     {
         carController.ChangeMaxSpeed(50);
         FireDamage();
     }
     else if (currentHP >= 40 && currentHP < 60)
     {
         carController.ChangeMaxSpeed(55);
         FireDamage();
     }
     else if (currentHP >= 60 && currentHP < 80)
     {
         carController.ChangeMaxSpeed(60);
     }
     else if (currentHP >= 80)
     {
         carController.ChangeMaxSpeed(60);
     }
 }
Exemplo n.º 2
0
 public void AddSpeedMultiple()
 {
     m_Car.GetComponent <Rigidbody>().AddForce(m_Car.transform.forward * f_speed_boost_speed, ForceMode.Impulse);
     m_Car.ChangeMaxSpeed(f_speed_boost_speed);
 }