Esempio n. 1
0
 private void MoveRocketIfThrusting()
 {
     if (RocketDirection.isThrusting())
     {
         rigidBody.AddRelativeForce(Vector3.up);
     }
 }
Esempio n. 2
0
 private void ThrustingSoundeffect()
 {
     if (RocketDirection.isThrusting())
     {
         rocketsSoundeffect.StartThrustSoundeffect();
     }
     else
     {
         rocketsSoundeffect.StopThrustSoundeffect();
     }
 }
Esempio n. 3
0
    private void RotateRocket()
    {
        rigidBody.freezeRotation = true;

        setEulerAngleRotationXAndYTo(0, 0);
        if (RocketDirection.isRotatingLeft())
        {
            RotateLeft();
        }
        else if (RocketDirection.isRotatingRight())
        {
            RotateRight();
        }

        rigidBody.freezeRotation = false;
    }