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); } timer = 0; } } }
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; } }
public override void OnUpdate() { base.OnUpdate(); bool inAGame = InGame.instance != null && InGame.instance.bridge != null; 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, 30); BehaviorMutator rateBuffModel = new StartOfRoundRateBuffModel.RateMutator(rateBuffSORModel); towerToSimulation.tower.AddMutator(rateBuffModel, 600, true, true, false, true, false, false); } timer = 0; } } }