private void Start() { gameManager = interfaceFactory.GameManager; errorHandler = interfaceFactory.ErrorHandler; uiManager = interfaceFactory.UIManager; if (gameManager == null || errorHandler == null || uiManager == null) { gameObject.SetActive(false); } else { touristManager = gameManager.TouristManager; if (touristManager == null) { errorHandler.ReportError("Tourist Manager missing", ErrorState.restart_scene); } inventoryUI = uiManager.InventoryUI; if (inventoryUI == null) { errorHandler.ReportError("Inventory UI missing", ErrorState.restart_scene); } started = true; } }
protected override void Start() { base.Start(); if (gameObject.activeSelf) { if (componentMissing == true) { errorHandler.ReportError("Tourist component missing", ErrorState.close_window); } dropOffUI = uiManager.DropOffUI; if (dropOffUI == null) { errorHandler.ReportError("Drop Off UI missing", ErrorState.restart_scene); } touristManager = gameManager.TouristManager; if (touristManager == null) { errorHandler.ReportError("Tourist Manager missing", ErrorState.restart_scene); } scoreManager = gameManager.ScoreManager; if (scoreManager == null) { errorHandler.ReportError("Score Manager missing", ErrorState.restart_scene); } inventoryPopUpUI = uiManager.InventoryPopUpUI; if (inventoryPopUpUI == null) { errorHandler.ReportError("Inventory Pop Up UI missing", ErrorState.restart_scene); } //Set Tourist Destination destinationSet = destinationSetter.SetDestination(this, touristManager.CurrentRegion); if (!destinationSet) { errorHandler.ReportError("Tourist destination not set", ErrorState.close_window); } } }
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; } }
protected override void Start() { base.Start(); if (gameObject.activeSelf) { if (componentMissing == true) { errorHandler.ReportError("Player Character missing component", ErrorState.restart_scene); } else { landmarkParser = globeParser.LandmarkParser; if (landmarkParser == null) { errorHandler.ReportError("Landmark parser missing", ErrorState.restart_scene); } navigationUI = uiManager.NavigationUI; if (navigationUI == null) { errorHandler.ReportError("Navigation UI missing", ErrorState.restart_scene); } touristManager = gameManager.TouristManager; if (touristManager == null) { errorHandler.ReportError("Tourist Manager missing", ErrorState.restart_scene); } else { for (int i = 0; i < STARTING_NUMBER_OF_TOURISTS; i++) { touristManager.GenerateTourist(); } } cameraManager = gameManager.CameraManager; if (cameraManager == null) { errorHandler.ReportError("Camera Manager missing", ErrorState.restart_scene); } else { cameraManager.OrientOnLocation(VectorLocation); } turnsManager = gameManager.TurnsManager; if (turnsManager == null) { errorHandler.ReportError("Turns Manager missing", ErrorState.restart_scene); } else { turnsManager.TurnBasedObjects.Add(this); } Vehicle.InitVehicles(); ClimateCosts = Vehicle.GetClimateVehicle("Mild"); UpdateLocation(CellLocation.index); } } }