ForceFeedbackMotor.MasterGain 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
指定要減少控制器上所有效果之強制的百分比。
public:
property double MasterGain { double get(); void set(double value); };
double MasterGain();
void MasterGain(double value);
public double MasterGain { get; set; }
var double = forceFeedbackMotor.masterGain;
forceFeedbackMotor.masterGain = double;
Public Property MasterGain As Double
屬性值
Double
double
指定要減少控制器上所有效果之強制的百分比。
範例
// The Contoso and Fabrikam motors have a very high maximum
// torque output, so tone down all force feedback effects
// played on those devices so they don't overwhelm the user
if (motor->HardwareModelId == ContosoWheelMotorId)
{
// Attentuate effects by 20% for the Contoso motor
motor->MasterGain = 0.2;
}
else if (motor->HardwareModelId == FabrikamWheelMotorId)
{
// Attenuate effects by 35% for the Fabrikam motor
motor->MasterGain = 0.35;
}
// Make sure the motor is enabled
motor->IsMotorEnabled = true;