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

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

        rigidBody.freezeRotation = false;
    }