private void Start() { gameManager = interfaceFactory.GameManager; globeManager = interfaceFactory.GlobeManager; errorHandler = interfaceFactory.ErrorHandler; if (gameManager == null || globeManager == null || errorHandler == null) { gameObject.SetActive(false); } else { worldMapGlobe = globeManager.WorldMapGlobe; if (worldMapGlobe == null) { errorHandler.ReportError("World Map Globe missing", ErrorState.restart_scene); } playerManager = gameManager.PlayerManager; if (playerManager == null) { errorHandler.ReportError("Player Manager missing", ErrorState.restart_scene); } SetGlobeSettings(); started = true; } }
private void Start() { globeManager = interfaceFactory.GlobeManager; errorHandler = interfaceFactory.ErrorHandler; if (globeManager == null || errorHandler == null) { gameObject.SetActive(false); } else { worldMapGlobe = globeManager.WorldMapGlobe; if (worldMapGlobe == null) { errorHandler.ReportError("World Map Globe missing", ErrorState.restart_scene); } globeParser = globeManager.GlobeParser; if (globeParser == null) { errorHandler.ReportError("Globe Parser missing", ErrorState.restart_scene); } else { provinceParser = globeParser.ProvinceParser; if (provinceParser == null) { errorHandler.ReportError("Province Parser missing", ErrorState.restart_scene); } } } }
void Start() { gameManager = interfaceFactory.GameManager; globeManager = interfaceFactory.GlobeManager; uiManager = interfaceFactory.UIManager; errorHandler = interfaceFactory.ErrorHandler; if (gameManager == null || globeManager == null || uiManager == null || errorHandler == null) { gameObject.SetActive(false); } else { if (componentMissing) { errorHandler.ReportError("Mouse Cell Enterer missing component", ErrorState.restart_scene); } worldMapGlobe = globeManager.WorldMapGlobe; if (worldMapGlobe == null) { errorHandler.ReportError("World Map Globe missing", ErrorState.restart_scene); } try { globeManager.WorldMapGlobe.OnCellEnter += HandleOnCellEnter; } catch (System.Exception ex) { errorHandler.CatchException(ex, ErrorState.restart_scene); } } }
void Start() { errorHandler = interfaceFactory.ErrorHandler; gameManager = interfaceFactory.GameManager; globeManager = interfaceFactory.GlobeManager; uiManager = interfaceFactory.UIManager; if (errorHandler == null || gameManager == null || globeManager == null || uiManager == null) { gameObject.SetActive(false); } else { if (componentMissing == true) { errorHandler.ReportError("Pathfinder missing component", ErrorState.restart_scene); } globeParser = globeManager.GlobeParser; if (globeParser == null) { errorHandler.ReportError("Globe Parser missing", ErrorState.restart_scene); } worldMapGlobe = globeManager.WorldMapGlobe; if (worldMapGlobe == null) { errorHandler.ReportError("World Map Globe missing", ErrorState.restart_scene); } playerManager = gameManager.PlayerManager; if (playerManager == null) { errorHandler.ReportError("Player Manager missing", ErrorState.restart_scene); } CellsInRange = globeParser.GetCellsInRange(playerCharacter.CellLocation, TravelRange + 1); } }
void Start() { uiManager = interfaceFactory.UIManager; if (uiManager == null) { ReportError("UI Manager not found", ErrorState.close_application); } gameManager = interfaceFactory.GameManager; if (gameManager == null) { ReportError("Game Manager not found", ErrorState.close_application); } globeManager = interfaceFactory.GlobeManager; if (interfaceFactory.GlobeManager == null) { ReportError("Globe Manager not found", ErrorState.close_application); } if (ErrorState == ErrorState.no_error) { errorUI.CloseUI(); } }
protected virtual void Start() { gameManager = interfaceFactory.GameManager; globeManager = interfaceFactory.GlobeManager; errorHandler = interfaceFactory.ErrorHandler; uiManager = interfaceFactory.UIManager; if (gameManager == null || globeManager == null || errorHandler == null || uiManager == null) { gameObject.SetActive(false); } else { cellCursorInterface = globeManager.CellCursorInterface; if (cellCursorInterface == null) { errorHandler.ReportError("Cell Cursor Interface Missing", ErrorState.restart_scene); } else { mouseCellClicker = cellCursorInterface.CellClicker; if (mouseCellClicker == null) { errorHandler.ReportError("Mouse Cell Clicker Missing", ErrorState.restart_scene); } } } }
protected override void Start() { base.Start(); if (gameObject.activeSelf) { globeManager = interfaceFactory.GlobeManager; uiManager = interfaceFactory.UIManager; if (globeManager == null || uiManager == null) { gameObject.SetActive(false); } else { worldMapGlobe = globeManager.WorldMapGlobe; if (worldMapGlobe == null) { errorHandler.ReportError("World Map Globe Missing", ErrorState.restart_scene); } globeParser = globeManager.GlobeParser; if (globeParser == null) { errorHandler.ReportError("Globe Parser missing", ErrorState.restart_scene); } else { countryParser = globeParser.CountryParser; if (countryParser == null) { errorHandler.ReportError("Country Parser missing", ErrorState.restart_scene); } provinceParser = globeParser.ProvinceParser; if (provinceParser == null) { errorHandler.ReportError("Province Parser missing", ErrorState.restart_scene); } } cellCursorInterface = globeManager.CellCursorInterface; if (cellCursorInterface == null) { errorHandler.ReportError("Cell Cursor Interface missing", ErrorState.restart_scene); } else { cellClicker = cellCursorInterface.CellClicker; if (cellClicker == null) { errorHandler.ReportError("Cell Clicker missing", ErrorState.restart_scene); } } } } }
void Awake() { //Get error handler if (errorHandlerObject == null) { Debug.Log("Error Handler Object Missing"); Application.Quit(); } ErrorHandler = errorHandlerObject.GetComponent(typeof(IErrorHandler)) as IErrorHandler; if (ErrorHandler == null) { Debug.Log("Error Handler Component Missing"); Application.Quit(); } //Check for critical game objects if (gameManagerObject == null) { ErrorHandler.EmergencyExit("Game Manager Object Missing"); } if (uiManagerObject == null) { ErrorHandler.EmergencyExit("UI Manager Object Missing"); } if (globeManagerObject == null) { ErrorHandler.EmergencyExit("Globe Manager Object Missing"); } //Get critical components GameManager = gameManagerObject.GetComponent(typeof(IGameManager)) as IGameManager; if (GameManager == null) { ErrorHandler.ReportError("Game Manager Component Missing", ErrorState.close_application); DisableMainComponents(); } UIManager = uiManagerObject.GetComponent(typeof(IUIManager)) as IUIManager; if (UIManager == null) { ErrorHandler.ReportError("UI Manager Component Missing", ErrorState.close_application); DisableMainComponents(); } GlobeManager = globeManagerObject.GetComponent(typeof(IGlobeManager)) as IGlobeManager; if (GlobeManager == null) { ErrorHandler.ReportError("Globe Manager Component Missing", ErrorState.close_application); DisableMainComponents(); } }
private void Start() { errorHandler = interfaceFactory.ErrorHandler; gameManager = interfaceFactory.GameManager; globeManager = interfaceFactory.GlobeManager; if (errorHandler == null || gameManager == null || globeManager == null) { gameObject.SetActive(false); } else { worldMapGlobe = globeManager.WorldMapGlobe; if (worldMapGlobe == null) { errorHandler.ReportError("World Map Globe missing", ErrorState.restart_scene); } } }
void Start() { gameManager = interfaceFactory.GameManager; globeManager = interfaceFactory.GlobeManager; errorHandler = interfaceFactory.ErrorHandler; if (gameManager == null || globeManager == null || errorHandler == null) { gameObject.SetActive(false); } else { cellCursorInterface = globeManager.CellCursorInterface; if (cellCursorInterface == null) { errorHandler.ReportError("CellCurserInterface no found", ErrorState.restart_scene); } } }
private void Start() { gameManager = interfaceFactory.GameManager; errorHandler = interfaceFactory.ErrorHandler; globeManager = interfaceFactory.GlobeManager; if (gameManager == null || errorHandler == null || globeManager == null) { gameObject.SetActive(false); } else { touristManager = gameManager.TouristManager; if (touristManager == null) { errorHandler.ReportError("Tourist Manager missing", ErrorState.close_window); } worldMapGlobe = globeManager.WorldMapGlobe; if (worldMapGlobe == null) { errorHandler.ReportError("World Map Globe missing", ErrorState.close_window); } mappablesManager = globeManager.MappablesManager; if (mappablesManager == null) { errorHandler.ReportError("Mappables Manager missing", ErrorState.close_window); } else { landmarkManager = mappablesManager.LandmarkManager; if (landmarkManager == null) { errorHandler.ReportError("Landmark Manager missing", ErrorState.close_window); } } started = true; } }
void Start() { globeManager = interfaceFactory.GlobeManager; errorHandler = interfaceFactory.ErrorHandler; if (globeManager == null || errorHandler == null) { gameObject.SetActive(false); } else { if (componentMissing) { errorHandler.ReportError("PlayerManager component missing", ErrorState.restart_scene); } worldMapGlobe = globeManager.WorldMapGlobe; if (worldMapGlobe == null) { errorHandler.ReportError("World Map Globe missing", ErrorState.restart_scene); } } }
void Start() { gameManager = interfaceFactory.GameManager; globeManager = interfaceFactory.GlobeManager; uiManager = interfaceFactory.UIManager; errorHandler = interfaceFactory.ErrorHandler; if (gameManager == null || globeManager == null || uiManager == null || errorHandler == null) { gameObject.SetActive(false); } else { try { globeManager.WorldMapGlobe.OnCellClick += HandleOnCellClick; } catch (System.Exception ex) { errorHandler.CatchException(ex, ErrorState.restart_scene); } } }
private void Start() { globeManager = interfaceFactory.GlobeManager; errorHandler = interfaceFactory.ErrorHandler; if (globeManager == null || errorHandler == null) { gameObject.SetActive(false); } else { if (componentMissing == true) { errorHandler.ReportError("Landmark Manager missing component", ErrorState.restart_scene); } worldMapGlobe = globeManager.WorldMapGlobe; if (worldMapGlobe == null) { errorHandler.ReportError("World Map Globe missing", ErrorState.restart_scene); } started = true; } }
void Start() { globeManager = interfaceFactory.GlobeManager; errorHandler = interfaceFactory.ErrorHandler; uiManager = interfaceFactory.UIManager; if (globeManager == null || errorHandler == null || uiManager == null) { gameObject.SetActive(false); } else { if (componentMissing) { errorHandler.ReportError("GameManager component missing", ErrorState.restart_scene); } ICellCursorInterface cellCursorInterface = globeManager.CellCursorInterface; if (cellCursorInterface == null) { errorHandler.ReportError("CellCursorInterface Missing", ErrorState.restart_scene); } cellClicker = cellCursorInterface.CellClicker; if (cellClicker == null) { errorHandler.ReportError("CellClicker Missing", ErrorState.restart_scene); } gameMenuUI = uiManager.GameMenuUI; if (gameMenuUI == null) { errorHandler.ReportError("Game Menu UI Missing", ErrorState.restart_scene); } gameAmbience.Play(); } }
protected override void Start() { base.Start(); globeManager = FindObjectOfType <InterfaceFactory>().GlobeManager; worldMapGlobe = globeManager.WorldMapGlobe; }