示例#1
0
        private void BackButton_DidFinish()
        {
            foreach (KeyValuePair <MockCounterGroup, ConfigModel> kvp in MockCounter.loadedMockCounters)
            {
                Destroy(kvp.Key.CounterName);
                Destroy(kvp.Key.CounterData);
            }
            CountersPlusEditViewController.ClearScreen();
            MockCounter.loadedMockCounters.Clear();
            CounterWarning.ClearAllWarnings();
            Destroy(TextHelper.CounterCanvas.gameObject);
            TextHelper.CounterCanvas      = null;
            MainScreen.transform.position = MainScreenPosition;
            MainFlowCoordinator mainFlow = Resources.FindObjectsOfTypeAll <MainFlowCoordinator>().First();

            mainFlow.InvokeMethod("DismissFlowCoordinator", this, null, false);
            foreach (CounterWarning warning in CounterWarning.existing)
            {
                DestroyImmediate(warning.gameObject);
            }
        }
示例#2
0
        protected override void BackButtonWasPressed(ViewController controller)
        {
            foreach (KeyValuePair <MockCounterGroup, ConfigModel> kvp in MockCounter.loadedMockCounters)
            {
                Destroy(kvp.Key.CounterName);
                Destroy(kvp.Key.CounterData);
            }
            CountersPlusEditViewController.ClearScreen();
            MockCounter.loadedMockCounters.Clear();
            CounterWarning.ClearAllWarnings();
            Destroy(TextHelper.CounterCanvas.gameObject);
            TextHelper.CounterCanvas      = null;
            MainScreen.transform.position = MainScreenPosition;
            MainFlowCoordinator mainFlow = Resources.FindObjectsOfTypeAll <MainFlowCoordinator>().First();

            mainFlow.InvokePrivateMethod("DismissFlowCoordinator", new object[] { this, null, false });
            ConfigModelController.ClearAllControllers();

            //Reload settings from config
            CountersController.settings = ConfigLoader.LoadSettings();
        }