示例#1
0
 void moveShip()
 {
     if (Input.GetButton("Forward"))
     {
         m_shipBhv.Thrust(m_thrustStrength * m_motionScale);
     }
     if (Input.GetButton("Back"))
     {
         m_shipBhv.Thrust(-m_thrustStrength * m_motionScale);
     }
     if (Input.GetButton("Left"))
     {
         m_shipBhv.Strafe(-m_thrustStrength * m_motionScale);
     }
     if (Input.GetButton("Right"))
     {
         m_shipBhv.Strafe(m_thrustStrength * m_motionScale);
     }
     if (Input.GetButton("Rise"))
     {
         m_shipBhv.Climb(m_thrustStrength * m_motionScale);
     }
     if (Input.GetButton("Fall"))
     {
         m_shipBhv.Climb(-m_thrustStrength * m_motionScale);
     }
 }