private static void MaxRadials(Toy toy) { VibrateRadial(toy, toy.name + " Vibration"); CustomSubMenu.AddRadialPuppet($"{toy.name} Contraction", f => { int contractionLevel = (int)Math.Round(f * 100) / (100 / toy.maxLinear); if (toy.lastContraction != contractionLevel) { toy.setContraction(contractionLevel); } }, ((float)toy.lastSpeed / toy.maxSpeed), toy.GetTexture()); }
private static void MaxRadials(Toy toy) { VibrateRadial(toy, $"{toy.name} Vibration"); AMAPI.AddRadialPedalToSubMenu($"{toy.name} Contraction", f => { int contractionLevel = (int)Math.Round(f * 100) / 33; if (toy.contraction != contractionLevel) { toy.setContraction(contractionLevel); } }, ((float)toy.lastSpeed / 20), toy_icons[toy.name]); }
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; } } }