本文整理汇总了C#中Effect.SetParameters方法的典型用法代码示例。如果您正苦于以下问题:C# Effect.SetParameters方法的具体用法?C# Effect.SetParameters怎么用?C# Effect.SetParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Effect
的用法示例。
在下文中一共展示了Effect.SetParameters方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetVibration
// Note that this does not appear to work at this time. I probably need to have more infos.
public void SetVibration(int left, int right)
{
int[] temp1, temp2;
// my first clue that it doesnt work is that LEFT and RIGHT _ARENT USED_
// I should just look for C++ examples instead of trying to look for SlimDX examples
var parameters = new EffectParameters
{
Duration = 0x2710,
Gain = 0x2710,
SamplePeriod = 0,
TriggerButton = 0,
TriggerRepeatInterval = 0x2710,
Flags = EffectFlags.None
};
parameters.GetAxes(out temp1, out temp2);
parameters.SetAxes(temp1, temp2);
var effect = new Effect(joystick, EffectGuid.ConstantForce);
effect.SetParameters(parameters);
effect.Start(1);
}