private static void VibrateRadial(Toy toy, string text = "") { CustomSubMenu.AddRadialPuppet(text, f => { int roundedPercent = (int)Math.Round(f * 100); toy.setSpeed(roundedPercent / (100 / toy.maxSpeed)); //0-10 }, ((float)toy.lastSpeed) / toy.maxSpeed, toy.GetTexture()); }
private static void EdgeRadials(Toy toy) { VibrateRadial(toy, toy.name + " 2"); CustomSubMenu.AddRadialPuppet(toy.name + " 1", f => { int roundedPercent = (int)Math.Round(f * 100); toy.setEdgeSpeed(roundedPercent / (100 / toy.maxSpeed2)); //0-10 }, ((float)toy.lastEdgeSpeed) / toy.maxSpeed2, toy.GetTexture()); }
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 NoraRadials(Toy toy) { VibrateRadial(toy, toy.name + " Vibration"); CustomSubMenu.AddButton(toy.name + " Rotate", () => { toy.rotate(); }, toy.GetTexture()); }