public void ReceiveRumble(object sender, Nefarius.ViGEm.Client.Targets.Xbox360.Xbox360FeedbackReceivedEventArgs e) { SetRumble(lowFreq, highFreq, (float)e.LargeMotor / (float)255, rumblePeriod); if (other != null) { other.SetRumble(lowFreq, highFreq, (float)e.LargeMotor / (float)255, rumblePeriod); } }
public async void locBtnClickAsync(object sender, EventArgs e) { Button bb = sender as Button; if (bb.Tag.GetType() == typeof(Button)) { Button button = bb.Tag as Button; if (button.Tag.GetType() == typeof(Joycon)) { Joycon v = (Joycon)button.Tag; v.SetRumble(160.0f, 320.0f, 1.0f); await Task.Delay(300); v.SetRumble(160.0f, 320.0f, 0); } } }
public async void locBtnClickAsync(object sender, EventArgs e) { Button bb = sender as Button; if (bb.Tag.GetType() == typeof(Button)) { Button button = bb.Tag as Button; if (button.Tag.GetType() == typeof(Joycon)) { Joycon v = (Joycon)button.Tag; /* Switch Pro适合的振动测试数据(就是点击"验证测试"按钮时手柄振动强度) * v.SetRumble(20.0f, 110.0f, 1.0f); * await Task.Delay(200); * v.SetRumble(20.0f, 110.0f, 0); */ v.SetRumble(160.0f, 320.0f, 1.0f); await Task.Delay(300); v.SetRumble(160.0f, 320.0f, 0); } } }
public void locBtnClick(object sender, EventArgs e) { Button bb = sender as Button; if (bb.Tag.GetType() == typeof(Button)) { Button button = bb.Tag as Button; if (button.Tag.GetType() == typeof(Joycon)) { Joycon v = (Joycon)button.Tag; v.SetRumble(20.0f, 400.0f, 1.0f, 300); } } }