public void Close() { if (LoadingExtension.Instance != null) { var uiView = UIView.GetAView(); var trafficManager = uiView.FindUIComponent("UITrafficManager"); if (trafficManager != null) { Destroy(trafficManager); } UITrafficManager.deactivateButtons(); TrafficLightTool.SetToolMode(ToolMode.None); LoadingExtension.Instance.SetToolMode(TrafficManagerMode.None); _uiShown = false; } }
private void clickSwitchTraffic(UIComponent component, UIMouseEventParameter eventParam) { if (TrafficLightTool.getToolMode() != ToolMode.SwitchTrafficLight) { _buttonSwitchTraffic.focusedBgSprite = "ButtonMenuFocused"; TrafficLightTool.SetToolMode(ToolMode.SwitchTrafficLight); } else { _buttonSwitchTraffic.focusedBgSprite = "ButtonMenu"; TrafficLightTool.SetToolMode(ToolMode.None); } }