public void Clone(Movement movement) { Orientation = movement.Orientation; fLocalPosition = movement.fLocalPosition; UpdateMovement(0); }
/// <summary> /// Called when the Game is loading its content. Pass in a ContentManager so the /// tank can load its model. /// </summary> public void LoadContent(Game game) { model = game.Content.Load<Model>(@"Models\Tank"); // as discussed in the Simple Animation Sample, we'll look up the bones // that control the wheels. leftBackWheelBone = model.Bones["l_back_wheel_geo"]; rightBackWheelBone = model.Bones["r_back_wheel_geo"]; leftFrontWheelBone = model.Bones["l_front_wheel_geo"]; rightFrontWheelBone = model.Bones["r_front_wheel_geo"]; // Also, we'll store the original transform matrix for each animating bone. leftBackWheelTransform = leftBackWheelBone.Transform; rightBackWheelTransform = rightBackWheelBone.Transform; leftFrontWheelTransform = leftFrontWheelBone.Transform; rightFrontWheelTransform = rightFrontWheelBone.Transform; movement = new Movement(game); }