private static void handleSetSpeeds(VibratorControllerMessage msg) { foreach (var toymessage in msg.messages.Select(x => x.Value)) { if (!Toy.myToys.ContainsKey(toymessage.ToyID)) { continue; } Toy toy = Toy.myToys[toymessage.ToyID]; switch (toymessage.Command) { //Local toy commands case Commands.SetSpeed: if (toy?.hand == Hand.shared) { toy?.setSpeed(toymessage.Strength); } break; case Commands.SetSpeedEdge: if (toy?.hand == Hand.shared) { toy?.setEdgeSpeed(toymessage.Strength); } break; case Commands.SetAir: if (toy?.hand == Hand.shared) { toy?.setContraction(toymessage.Strength); } break; case Commands.SetRotate: if (toy?.hand == Hand.shared) { toy?.rotate(); } break; } } }
private static void NoraRadials(Toy toy) { VibrateRadial(toy, $"{toy.name} Vibration"); AMAPI.AddButtonPedalToSubMenu($"{toy.name} Rotate", () => { toy.rotate(); }, toy_icons[toy.name]); }
private static void NoraRadials(Toy toy) { VibrateRadial(toy, toy.name + " Vibration"); CustomSubMenu.AddButton(toy.name + " Rotate", () => { toy.rotate(); }, toy.GetTexture()); }