Example #1
0
        private void SetupTrafficRoutesInfoView()
        {
            _junctionSettings = TrafficRoutesInfoViewPanel.instance.Find <UIPanel>("JunctionSettings");
            _junctionSettings.eventVisibilityChanged += OnJunctionSettingsVisibilityChanged;

            _junctionSettingsBehaviour = new JunctionSettingsBehaviour(GameOptions);
        }
Example #2
0
        private void Destroy()
        {
            _junctionSettingsBehaviour.Dispose();
            _junctionSettingsBehaviour = null;

            _junctionSettings.eventVisibilityChanged -= OnJunctionSettingsVisibilityChanged;
            _junctionSettings = null;

            ToggleTrafficLightsButton.DestroyAll();

            _tool.Disabled -= OnToolDisabled;
            ToolHelper.RemoveTool(_tool);
            _tool = null;

            Options = null;

            ForgetPreviousTool();

            DestroyDebug();

            DebugLog.Info("Level destroyed");
        }