Ejemplo n.º 1
0
    private void AcquireGameObjectsRequiringDataToInitialize() {
        //_fleetMgrs = gameObject.GetSafeMonoBehaviourComponentsInChildren<FleetManager>();
        // Item[] excludedFleetElements = _fleetMgrs.Where(fMgr => fMgr.transform.childCount > 0)
        // .SelectMany(fm => fm.gameObject.GetSafeMonoBehaviourComponentsInChildren<Item>()).ToArray();

        //_systemMgrs = gameObject.GetSafeMonoBehaviourComponentsInChildren<SystemManager>();
        //Item[] excludedSystemElements = _systemMgrs.Where(sMgr => sMgr.transform.childCount > 0)
        // .SelectMany(sm => sm.gameObject.GetSafeMonoBehaviourComponentsInChildren<PlanetoidItem>()).ToArray();

        //_systems = gameObject.GetSafeMonoBehaviourComponentsInChildren<SystemItem>();
        //_settlements = gameObject.GetSafeMonoBehaviourComponentsInChildren<SettlementItem>();

        //Item[] celestialObjects = gameObject.GetSafeMonoBehaviourComponentsInChildren<Item>()
        //.Except(excludedSystemElements).Except(_settlements).Except(excludedFleetElements).ToArray();
        //    Item[] celestialObjects = gameObject.GetSafeMonoBehaviourComponentsInChildren<Item>()
        //.Except(_systems).Except(_settlements).Except(excludedFleetElements).ToArray();

        //_stars = celestialObjects.Where(co => co.gameObject.GetComponent<StarView>() != null).ToArray();
        //_planetoids = celestialObjects.Where(co => co.gameObject.GetComponent<MovingView>() != null).ToArray();
        //_universeCenter = celestialObjects.Single(co => co.gameObject.GetComponent<UniverseCenterView>() != null);
        _universeCenter = gameObject.GetSafeMonoBehaviourComponentInChildren<UniverseCenterItem>();
        //_starBases = gameObject.GetSafeMonoBehaviourComponentsInChildren<StarBaseItem>();
        //_facilities = gameObject.GetSafeMonoBehaviourComponentsInChildren<FacilityItem>();

        //_obstacleLocations = _systems.Select(s => s.transform.position).ToList();
        //_obstacleLocations.Add(_universeCenter.transform.position);
    }
 public UniverseCenterCtxControl(UniverseCenterItem universeCenter)
     : base(universeCenter.gameObject, uniqueSubmenusReqd: Constants.Zero, menuPosition: MenuPositionMode.Offset) {
     _universeCenterMenuOperator = universeCenter;
 }