public static void onEvent(KeyEvent e) { string key = e.key + ""; if (key == "F4") { Il2CppSystem.Action <string> mod = (Il2CppSystem.Action <string>) delegate(string s) { var rangeMultiplier = float.Parse(s); foreach (var tower in Game.instance.getAllTowerModels()) { tower.range *= rangeMultiplier; foreach (var bev in tower.behaviors) { try { bev.Cast <AttackModel>().range *= rangeMultiplier; } catch { } } } }; PopupScreen.instance.ShowSetNamePopup("range", "multiply range by", mod, "0.5"); PopupScreen.instance.GetFirstActivePopup().GetComponentInChildren <TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; } }
public override void OnUpdate() { base.OnUpdate(); bool inAGame = InGame.instance != null && InGame.instance.bridge != null; if (change) { if (PopupScreen.instance.GetFirstActivePopup() != null) { PopupScreen.instance.GetFirstActivePopup().GetComponentInChildren <TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; change = false; } } if (inAGame) { } if (Input.GetKeyDown(KeyCode.F8)) { Il2CppSystem.Action <int> mod = (Il2CppSystem.Action <int>) delegate(int s) { InGame.instance.bridge.CheatSetRound(s - 1); }; PopupScreen.instance.ShowSetValuePopup("round", "change round to", mod, 3); change = true; } }
public static void Prefix(UdpConnection __instance, byte sendOption, ref Il2CppSystem.Action ackCallback) { if (sendOption != 8 || AmongUsClient.Instance == null || AmongUsClient.Instance.connection == null || !AmongUsClient.Instance.connection.Equals(__instance)) { return; } ackCallback = (Action)(() => { if (__instance.State == ConnectionState.Connected) { return; } Logger <ReactorPlugin> .Debug("Hello was acked, waiting for modded handshake response"); var coroutine = Coroutines.Start(Coroutine(__instance)); __instance.Disconnected = Il2CppSystem.Delegate.Combine( (Il2CppSystem.EventHandler <DisconnectedEventArgs>)(Action <Il2CppSystem.Object, DisconnectedEventArgs>) ((_, _) => { Coroutines.Stop(coroutine); }), __instance.Disconnected ).Cast <Il2CppSystem.EventHandler <DisconnectedEventArgs> >(); }); }
public static void Prefix(UdpConnection __instance, byte sendOption, ref Il2CppSystem.Action ackCallback) { if (sendOption != 8 || AmongUsClient.Instance == null || AmongUsClient.Instance.connection == null || !AmongUsClient.Instance.connection.Equals(__instance)) { return; } if (!PluginSingleton <ReactorPlugin> .Instance.ModdedHandshake.Value) { return; } ackCallback = (System.Action)(() => { if (__instance.State != ConnectionState.Connected) { PluginSingleton <ReactorPlugin> .Instance.Log.LogDebug("Hello was acked, waiting for modded handshake response"); Coroutines.Start(Coroutine()); __instance.add_Disconnected((Action <Il2CppSystem.Object, DisconnectedEventArgs>)((a, b) => { Coroutines.Stop(Coroutine()); })); } }); }
public static void onEvent(KeyEvent e) { string key = e.key + ""; if (key == "F3") { Il2CppSystem.Action <string> mod = (Il2CppSystem.Action <string>) delegate(string s) { var multi = float.Parse(s); foreach (var tower in Game.instance.model.towers) { try { foreach (var bev in tower.GetBehaviors <AbilityModel>()) { bev.Cooldown *= multi; } } catch { } } }; PopupScreen.instance.ShowSetNamePopup("ability", "multiply cooldown by", mod, "0.5"); change = true; } }
public static void onEvent(KeyEvent e) { string key = e.key + ""; if (key == "F4") { Il2CppSystem.Action <string> mod = (Il2CppSystem.Action <string>) delegate(string s) { var rangeMultiplier = float.Parse(s); foreach (var tower in Game.instance.getAllTowerModels()) { tower.range *= rangeMultiplier; foreach (var bev in tower.behaviors) { try { bev.Cast <AttackModel>().range *= rangeMultiplier; } catch { } } } }; PopupScreen.instance.ShowSetNamePopup("range", "multiply range by", mod, "0.5"); change = true; } }
public static void onEvent(KeyEvent e) { string key = e.key + ""; if (key == "F11") { Il2CppSystem.Action <string> mod = (Il2CppSystem.Action <string>) delegate(string s) { var multi = float.Parse(s); foreach (TowerModel towerModel in Game.instance.model.towers) { towerModel.cost *= multi; } foreach (UpgradeModel upgradeModel in Game.instance.model.upgrades) { upgradeModel.cost = (int)(upgradeModel.cost * multi); } }; PopupScreen.instance.ShowSetNamePopup("prices", "multiply prices by", mod, "1.56"); change = true; } }
public override void OnUpdate() { base.OnUpdate(); bool inAGame = InGame.instance != null && InGame.instance.bridge != null; if (change) { if (PopupScreen.instance.GetFirstActivePopup() != null) { PopupScreen.instance.GetFirstActivePopup().GetComponentInChildren <TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; change = false; } } if (Input.GetKeyDown(KeyCode.F11)) { Il2CppSystem.Action <string> mod = (Il2CppSystem.Action <string>) delegate(string s) { var multi = float.Parse(s); foreach (TowerModel towerModel in Game.instance.model.towers) { towerModel.cost *= multi; } foreach (UpgradeModel upgradeModel in Game.instance.model.upgrades) { upgradeModel.cost = (int)(upgradeModel.cost * multi); } }; PopupScreen.instance.ShowSetNamePopup("prices", "multiply prices by", mod, "1.56"); change = true; } }
internal static bool Prefix(TowerToSimulation __instance, int pathIndex, Il2CppSystem.Action <bool> callback) { NTowerEntity towerEntity = new NTowerEntity(__instance.tower); var o = new TowerEvents.UpgradeEvent(towerEntity); //Create UpgradePatch instance EventRegistry.instance.DispatchEvent(ref o); //Dispatch it return(!o.IsCancelled()); }
public static void ShowInputKeyBoard(Il2CppSystem.Action <string, Il2CppSystem.Collections.Generic.List <KeyCode>, Text> InputAction) { VRCUiPopupManager vrcpopup = GetVRCUiPopupManager(); vrcpopup.inputPopup.gameObject.SetActive(true); vrcpopup.inputPopup.Method_Public_Void_String_InputType_String_Action_3_String_List_1_KeyCode_Text_Boolean_0("Enter Input", InputField.InputType.Standard, "Enter text", InputAction, true); GameObject.Find("UserInterface/MenuContent/Popups/InputKeypadPopup").SetActive(true); }
public static bool Prefix(MapLoader __instance, ref string map, Il2CppSystem.Action <MapModel> loadedCallback) { lastMap = map; //Console.WriteLine(lastMap); //Console.WriteLine(listOfMaps.Where(x => x.name == lastMap).Count()); if (isCustom(lastMap)) { map = "MuddyPuddles"; } return(true); }
public static bool Prefix(ref string path, Action <Object> call) { // Use mark as a workaround to resolve the original call. // Reverse patch needs to update the melonloader version. const string mark = "//?/"; MelonDebug.Msg(path); if (path.StartsWith(mark)) { path = path.Substring(mark.Length); return(true); } var worker = Worker.Pick(path); if (worker == null) { return(true); } var tp = worker.TemplatePath; // It's a workaround for `call` that used in `Wrapper` got freed in Il2cpp domain // I have no idea why/how this could work. But, though, anyway, it just WORKS. // A reason might be the `native` will keep a gc handle to prevent `call` from freeing. Il2CppSystem.Action <Object> native = call; void Wrapper(Object obj) { var p = new GameObject { active = false }; var go = Object.Instantiate(obj.Cast <GameObject>(), p.transform); native.Invoke(worker.Rework(go)); Object.Destroy(p); } if (GoCache.Cache.ContainsKey(tp)) { native.Invoke(worker.Rework(GoCache.Cache[tp])); } else { var a = new Action <Object>(Wrapper); g.res.LoadAsync(mark + tp, a); } return(false); }
public static void onEvent(KeyEvent e) { string key = e.key + ""; if (key == "F8") { Il2CppSystem.Action <int> mod = (Il2CppSystem.Action <int>) delegate(int s) { InGame.instance.bridge.CheatSetRound(s - 1); }; PopupScreen.instance.ShowSetValuePopup("round", "change round to", mod, 3); } }
public static void onEvent(KeyEvent e) { string key = e.key + ""; if (key == "F9") { Il2CppSystem.Action <string> mod = (Il2CppSystem.Action <string>) delegate(string s) { rate = float.Parse(s); }; PopupScreen.instance.ShowSetNamePopup("rate", "multiply fire rate by", mod, "0.33"); PopupScreen.instance.GetFirstActivePopup().GetComponentInChildren <TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; } }
public static void onEvent(KeyEvent e) { string key = e.key + ""; if (key == "F9") { Il2CppSystem.Action <string> mod = (Il2CppSystem.Action <string>) delegate(string s) { rate = float.Parse(s); }; string ratestring = Convert.ToString(rate); PopupScreen.instance.ShowSetNamePopup("Hypersonic", "Multiply fire rate by", mod, "1000"); change = true; MelonLogger.Log("Fire rate is now set to:", ratestring); } }
public override void OnUpdate() { base.OnUpdate(); bool inAGame = InGame.instance != null && InGame.instance.bridge != null; if (change) { if (PopupScreen.instance.GetFirstActivePopup() != null) { PopupScreen.instance.GetFirstActivePopup().GetComponentInChildren <TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; change = false; } } if (inAGame) { timer += UnityEngine.Time.deltaTime; if (rate != 1 && timer > 1) { foreach (TowerToSimulation towerToSimulation in InGame.instance.bridge.GetAllTowers()) { StartOfRoundRateBuffModel rateBuffSORModel = new StartOfRoundRateBuffModel("69", 1 / rate, 2); BehaviorMutator rateBuffModel = new StartOfRoundRateBuffModel.RateMutator(rateBuffSORModel); towerToSimulation.tower.AddMutator(rateBuffModel, 600, true, true, false, true, false, false); //towerToSimulation.tower.mutators } timer = 0; } } if (Input.GetKeyDown(KeyCode.F9)) { Il2CppSystem.Action <string> mod = (Il2CppSystem.Action <string>) delegate(string s) { rate = float.Parse(s); }; PopupScreen.instance.ShowSetNamePopup("rate", "multiply fire rate by", mod, "0.33"); change = true; //GameObject.Find("SetNamePopup(Clone)").transform.FindChild("InputField").gameObject.GetComponent<TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; //PopupScreen.instance.GetFirstActivePopup().GetComponentInChildren<TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; } if (Input.GetKeyDown(KeyCode.F10)) { //GameObject.Find("SetNamePopup(Clone)").transform.FindChild("InputField").gameObject.GetComponent<TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; } }
private static bool Prefix(string objectId, ref Il2CppSystem.Action <UnityDisplayNode> onComplete) { if (ModDisplay.Cache.GetValueOrDefault(objectId) is ModDisplay modDisplay && modDisplay.ModifiesUnityObject && !(ResourceHandler.Prefabs.ContainsKey(objectId) && !ResourceHandler.Prefabs[objectId].isDestroyed)) { var complete = onComplete; onComplete = new Action <UnityDisplayNode>(node => { complete.Invoke(node); modDisplay.ModifyDisplayNode(node); }); } return(true); }
public static void onEvent(KeyEvent e) { string key = e.key + ""; //if (key == "Alpha4") //{ // Logger.Log("added cash"); // InGame.instance.addCash(1000000); //} //if (key == "Alpha5") //{ // hypersonic = true; // Logger.Log("hypersonic on"); //} if (key == "Alpha6") { speed = 3; Logger.Log("speed = 3"); } if (key == "Alpha7") { speed = 10; Logger.Log("speed = 10"); } if (key == "Alpha8") { speed = 50; Logger.Log("speed = 50"); } if (key == "Alpha9") { speed = customspeed; Logger.Log("speed = " + customspeed); } if (key == "F5") { Il2CppSystem.Action <int> deb = (Il2CppSystem.Action <int>) delegate(int s) { customspeed = s; speed = customspeed; }; PopupScreen.instance.ShowSetValuePopup("speed", "which speed ? ", deb, 100); } }
public static bool Prefix(ref string path, Action <Object> call) { MelonDebug.Msg($"ResMgr::LoadAsync({path})"); var exist = GoCache.TryGet(path, out var go); if (!exist) { return(true); } // It's a workaround for `call` that used in `Wrapper` got freed in Il2cpp domain // I have no idea why/how this could work. But, though, anyway, it just WORKS. // A reason might be the `native` will keep a gc handle to prevent `call` from freeing. Il2CppSystem.Action <Object> native = call; native.Invoke(go); return(false); }
public override void OnUpdate() { base.OnUpdate(); bool inAGame = InGame.instance != null && InGame.instance.bridge != null; if (change) { if (PopupScreen.instance.GetFirstActivePopup() != null) { PopupScreen.instance.GetFirstActivePopup().GetComponentInChildren <TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; change = false; } } if (Input.GetKeyDown(KeyCode.F4)) { Il2CppSystem.Action <string> mod = (Il2CppSystem.Action <string>) delegate(string s) { var rangeMultiplier = float.Parse(s); foreach (var tower in Game.instance.model.towers) { tower.range *= rangeMultiplier; foreach (var bev in tower.behaviors) { try { bev.Cast <AttackModel>().range *= rangeMultiplier; } catch { } } } }; PopupScreen.instance.ShowSetNamePopup("range", "multiply range by", mod, "0.5"); change = true; } }
public override void OnUpdate() { base.OnUpdate(); bool inAGame = InGame.instance != null && InGame.instance.bridge != null; if (change) { if (PopupScreen.instance.GetFirstActivePopup() != null) { PopupScreen.instance.GetFirstActivePopup().GetComponentInChildren <TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; change = false; } } if (Input.GetKeyDown(KeyCode.F3)) { Il2CppSystem.Action <string> mod = (Il2CppSystem.Action <string>) delegate(string s) { var multi = float.Parse(s); foreach (var tower in Game.instance.model.towers) { try { foreach (var bev in tower.behaviors.GetItemsOfType <Model, AbilityModel>()) { bev.Cooldown *= multi; } } catch { } } }; PopupScreen.instance.ShowSetNamePopup("ability", "multiply cooldown by", mod, "0.5"); change = true; } }
public static void onEvent(KeyEvent e) { string key = e.key + ""; if (key == "F9") { Il2CppSystem.Action <string> mod = (Il2CppSystem.Action <string>) delegate(string s) { rate = float.Parse(s); }; PopupScreen.instance.ShowSetNamePopup("rate", "multiply fire rate by", mod, "0.33"); change = true; //GameObject.Find("SetNamePopup(Clone)").transform.FindChild("InputField").gameObject.GetComponent<TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; //PopupScreen.instance.GetFirstActivePopup().GetComponentInChildren<TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; } if (key == "F10") { //GameObject.Find("SetNamePopup(Clone)").transform.FindChild("InputField").gameObject.GetComponent<TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; } }
public override void OnUpdate() { base.OnUpdate(); //System.Console.WriteLine(TimeManager.maxSimulationStepsPerUpdate); if (TimeManager.FastForwardActive) { TimeManager.timeScaleWithoutNetwork = speed; TimeManager.networkScale = speed; } else { TimeManager.timeScaleWithoutNetwork = 1; TimeManager.networkScale = 1; } int max; if (speed == 3) { max = 3; } else { max = speed * 2; } TimeManager.maxSimulationStepsPerUpdate = slow ? slowAmount : max; if (Input.GetKeyDown(KeyCode.Alpha6)) { speed = 3; maxSimulationStepsPerUpdate = 2; System.Console.WriteLine("speed = 3"); } if (Input.GetKeyDown(KeyCode.Alpha7)) { speed = 10; maxSimulationStepsPerUpdate = 9999; System.Console.WriteLine("speed = 10"); } if (Input.GetKeyDown(KeyCode.Alpha8)) { speed = 50; maxSimulationStepsPerUpdate = 9999; System.Console.WriteLine("speed = 50"); } if (Input.GetKeyDown(KeyCode.Alpha9)) { speed = customspeed; maxSimulationStepsPerUpdate = 9999; System.Console.WriteLine("speed = " + customspeed); } if (Input.GetKeyDown(KeyCode.Alpha6) && Input.GetKey(KeyCode.LeftControl)) { slow = !slow;// = maxSimulationStepsPerUpdate == 1 ? 2 : 1; System.Console.WriteLine("slow = " + slow); } if (Input.GetKeyDown(KeyCode.Alpha7) && Input.GetKey(KeyCode.LeftControl)) { slowAmount = slowAmount == 1 ? 2 : 1;// = maxSimulationStepsPerUpdate == 1 ? 2 : 1; System.Console.WriteLine("slow amount = " + slowAmount); } if (Input.GetKeyDown(KeyCode.Alpha8) && Input.GetKey(KeyCode.LeftControl)) { Il2CppSystem.Action <int> deb = (Il2CppSystem.Action <int>) delegate(int s) { customspeed = s; speed = customspeed; }; PopupScreen.instance.ShowSetValuePopup("speed", "which speed ? ", deb, 100); //PopupScreen.instance.GetFirstActivePopup().GetComponentInChildren<TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; } }
public static void ShowPopUPthingy(string a, string b, string c, Action d, Action <VRCUiPopup> e = null) // ADCS!!! { Il2CppSystem.Action f = d; Il2CppSystem.Action <VRCUiPopup> g = e; PopUpM.Invoke(VRCUiPopupManager.prop_VRCUiPopupManager_0, new object[] { a, b, c, f, g }); }
public static void Postfix() { if (!File.Exists("Mods/NKHook6.dll")) { using (WebClient client = new WebClient()) { client.DownloadFile("https://github.com/TDToolbox/NKHook6/releases/download/41/NKHook6.dll", "Mods/NKHook6.dll"); } Console.WriteLine("downloaded NKHook6.dll"); } if (!File.Exists("Mods/BloonsTD6.Mod.Helper.dll")) { Il2CppSystem.Action <int> mod = (Il2CppSystem.Action <int>) delegate(int s) { if (s == 1) { using (WebClient client = new WebClient()) { client.DownloadFile("https://github.com/gurrenm3/BloonsTD6-Mod-Helper/releases/download/0.0.2/BloonsTD6.Mod.Helper.dll", "Mods/BloonsTD6.Mod.Helper.dll"); File.Delete("Mods/BloonsTD6_Mod_Helper.dll"); } Console.WriteLine("downloaded BloonsTD6.Mod.Helper.dll"); Application.Quit(0); } }; PopupScreen.instance.ShowSetValuePopup("your btd6 mod helper seems to be outdated", "type 1 to update it", mod, 1); PopupScreen.instance.GetFirstActivePopup().GetComponentInChildren <TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; } Console.WriteLine("initializing bloonchipper"); if (!LocalizationManager.instance.textTable.ContainsKey(customTowerName)) { LocalizationManager.instance.textTable.Add(customTowerName, "Bloon Chipper"); } string[] array = new string[] { customTowerUpgrade1, customTowerUpgrade2, customTowerUpgrade3, customTowerUpgrade4, customTowerUpgrade5 }; string[] array2 = new string[] { "Increased range and pierce", "Attacks twice as fast", "Can now destroy moabs. Ability doubles attack speed", "Can now destroy ZOMGs and instakill bloons", "Can now destroy 4 blimps at once, and attacks bloons much faster" }; for (int i = 0; i < array.Length; i++) { if (!LocalizationManager.instance.textTable.ContainsKey(array[i] + " Description")) { LocalizationManager.instance.textTable.Add(array[i] + " Description", array2[i]); } } Game.instance.GetSpriteRegister().RegisterSpriteFromURL(@"Mods\bloonchipper\bloonchipper.png", "https://static.wikia.nocookie.net/b__/images/3/3b/BMC_Bloon_Chipper_Fix.png/revision/latest?cb=20151222214314&path-prefix=bloons", default, out customTowerImageID);
public override void OnUpdate() { base.OnUpdate(); bool inAGame = InGame.instance != null && InGame.instance.bridge != null; if (inAGame) { if (Input.GetMouseButtonDown(0))//GetKeyDown(KeyCode.F3) { var v3 = Input.mousePosition; v3 = InGame.instance.sceneCamera.ScreenToWorldPoint(v3); float x = v3.x; float y = v3.y * -2.3f; //Console.WriteLine(x + " " + y); if (writingPoint) { write("list.Add(new PointInfo() { bloonScale = 1, bloonsInvulnerable = false, distance = 1, id = r.NextDouble() + \"\", moabScale = 1, moabsInvulnerable = false, rotation = 0, point = new Assets.Scripts.Simulation.SMath.Vector3(" + x + "f, " + y + "f) });"); } if (writingArea) { write("area" + index + ".Add(new Assets.Scripts.Simulation.SMath.Vector2(" + x + "f, " + y + "f));"); } } if (Input.GetKeyDown(KeyCode.Alpha0)) { type = (int)AreaType.track; if (mapeditor) { Console.WriteLine("track"); } } if (Input.GetKeyDown(KeyCode.Alpha1)) { type = (int)AreaType.water; if (mapeditor) { Console.WriteLine("water"); } } if (Input.GetKeyDown(KeyCode.Alpha2)) { type = (int)AreaType.land; if (mapeditor) { Console.WriteLine("land"); } } if (Input.GetKeyDown(KeyCode.Alpha3)) { type = (int)AreaType.unplaceable; if (mapeditor) { Console.WriteLine("unplaceable"); } } if (Input.GetKeyDown(KeyCode.F1)) { //Il2CppReferenceArray<PointInfo> arr = new Il2CppReferenceArray<PointInfo>(3); //arr[0] = new PointInfo() { bloonScale = 1, bloonsInvulnerable = false, distance = 1, id = r.NextDouble() + "", moabScale = 1, moabsInvulnerable = false, rotation = 0, point = new Assets.Scripts.Simulation.SMath.Vector3(-95f, -130f) }; if (!writingPoint) { write("public static Il2CppReferenceArray<PointInfo> track" + indexTrack + "(){"); write("List<PointInfo> list = new List<PointInfo>();"); } if (writingPoint) { write("return list.ToArray();"); write("}"); indexTrack++; } writingPoint = !writingPoint; Console.WriteLine("writingPoint: " + writingPoint); } if (Input.GetKeyDown(KeyCode.F2)) { //Il2CppReferenceArray<PointInfo> arr = new Il2CppReferenceArray<PointInfo>(3); //arr[0] = new PointInfo() { bloonScale = 1, bloonsInvulnerable = false, distance = 1, id = r.NextDouble() + "", moabScale = 1, moabsInvulnerable = false, rotation = 0, point = new Assets.Scripts.Simulation.SMath.Vector3(-95f, -130f) }; if (!writingArea) { write("var area" + index + " = new Il2CppSystem.Collections.Generic.List<Assets.Scripts.Simulation.SMath.Vector2>();"); } if (writingArea) { if (type != (int)AreaType.unplaceable) { write("newareas.Add(new AreaModel(\"lol" + index + "\", new Assets.Scripts.Simulation.SMath.Polygon(area" + index + "), 10, (AreaType)" + type + "));"); } else { write("newareas.Add(new AreaModel(\"lol" + index + "\", new Assets.Scripts.Simulation.SMath.Polygon(area" + index + "), 100f, AreaType.unplaceable, 0f, null, null, null, true, false, default));"); } index++; } writingArea = !writingArea; Console.WriteLine("writingArea: " + writingArea); } if (Input.GetKeyDown(KeyCode.F3)) { Il2CppSystem.Action <int> deb = (Il2CppSystem.Action <int>) delegate(int s) { index = s; }; PopupScreen.instance.ShowSetValuePopup("index", "which index ? ", deb, 11); } //if (Input.GetKeyDown(KeyCode.F4)) //{ // mapeditor = !mapeditor; // Console.WriteLine("mapeditor: " + mapeditor); //} } }
public static void onEvent(KeyEvent e) { string key = e.key + ""; //if (key == "Alpha4") //{ // System.Console.WriteLine("added cash"); // InGame.instance.addCash(1000000); //} //if (key == "Alpha5") //{ // hypersonic = true; // System.Console.WriteLine("hypersonic on"); //} if (key == "Alpha6") { speed = 3; maxSimulationStepsPerUpdate = 2; System.Console.WriteLine("speed = 3"); } if (key == "Alpha7") { speed = 10; maxSimulationStepsPerUpdate = 9999; System.Console.WriteLine("speed = 10"); } if (key == "Alpha8") { speed = 50; maxSimulationStepsPerUpdate = 9999; System.Console.WriteLine("speed = 50"); } if (key == "Alpha9") { speed = customspeed; maxSimulationStepsPerUpdate = 9999; System.Console.WriteLine("speed = " + customspeed); } if (key == "F1" && Input.GetKey(KeyCode.LeftControl)) { slow = !slow;// = maxSimulationStepsPerUpdate == 1 ? 2 : 1; System.Console.WriteLine("slow = " + slow); } if (key == "F2" && Input.GetKey(KeyCode.LeftControl)) { slowAmount = slowAmount == 1 ? 2 : 1;// = maxSimulationStepsPerUpdate == 1 ? 2 : 1; System.Console.WriteLine("slow amount = " + slowAmount); } if (key == "F5") { Il2CppSystem.Action <int> deb = (Il2CppSystem.Action <int>) delegate(int s) { customspeed = s; speed = customspeed; }; PopupScreen.instance.ShowSetValuePopup("speed", "which speed ? ", deb, 100); //PopupScreen.instance.GetFirstActivePopup().GetComponentInChildren<TMP_InputField>().characterValidation = TMP_InputField.CharacterValidation.None; } }
public static void ShowOptionPopup(string title, string body, string leftButtonText, Il2CppSystem.Action leftButtonAction, string rightButtonText, Il2CppSystem.Action rightButtonAction) { GetShowOptionsPopupDelegate(title, body, leftButtonText, leftButtonAction, rightButtonText, rightButtonAction); }
public static void ShowDismissPopup(string title, string body, string middleButtonText, Il2CppSystem.Action buttonAction) { GetShowDismissPopupDelegate(title, body, middleButtonText, buttonAction); }
public static void ShowUnityInputPopupWithCancel(string title, string TextInField, string RightButtonText, Il2CppSystem.Action <string, Il2CppSystem.Collections.Generic.List <KeyCode>, Text> action) { VRCUiPopupManager.prop_VRCUiPopupManager_0.Method_Public_Void_String_String_InputType_Boolean_String_Action_3_String_List_1_KeyCode_Text_Action_String_Boolean_Action_1_VRCUiPopup_0(title, TextInField, InputField.InputType.Standard, false, RightButtonText, action, new Action(() => { })); }