private void Awake() { //clone configs on startup so we don't modify the global assets questBoard = QuestBoard.Create(questBoard); crewConfig = CrewConfiguration.Create(crewConfig); cargoConfig = Instantiate(cargoConfig); missionsConfig = Instantiate(missionsConfig); market = Instantiate(market); fleetManager = Instantiate(fleetManager); Debug.Assert(worldMap); SceneManager.activeSceneChanged += (oldScene, newScene) => { PlayerNotifications.Clear(); }; FindObjectOfType<MissionManager>().OnMissionChanged += mission => { if (mission) { LocalPlayer = null; } else { LocalPlayer = FindObjectOfType<PlayerShip>(); } }; //apply initial settings ReloadPrefs(); }
public FleetTest() { AppDomain.CurrentDomain.SetRepositoryFactory(() => RepositoryInstance); var validators = new VehicleValidatorCollection().ChassisIsRequired().CheckNumberOfPassagers().ColorIsRequired(); fleetManager = new FleetManager(validators); }
protected override void OnExit(GameState prev, ExitReason reason) { this.App.HotKeyManager.RemoveListener((IKeyBindListener)this); if (this._manager != null) { this._manager.Dispose(); this._manager = (FleetManager)null; } if (this._fleetWidget != null) { this._fleetWidget.OnFleetsModified -= new FleetWidget.FleetsModifiedDelegate(this.FleetsModified); this._fleetWidget.Dispose(); this._fleetWidget = (FleetWidget)null; } foreach (ShipDummy shipDummy in this._shipDummies) { shipDummy.Dispose(); } this._shipDummies = (List <ShipDummy>)null; if (this._camera != null) { this._camera.Dispose(); this._camera = (OrbitCameraController)null; } if (this._crits != null) { this._crits.Dispose(); this._crits = (GameObjectSet)null; } this.App.UI.DestroyPanel(this._contextMenuID); this.App.UI.DestroyPanel(this._shipContextMenuID); this.App.UI.GameEvent -= new UIEventGameEvent(this.UICommChannel_GameEvent); }
public override void Display(string parentMenu) { this.MonitorExitKey(() => { while (true) { Console.Clear(); Console.WriteLine(parentMenu + " Insert Vehicle"); Console.WriteLine(); Console.WriteLine("Press [esc] any time to go back!"); Chassis chassis = CreateChassis(); var vehicleMaker = CreateVehicle(); var color = CreateColor(); var vehicle = vehicleMaker.Invoke(new VehicleMaker(), chassis, (pref) => pref.Paint(color)); Console.WriteLine(); Console.WriteLine("Press [enter] to save the vehicle"); Console.ReadKey(); var result = FleetManager.AddVehicle(vehicle).HandlerErrors((ex) => { Console.WriteLine(ex.Message); }).Result(); if (result.IsSuccess) { this.ShowSuccessMessage(); break; } this.ShowValidationErrors(result.ValidationResult); } }); }
public override void Display(string parentMenu) { this.MonitorExitKey(() => { while (true) { DefaultMessages(parentMenu); Console.Write("Enter the chassis number: "); var chassisNumber = Input.ReadLine(ConsoleKey.Escape); var result = FleetManager .FindVehicleByChassisId(new Core.Domain.Chassis() { ChassisNumber = chassisNumber.ToUint() }) .HandlerErrors() .Result(); DefaultMessages(parentMenu); if (result.IsFail) { Console.WriteLine("Some errors occured"); this.ShowValidationErrors(result.ValidationResult); continue; } PrintVehicleData(result.Model); } }); }
public void Awake() { Instance = this; m_PlayerShips = new List <SpaceObject>(); m_PlayerSmallShips = new List <SpaceObject>(); m_PlayerLargeShips = new List <SpaceObject>(); m_PlayerInterceptors = new List <SpaceObject>(); m_PlayerHeavyAssault = new List <SpaceObject>(); m_PlayerLancer = new List <SpaceObject>(); m_PlayerBomber = new List <SpaceObject>(); m_PlayerSupport = new List <SpaceObject>(); m_PlayerAssaultFregate = new List <SpaceObject>(); m_PlayerArtilleryFregate = new List <SpaceObject>(); m_PlayerSupportFregate = new List <SpaceObject>(); m_PlayerAntiFighterFregate = new List <SpaceObject>(); m_EnemyShips = new List <SpaceObject>(); m_EnemySmallShips = new List <SpaceObject>(); m_EnemyLargeShips = new List <SpaceObject>(); m_EnemyInterceptors = new List <SpaceObject>(); m_EnemyHeavyAssault = new List <SpaceObject>(); m_EnemyLancer = new List <SpaceObject>(); m_EnemyBomber = new List <SpaceObject>(); m_EnemySupport = new List <SpaceObject>(); m_EnemyAssaultFregate = new List <SpaceObject>(); m_EnemyArtilleryFregate = new List <SpaceObject>(); m_EnemySupportFregate = new List <SpaceObject>(); m_EnemyAntiFighterFregate = new List <SpaceObject>(); }
void Awake() { instance = this; fleetmanager = GetComponent <FleetManager>(); routemanager = GetComponent <RouteManager>(); DontDestroyOnLoad(gameObject); }
public override void Display(string parentMenu) { while (true) { Console.Clear(); Console.WriteLine(parentMenu + " List all vehicle"); Console.WriteLine(); Console.WriteLine("Press [esc] any time to go back"); Console.Write("Vehicle".PadRight(10) + "\t"); Console.Write("Chassis Number".PadRight(16) + "\t"); Console.Write("Chassis Series".PadRight(16) + "\t"); Console.Write("Number of Passagers".PadRight(21) + "\t"); Console.Write("Color".PadRight(10)); Console.WriteLine(); //Console.WriteLine("Vehicle\t\t\t\tChassis Number\t\t\t\tChassis Series\t\t\t\tNumber of passagers\t\t\t\tColor"); foreach (var item in FleetManager.ListAllVehicles()) { Console.Write(item.Type.ToString().PadRight(10) + "\t"); Console.Write(item.ChassisId.ChassisNumber.ToString().PadRight(16) + "\t"); Console.Write(item.ChassisId.ChassisSeries.PadRight(16) + "\t"); Console.Write(item.NumberOfPassagers.ToString().PadRight(21) + "\t"); Console.Write(item.Color.PadRight(10) + "\t"); Console.WriteLine(); } var key = Console.ReadKey().Key; if (key == ConsoleKey.Escape) { break; } } }
public override void Enter() { SceneManager.LoadScene("scene1"); fleetManager = owner.GetComponent <FleetManager>(); // Get VideoManager videoManager = GameObject.Find("VideoManager").GetComponent <VideoManager>(); // Set the first 3 ships to attack for (int i = 0; i < fleetManager.ships.Count && i < 3; i++) { Boid ship = fleetManager.ships[i]; ship.GetComponent <StateMachine>().ChangeState(new AttackState(fleetManager.borg)); ship.maxSpeed = Random.Range(20.0f, 30.0f); ship.StartCoroutine(ship.ChangeSpeed()); } // Change Camera Target FollowCamera mainCamera = Camera.main.GetComponent <FollowCamera>(); mainCamera.target = fleetManager.GetComponent <GameObject>(); videoPlayed = false; fleetManager.audioSource.Stop(); fleetManager.audioSource.clip = fleetManager.battleMusic; fleetManager.audioSource.loop = true; fleetManager.audioSource.Play(); //foreach (Ship ship in fleetManager.shipComp) { // ship.audioSource.loop = true; // ship.audioSource.clip = fleetManager.flybySound; // ship.audioSource.Play(); //} }
public override void Enter() { fleetManager = owner.GetComponent <FleetManager>(); // Load the scene and wait for it to initiallise fleetManager.StartCoroutine(LoadScene()); }
void OnEnable() { SolarSystemInstance = this; galaxyViewButton.interactable = false; buildShipButton.interactable = false; fleetManager = GameObject.Find("Player").GetComponent <FleetManager>(); }
// Use this for initialization void Start() { fleetMgmtScript = GameObject.FindGameObjectWithTag("GameController").GetComponent <FleetManager>(); nowTrainingRed = false; nowTrainingBlue = false; nowTrainingGreen = false; timelineScript = GameObject.FindGameObjectWithTag("GameController").GetComponent <TimelineManager>(); }
private void Init() { FleetManager = GameObject.Find(Tags.Manager).GetComponent <FleetManager>(); if (!FleetManager) { Debug.LogError("MissedComponents!"); } }
// Use this for initialization void Start() { fleetManagerScript = gameObject.GetComponent <FleetManager>(); randomEventManagerScript = gameObject.GetComponent <RandomEventManager>(); startTime = Time.time; GameOverScreen.gameObject.SetActive(false); gameEnd = false; gameEndCalculator = GameObject.FindGameObjectWithTag("gameEndCalculator").GetComponent <GameEndCalculator>(); }
private void Init() { //WorldManager = GameObject.FindGameObjectWithTag(Tags.Manager).GetComponent<WorldManager>(); TileManager = GameObject.FindGameObjectWithTag(Tags.Manager).GetComponent <TileManager>(); FleetManager = GameObject.FindGameObjectWithTag(Tags.Manager).GetComponent <FleetManager>(); if (!TileManager || !FleetManager) { Debug.LogError("MissedComponents!"); } }
// Use this for initialization void Start() { GameObject fleetManagerObj = GameObject.Find("FleetManager"); FleetManager fleetManager = fleetManagerObj.GetComponent <FleetManager>(); ships = fleetManager.ships; lastShip = ships[0]; lastShipPos = lastShip.transform.position; startTime = Time.time; }
private void Start() { fleetManager = GetComponent <FleetManager>(); fleetManager.OnGameOver += OnGameOver; spawner = GetComponent <SpawnerMaster>(); spawner.OnPlayerWin += OnPlayerWin; spawner.OnLevelShow += OnLevelShow; spawner.OnLevelHide += OnLevelHide; spawner.OnBossSpawn += OnBossSpawn; spawner.OnBossDeath += OnBossDeath; }
// Use this for initialization void Start() { Object.DontDestroyOnLoad(this); GameObject fleetManagerObj = GameObject.Find("FleetManager"); fleetManager = fleetManagerObj.GetComponent <FleetManager>(); ships = fleetManager.ships; GameObject tractorBeamObject = new GameObject(); tractorBeamObject.transform.parent = this.transform; tractorBeamObject.AddComponent <LineRenderer>(); GameObject cuttingBeamObject = new GameObject(); cuttingBeamObject.transform.parent = this.transform; cuttingBeamObject.AddComponent <LineRenderer>(); // Setup tractor beam tractorBeam = tractorBeamObject.GetComponent <LineRenderer>(); tractorBeam.material = tractorBeamMaterial; tractorBeam.startWidth = 0.1f; tractorBeam.endWidth = 5.0f; //StartCoroutine(TractorBeamTarget()); // Setup cutting beam cuttingBeam = cuttingBeamObject.GetComponent <LineRenderer>(); cuttingBeam.material = cuttingBeamMaterial; cuttingBeam.startWidth = 0.5f; cuttingBeam.endWidth = 0.5f; //StartCoroutine(CuttingBeamTarget()); // Setup Audio Sources cuttingBeamAudioSource = this.GetComponents <AudioSource>()[0]; tractorBeamAudioSource = this.GetComponents <AudioSource>()[1]; cuttingBeamAudioSource.clip = cuttingBeamSound; cuttingBeamAudioSource.loop = true; tractorBeamAudioSource.clip = tractorBeamSound; tractorBeamAudioSource.volume = 0.5f; tractorBeamAudioSource.loop = true; videoManager = GameObject.Find("VideoManager").GetComponent <VideoManager>(); }
public override void Enter() { fleetManager = owner.GetComponent <FleetManager>(); // Get inital no of ships alive initialShipsAlive = fleetManager.ships.Count; // Create the next attacking wave NextWave(); // Load the scene and wait for it to initiallise fleetManager.StartCoroutine(LoadScene()); }
public override void Enter() { fleetManager = owner.GetComponent <FleetManager>(); // Get VideoManager videoManager = GameObject.Find("VideoManager").GetComponent <VideoManager>(); // Load the scene and wait for it to initiallise fleetManager.StartCoroutine(LoadScene()); // Destroy the USS Saratoga fleetManager.StartCoroutine(DestroySaratoga()); }
public void LoadDesigns() { _fleetManager = _gameMain.EmpireManager.CurrentEmpire.FleetManager; bool moreThanOneDesign = _fleetManager.CurrentDesigns.Count > 1; _maxVisible = _fleetManager.CurrentDesigns.Count; for (int i = 0; i < _maxVisible; i++) { if (i < _fleetManager.CurrentDesigns.Count) { var shipDesign = _fleetManager.CurrentDesigns[i]; //_shipSprites[i] = currentEmpire.EmpireRace.GetShip(shipDesign.Size, shipDesign.WhichStyle); _shipNameLabels[i].SetText(shipDesign.Name); _scrapButtons[i].Active = moreThanOneDesign; _beamDefValueLabels[i].SetText(shipDesign.BeamDefense.ToString()); _missileDefValueLabels[i].SetText(shipDesign.MissileDefense.ToString()); _attackLevelValueLabels[i].SetText(shipDesign.AttackLevel.ToString()); _hitPointsValueLabels[i].SetText(shipDesign.MaxHitPoints.ToString()); _shieldValueLabels[i].SetText(shipDesign.ShieldLevel.ToString()); _galaxySpeedValueLabels[i].SetText(shipDesign.GalaxySpeed.ToString()); _combatSpeedValueLabels[i].SetText(shipDesign.ManeuverSpeed.ToString()); _costValueLabels[i].SetText(string.Format("{0:0.0}", shipDesign.Cost)); int j = 0; foreach (var weapon in shipDesign.Weapons) { if (weapon.Key != null) { _weaponLabels[i][j].SetText(string.Format("{0:00} {1}", weapon.Value, weapon.Key.DisplayName)); } j++; } for (; j < 4; j++) { //Set the rest of unused weapon slots to blank _weaponLabels[i][j].SetText(string.Empty); } for (j = 0; j < 3; j++) { if (shipDesign.Specials[j] != null) { _specialLabels[i][j].SetText(shipDesign.Specials[j].DisplayName); } else { _specialLabels[i][j].SetText(string.Empty); } } _amountValueLabels[i].SetText(_fleetManager.GetShipCount(shipDesign).ToString()); } } }
public async Task TestInsertTelemetryAndUpdateRobotsAsync_UpsertTelemetry_ExpectedExecutions(int numItems) { mockCosmosClientTelemetry.Setup(x => x.UpsertItemAsync(It.IsAny <RobotTelemetry>(), It.IsAny <PartitionKey>())).Throws(new Exception("invalid")); FleetManager fleetManager = new FleetManager(mockIotClient.Object, mockCosmosClientRobot.Object, telemetryHandler, mockLogger.Object); IEnumerable <RobotTelemetry> testTelemetry = GetTestTelemetry(numItems); // should not throw exception await fleetManager.InsertTelemetriesAndUpdateRobotsAsync(testTelemetry); mockCosmosClientTelemetry.Verify(x => x.UpsertItemAsync(It.IsAny <RobotTelemetry>(), It.IsAny <PartitionKey>()), Times.Exactly(numItems)); }
// Use this for initialization void OnEnable() { minSecurityLevel = minSecurityLevel * 0.01f; eventName.text = (eventNameString); startTime = Time.time; fleetManagerScript = GameObject.FindGameObjectWithTag("GameController").GetComponent <FleetManager>(); randomEventManagerScript = GameObject.FindGameObjectWithTag("GameController").GetComponent <RandomEventManager>(); reducePopPercentBy = reducePopPercentBy * 0.01f; reduceAirBy = reduceAirBy * 0.01f; reduceFuelBy = reduceFuelBy * 0.01f; reduceFoodBy = reduceFoodBy * 0.01f; eventEnd = false; pauseTime = 0f; }
static void Main(string[] args) { RepositoryService.RegisterDefaultRepository(); var validators = new VehicleValidatorCollection().ChassisIsRequired().CheckNumberOfPassagers().ColorIsRequired(); FleetManager fleetManager = new FleetManager(validators); Menu menu = new Menu(); menu.Add("Insert a new vehicle", (context) => { context.NavigateTo(new InsertVehiclePage(fleetManager)); }); menu.Add("Edit an existing vehicle", (context) => { context.NavigateTo(new EditVehiclePage(fleetManager)); }); menu.Add("Delete an existing vehicle", (context) => { context.NavigateTo(new DeleteVehiclePage(fleetManager)); }); menu.Add("List all vehicles", (context) => { context.NavigateTo(new ListVehiclesPage(fleetManager)); }); menu.Add("Find vehicle by chassis id", (context) => { context.NavigateTo(new VehicleDetailsPage(fleetManager)); }); menu.Add("Exit", (context) => { context.Exit(); }); menu.Display(); }
void Awake() { if (instance != null) { Destroy(instance); } instance = this; List = new List <Fleet> (); foreach (Fleet f in FindObjectsOfType <Fleet> ()) { RegisterFleet(f); } }
public void LoadScreen() { var currentEmpire = _gameMain.EmpireManager.CurrentEmpire; _fleetManager = currentEmpire.FleetManager; var fleets = _fleetManager.GetFleets(); int i; for (i = 0; i < _fleetManager.CurrentDesigns.Count; i++) { _shipNames[i].SetText(_fleetManager.CurrentDesigns[i].Name); _shipNames[i].Enabled = true; if (_fleetManager.CurrentDesigns.Count > 1) { _scrapButtons[i].Active = true; } else { //Only one ship design left _scrapButtons[i].Active = false; } } for (; i < 6; i++) { _shipNames[i].SetText(string.Empty); _shipNames[i].Enabled = false; _scrapButtons[i].Active = false; } _scrollBar.TopIndex = 0; if (fleets.Count > 10) { _maxVisible = 10; _scrollBar.SetEnabledState(true); _scrollBar.SetAmountOfItems(fleets.Count); } else { _maxVisible = fleets.Count; _scrollBar.SetEnabledState(false); _scrollBar.SetAmountOfItems(10); } _maintenanceAmountLabel.SetText(string.Format("{0:0.0} BC", currentEmpire.ShipMaintenance)); Refresh(); }
public override void Enter() { owner.GetComponent <Boid>().velocity = Vector3.zero; Ship ship = owner.GetComponent <Ship>(); fleetManager = ship.fleetManager; Boid boid = owner.GetComponent <Boid>(); boid.acceleration = Vector3.zero; boid.velocity = Vector3.ClampMagnitude(boid.velocity, 0.0001f); boid.minMaxSpeed = 0.0f; boid.maxMaxSpeed = 0.0f; }
public override void Enter() { fleetManager = owner.GetComponent <FleetManager>(); // Get VideoManager //videoManager = GameObject.Find("VideoManager").GetComponent<VideoManager>(); //videoManager.playingVideo = false; // Load the scene and wait for it to initiallise fleetManager.StartCoroutine(LoadScene()); //videoPlayed = false; // Destroy the USS Melbourne fleetManager.StartCoroutine(DestroyMelbourne()); }
internal World(List <Notification> dailyNotifications, List <Notification> liveNotifications, DataLock dataLock) { _dailyNotifications = dailyNotifications; _liveNotifications = liveNotifications; _datalock = dataLock; EventManager = new EventManager(this); RealmManager = new RealmManager(this); FleetManager = new FleetManager(this); ProvinceManager = new ProvinceManager(this); CharacterManager = new CharacterManager(this); Calendar = new Calendars.Calendar(this); Managers = new List <Manager> { Calendar, FleetManager, RealmManager, ProvinceManager, CharacterManager }; Managers.ForEach(m => m.Initialize()); }
// Use this for initialization void OnEnable() { fleetManScript = GameObject.FindGameObjectWithTag("GameController").GetComponent <FleetManager>(); gameEndCalculator = GameObject.FindGameObjectWithTag("gameEndCalculator").GetComponent <GameEndCalculator>(); joblessR = fleetManScript.joblessR; joblessG = fleetManScript.joblessG; joblessB = fleetManScript.joblessB; R.value = 0f; G.value = 0f; B.value = 0f; R.maxValue = joblessR; G.maxValue = joblessG; B.maxValue = joblessB; }
private void UpdateColor(IVehicle vehicle) { Console.WriteLine(); Console.Write("Enter the vehicle color: "); var color = Input.ReadLine(exitKey: ConsoleKey.Escape); vehicle.Color = color; var result = FleetManager.UpdateVehicleRegister(vehicle).HandlerErrors().Result(); if (result.IsFail) { Console.WriteLine("Some errors occured"); this.ShowValidationErrors(result.ValidationResult); } else { this.ShowSuccessMessage(); } }
public void CompleteShip(Attributes inAtt, int inID, FleetManager mng) { Debug.Log(gameObject.name); if (photonView == null) photonView = this.gameObject.GetComponent<PhotonView>(); manager = mng; attributes = inAtt; this.ID = inID; this.gameObject.name = "Ship_" + attributes.name + ID; this.tag = "Ship"; this.shipObject = this.gameObject; if (this.gameObject.GetComponent<Rigidbody>() == null) this.gameObject.AddComponent<Rigidbody>(); type = (ShipClass)Enum.Parse(typeof(ShipClass), attributes.type.ToUpper()); //modelName = shipModel.name; faction = attributes.faction; FactionTracker.Instance.GetFaction(faction).ShipCreated(); attributes.structureHealth = 100; this.gameObject.transform.localScale = attributes.initialScale; //transform.localScale = new Vector3(50,50,50); rigidbody.mass = attributes.mass; rigidbody.angularDrag = 1; rigidbody.drag = 0.2f; rigidbody.useGravity = false; behavior = new DoNothing(this); gameObject.tag = "AiShip"; PopulateRigPoints(); //PopulateCameraPoints(); if (photonView.isMine) CreateTurretsRandom(); else photonView.RPC("RequestTurretSyncRPC", PhotonTargets.MasterClient, PhotonNetwork.player.ID); CalculateAttributes(); buffs = new Buff(this); }
public Fleet(FleetManager inManager, Ship inShip) { manager = inManager; fleetLeader = inShip; }
public void RequestFleetShuffle() { if (fleetManager == null) { GameObject requiredObject = GameObject.FindGameObjectWithTag("required"); fleetManager = requiredObject.GetComponent<FleetManager>(); } shuffleArray = new int[fleetManager.GetFleetListCount()]; for (int ndx = 0; ndx < shuffleArray.Length; ndx++) shuffleArray[ndx] = ndx; System.Random r = new System.Random(); for (int i = shuffleArray.Length; i > 0; i--) { int j = r.Next(i); int k = shuffleArray[j]; shuffleArray[j] = shuffleArray[i - 1]; shuffleArray[i - 1] = k; } }
void SwitchToStation() { if (flManager == null) flManager = GameObject.Find("_Required").GetComponent<FleetManager>(); cam.enabled = true; // If there user interface is null - get it. if (userInterface == null) userInterface = Game.uiManager.GetComponentInChildren<SpaceStationUI>(); //TODO: Enable Mouse Orbit here. // Dont allow player ship to move. player.rigidbody.isKinematic = true; List<MeshCollider> meshes = new List<MeshCollider>(player.transform.root.GetComponentsInChildren<MeshCollider>()); foreach (MeshCollider meshCol in meshes) meshCol.enabled = false; // Disables all player ship scripts player.DisableScripts(); // Disables current player camera and sets position to construction area player.GetCurrentCamera().enabled = false; player.transform.position = constructionArea.position; //player.transform.root.parent = constructionArea.transform; player.transform.rotation = transform.rotation; // Activates the UI Camera and UI userInterface.EnableUI(this); userInterface.UICamera.gameObject.SetActive(true); HideAndClearUI(); // Tells station is is entered. state = StationState.ENTERED; // Copys player data to station holdingPlayer = player; flManager.playerShips.Remove(player); foreach (Weapon wpn in holdingPlayer.Weapons) { wpn.Target = null; } // Populates Rig Points //PopulateUpgradePoints(); // Enables Mouse Camera Movement. orbitView.enabled = true; }
void CreateFleetManager() { Debug.Log("Creating new Fleet Manager"); fleetManager = GameObject.FindGameObjectWithTag("required").GetComponent<FleetManager>(); fleetManager.FleetManager_New(seedArray, ID); }
// Use this for initialization void Start() { flManager = GameObject.Find("_Required").GetComponent<FleetManager>(); Transform[] tmp = this.GetComponentsInChildren<Transform>(); for (int i = 0; i < tmp.Length; i++) { if (tmp[i].tag == "CameraPoint") { camPoint = tmp[i]; cam = camPoint.GetComponent<Camera>(); orbitView = camPoint.GetComponent<MouseOrbitImproved>(); } if (tmp[i].tag == "ConstructionPoint") { constructionArea = tmp[i]; if (orbitView != null) orbitView.target = constructionArea; } } GameObject.FindGameObjectWithTag("required").GetComponent<Game>().AddSpaceStation(this); if (cam == null) { Debug.Log("NO CAMERA ON STATION:: " + name); return; } else cam.enabled = false; if (constructionArea == null) { Debug.Log("NO CONSTRUCTION AREA ON STATION:: " + name); return; } }