Example #1
0
 public void Awake()
 {
     instance = this;
     _textBarText = textBar.GetComponentInChildren<Text>();
     textBar.canvasRenderer.SetAlpha(0);
     _textBarText.canvasRenderer.SetAlpha(0);
 }
Example #2
0
        public static void Postfix(ref UIMain __instance)
        {
            RectTransform dynamicCanvas = (RectTransform)__instance.transform.Find("DynamicCanvas");
            RectTransform menu          = (RectTransform)dynamicCanvas.transform.Find("Menu");
            //Updating the Credits Button Text
            RectTransform btnMember = (RectTransform)menu.Find("BtnMember");
            RectTransform btn       = (RectTransform)btnMember.Find("Btn");
            RectTransform btn_text  = (RectTransform)btn.Find("Text");

            UnityEngine.UI.Text btn_text_text = (UnityEngine.UI.Text)btn_text.gameObject.GetComponentInChildren(typeof(UnityEngine.UI.Text));
            btn_text_text.text = "Credits";

            /*
             * Reducing Menu Button Font Size
             * menu.Find("BtnContinue").Find("Btn").Find("Text").GetComponent<Text>().fontSize = 20;
             * menu.Find("BtnNewGame").Find("Btn").Find("Text").GetComponent<Text>().fontSize = 23;
             * menu.Find("BtnLoadGame").Find("Btn").Find("Text").GetComponent<Text>().fontSize = 23;
             * menu.Find("BtnSystem").Find("Btn").Find("Text").GetComponent<Text>().fontSize = 16;
             * menu.Find("BtnQuitGame").Find("Btn").Find("Text").GetComponent<Text>().fontSize = 23;
             */

            //Focing the UI to update itself after all the changes we made. We just force every RectTransform to update itself
            for (int i = 0; i < __instance.transform.childCount; ++i)
            {
                Transform t = __instance.transform.GetChild(i);
                if (t != null && t.GetType() == typeof(RectTransform))
                {
                    RectTransform rt = t as RectTransform;
                    rt.ForceUpdateRectTransforms();
                }
            }
        }
 // Use this for initialization
 void Start()
 {
     MainCamera     = GameObject.FindWithTag("MainCamera");
     OxygenVariable = MainCamera.GetComponent <UIMain>();
     Storm          = GameObject.FindGameObjectWithTag("SandStorm");
     SCP            = GameObject.Find("ShieldControlPanel").GetComponent <ShieldControlPanel>();
 }
Example #4
0
 // Use this for initialization
 void Start()
 {
     MainCamera = GameObject.FindWithTag("MainCamera");
     CrossCheck = MainCamera.GetComponent <CrossHair>();
     AddMineral = MainCamera.GetComponent <UIMain>();
     MCollider  = this.GetComponent <MeshCollider>();
 }
Example #5
0
        public static void AddKSC2()
        {
            CelestialBody body    = ConfigUtil.GetCelestialBody("HomeWorld");
            var           mods    = body.pqsController.transform.GetComponentsInChildren <PQSCity>(true);
            PQSCity       ksc2PQS = null;

            foreach (var m in mods)
            {
                if (m.name == "KSC2")
                {
                    ksc2PQS = m;
                    break;
                }
            }

            if (ksc2PQS == null)
            {
                return;
            }

            StaticInstance ksc2Instance = new StaticInstance();

            ksc2Instance.gameObject = ksc2PQS.gameObject;
            //ksc2Instance.gameObject = ksc2PQS.gameObject.GetComponentsInChildren<Transform>(true).Where(x => x.name.Equals("launchpad", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault().gameObject;
            ksc2Instance.hasLauchSites = true;
            //ksc2Instance.pqsCity = ksc2PQS;
            ksc2Instance.RadialPosition = ksc2PQS.repositionRadial;
            ksc2Instance.RefLatitude    = KKMath.GetLatitudeInDeg(ksc2PQS.repositionRadial);
            ksc2Instance.RefLongitude   = KKMath.GetLongitudeInDeg(ksc2PQS.repositionRadial);
            ksc2Instance.CelestialBody  = body;
            ksc2Instance.groupCenter    = StaticDatabase.GetGroupCenter(body.name + "_KSC2_Builtin");

            ksc2.staticInstance     = ksc2Instance;
            ksc2.LaunchSiteName     = "KSC2";
            ksc2.LaunchPadTransform = "launchpad/PlatformPlane";

            ksc2.LaunchSiteAuthor      = "KerbalKonstructs";
            ksc2.logo                  = UIMain.MakeSprite("KerbalKonstructs/Assets/DefaultSiteLogo");
            ksc2.LaunchSiteType        = SiteType.VAB;
            ksc2.sitecategory          = LaunchSiteCategory.RocketPad;
            ksc2.LaunchSiteDescription = "The hidden KSC2";
            ksc2.body                  = ConfigUtil.GetCelestialBody("HomeWorld");
            ksc2.refLat                = (float)ksc2Instance.RefLatitude;
            ksc2.refLon                = (float)ksc2Instance.RefLongitude;
            ksc2.refAlt                = (float)(body.pqsController.GetSurfaceHeight(ksc2PQS.repositionRadial) - body.Radius);
            ksc2.LaunchSiteLength      = 15f;
            ksc2.LaunchSiteWidth       = 15f;
            ksc2.InitialCameraRotation = 135f;
            ksc2.staticInstance.mesh   = ksc2PQS.gameObject;
            ksc2.OpenCost              = 1f;
            ksc2.SetClosed();
            ksc2.LaunchSiteIsHidden = true;
            ksc2.isSquad            = true;

            ksc2Instance.launchSite = ksc2;
            ksc2Instance.groupCenter.launchsites.Add(ksc2);

            RegisterLaunchSite(ksc2);
        }
Example #6
0
        static void Main(string[] args)
        {
            UIMain ui = new UIMain(new LoginScreen());

            ui.ApplicationStart();

            Console.ReadKey();
        }
Example #7
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     gameoverUI.SetActive(false);
 }
Example #8
0
 public void Awake()
 {
     UiMain         = Global.FindChild <UIMain>(transform, "UIMain");
     UiYesNo        = Global.FindChild <UIYesNo>(transform, "UIYesNo");
     UiSubtitle     = Global.FindChild <UISubtitle>(transform, "UISubtitle");
     UiClock        = Global.FindChild <UIClock>(transform, "UIClock");
     UiDownLoadMask = Global.FindChild <UIDownLoadMask>(transform, "UIDownLoadMask");
 }
        public ObserverForm(UIMain uiMain, CanvasObserver observer)
        {
            m_uiMain = uiMain;
            Observer = observer;
            InitializeComponent();

            Observer.Updated += OnObserverUpdated;
        }
Example #10
0
 void Start()
 {
     MainCamera    = GameObject.FindWithTag("MainCamera");
     CrossCheck    = MainCamera.GetComponent <CrossHair>();
     Player        = GameObject.FindWithTag("Player");
     FPSController = Player.GetComponent <FirstPersonController>();
     AddResource   = MainCamera.GetComponent <UIMain>();
 }
Example #11
0
    // Use this for initialization
    void Start()
    {
        Target = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>();
        this.GetComponent <Navigation>().enabled   = false;
        this.GetComponent <NavMeshAgent>().enabled = false;

        MainCamera  = GameObject.FindWithTag("MainCamera");
        AddResource = MainCamera.GetComponent <UIMain>();
    }
Example #12
0
    public override bool SysEnter()
    {
        GameObject cObj = UINodesManager.Instance.OpenUI("UIMain");

        if (null != cObj)
        {
            m_cUICtrl = cObj.AddUniqueComponent <UIMain>();
        }
        return(false);
    }
Example #13
0
    GameObject m_portrait;              //头像


    static public UIMain GetInstance()
    {
        UIMain self = UIManager.Singleton.GetUIWithoutLoad <UIMain>();

        if (self == null)
        {
            self = UIManager.Singleton.LoadUI <UIMain>("UI/UIMain", UIManager.Anchor.Center);
        }
        return(self);
    }
Example #14
0
    public override void SysLeave()
    {
        if (null != m_cUICtrl)
        {
            Destroy(m_cUICtrl.gameObject);
            m_cUICtrl = null;
        }

        base.SysLeave();
    }
Example #15
0
        public SettingsForm(UIMain uiMain)
        {
            m_uiMain = uiMain;

            m_uiMain.SimulationStateChanged += SimulationOnStateChanged;

            InitializeComponent();

            UpdateSubstitutedArguments();
        }
Example #16
0
    void Start()
    {
        MainCamera  = GameObject.FindWithTag("MainCamera");
        CrossCheck  = MainCamera.GetComponent <CrossHair>();
        AddResource = MainCamera.GetComponent <UIMain>();
        Script      = Treasure.GetComponent <TreasurePanel>();
        boxCollider = Treasure.GetComponent <BoxCollider>();

        Player        = GameObject.FindWithTag("Player");
        FPSController = Player.GetComponent <FirstPersonController>();
    }
    private bool OpenWarehouse()
    {
        if (_ship.currentSettlement != null && _ship.currentSettlement.warehouse != null)
        {
            _ship.SetSailState(SailState.None);
            UIMain.OpenWarehouse(_ship.currentSettlement.warehouse);
            return(true);
        }

        return(false);
    }
    private bool OpenBank()
    {
        if (_ship.currentSettlement != null && _ship.currentSettlement.bank != null)
        {
            _ship.SetSailState(SailState.None);
            UIMain.OpenBank(_ship.currentSettlement.bank);
            return(true);
        }

        return(false);
    }
        public void OnGUI()
        {
            GUI.skin = HighLogic.Skin;

            if (!KerbalKonstructs.instance.bStylesSet)
            {
                UIMain.setStyles();
                KerbalKonstructs.instance.bStylesSet = true;
            }

            draw.Invoke();
        }
    public void Fill(DailyForecast forecast)//method for UI filling with getting data
    {
        scale = 1.0F;
        UIMain main = FindObjectOfType <UIMain>();

        picture.sprite = main.Pictures[forecast.Code];
        this.day.text  = forecast.Date.Day + " " + forecast.Date.DayOfWeek;

        string temp   = (forecast.Temp.HasValue) ? string.Format("{0:#} \u00B0C\n", forecast.Temp) : string.Empty;
        string result = string.Format("{0}\n{1}Min: {2:#} \u00B0C\nMax: {3:#} \u00B0C", forecast.Text, temp, forecast.Low, forecast.High);

        this.weatherInfo.text = result;
    }
Example #21
0
    private void Awake()
    {
        deskBuilder        = GetComponentInChildren <UIDeskBuilder>(true);
        tabSelectorBuilder = GetComponentInChildren <UITabSelectorBuilder>(true);

        //Database currentDatabase = savedDatabase != null ? savedDatabase.data : new Database();
        //CurrentUI = new UIMain(currentDatabase);
        //DatapackSerializer.Serialize(currentDatabase, databaseSavePath);

        ///Database currentDatabase = DatapackSerializer.Deserialize(databaseSavePath);

        savePath  = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\Save";
        CurrentUI = new UIMain(savePath);
    }
Example #22
0
        public Scene(GLControl glControl, UIMain uiMain)
        {
            m_control   = glControl;
            m_uiMain    = uiMain;
            m_conductor = m_uiMain.Conductor;
            m_conductor.ModelProvider.ModelUpdated += OnModelUpdated;

            m_camera = new Camera
            {
                Position    = new Vector3(5, 100, 100),
                Orientation = new Vector3((float)Math.PI, (float)(-Math.PI / 4), 0)
            };

            m_gridModel = new GridModel(GridWidth, GridDepth, GridCellSize);

            //InjectCamera();
        }
Example #23
0
    public override bool SysEnter()
    {
        UIMain ctrlFightUI = FightUISys.instance.uiCtrl;

        mLeftJoystick = new Joystick();
        mLeftJoystick.Init(UINodesManager.UICamera.WorldToScreenPoint(ctrlFightUI.JoystickPanel.position), 0.0f, Screen.width / 2.0f, true);

        //mRightJoystick = new Joystick();
        //mRightJoystick.Init(ctrlFightUI.JoystickPanel.position, 4.0f * Screen.width / 5.0f, Screen.width, false);

        mLeftJoystick.OnMoveListener    += OnHeroMove;
        mLeftJoystick.OnMoveEndListener += OnHeroMoveEnd;

        //mRightJoystick.OnMoveListener += OnChangeSight;

        return(base.SysEnter());
    }
Example #24
0
        internal void ParseLSConfig(StaticInstance instance, ConfigNode cfgNode)
        {
            staticInstance = instance;
            body = staticInstance.CelestialBody;

            if (cfgNode != null)
            {
                LaunchSiteParser.ParseConfig(this, cfgNode);
            }




            if (!string.IsNullOrEmpty(LaunchSiteLogo))
            {
                logo = UIMain.MakeSprite(LaunchSiteLogo);

                if (logo == null)
                {
                    logo = UIMain.MakeSprite(staticInstance.model.path + "/" + LaunchSiteLogo);
                }
            }
            // use default logo
            if (logo == null)
            {
                logo = UIMain.MakeSprite("KerbalKonstructs/Assets/DefaultSiteLogo");
            }

            if (!string.IsNullOrEmpty(LaunchSiteIcon))
            {

                icon = UIMain.MakeSprite(LaunchSiteIcon);
                if (icon == null)
                {
                    icon = UIMain.MakeSprite(staticInstance.model.path + "/" + LaunchSiteIcon);
                }
            }

            refLon = (float)Math.Round(KKMath.GetLongitudeInDeg(staticInstance.RadialPosition), 2);
            refLat = (float)Math.Round(KKMath.GetLatitudeInDeg(staticInstance.RadialPosition), 2);

            refAlt = (float)staticInstance.CelestialBody.GetAltitude(staticInstance.position);

        }
Example #25
0
    IEnumerator WaitTimeEnter(float waitTime)
    {
        c_Enter  = false;
        CarSpeed = m_Camera.GetComponent <UIMain>();
        c_Main.GetComponent <Rigidbody>().isKinematic        = false;
        c_Main.GetComponent <CarMain>().enabled              = true;
        m_Camera.GetComponent <CrossHair>().crossHair_Enable = false;
        m_Camera.GetComponent <Camera>().enabled             = false;
        Player.GetComponent <CharacterController>().enabled  = false;
        Arms.SetActive(false);
        Player.transform.position = c_Main.transform.position;
        Player.transform.SetParent(c_Main.transform);
        c_Camera.GetComponent <Camera>().enabled = true;
        yield return(new WaitForSeconds(waitTime));

        c_SpeedOn = true;
        c_InCar   = true;
        c_Main.GetComponent <CarMain>().maxTorque = 450f;
    }
        public UIElement GetUI()
        {
            if (UIMain.IsNull())
            {
                return(new UIElement());
            }
            var Container = UIMain.Content as Grid;

            UIMain.Content        = null;
            Container.DataContext = this;
            Container.Loaded     += (s, e) =>
            {
                if (!Loaded)
                {
                    Loaded   = true;
                    Selected = 0;
                }
            };
            return(Container);
        }
 // Use this for initialization
 void Start()
 {
     ui = GameObject.FindGameObjectWithTag ("UIMain").GetComponent<UIMain> ();
     worldMap = GameObject.FindGameObjectWithTag ("GameController").GetComponent<WorldMap> ();
     player = GameObject.FindGameObjectWithTag ("Player").GetComponent<Player> ();
 }
        public Bootstrapper()
        {
            _fileRepository       = new FileRepository();
            _logger               = CreateLogger();
            _dataProcessingParams = new DataProcessingParams();

            _httpDownloader = new HttpDownloader();
            _webCrawlerMain = new WebCrawlerMain(
                httpDownloader: _httpDownloader,
                measurementPointUtility: new MeasurementPointConfigUtility(
                    timeConverter: new TimeConverter(),
                    fileRepository: _fileRepository),
                stringEditUtility: new StringEditUtility());

            _modelRule0             = new ModelRule(0);
            _modelRule1             = new ModelRule(1);
            _modelRule2             = new ModelRule(2);
            _modelRule3             = new ModelRule(3);
            _modelRule4             = new ModelRule(4);
            _modelRule5             = new ModelRule(5);
            _modelRule6             = new ModelRule(6);
            _modelRule7             = new ModelRule(7);
            _modelRule8             = new ModelRule(8);
            _modelRule9             = new ModelRule(9);
            _modelRuleNoMatch       = new ModelRuleNoMatch();
            _bitmapProcessingParams = new BitmapProcessingParams();
            _inputCreator           = new InputCreator();

            _imageLoader = new ImageLoader(
                fileRepository: _fileRepository,
                bitmapProcessingParams: _bitmapProcessingParams,
                bitmapProcessor: new BitmapProcessor(
                    crop: new Crop(
                        rect: new Rectangle()),
                    grayscale: new Grayscale(0, 0, 0),
                    contrastStretch: new ContrastStretch(),
                    resizeBilinear: new ResizeBilinear(1, 1),
                    bitmapProcessingParams: _bitmapProcessingParams));

            _imageRecognitionMain = new ImageRecognitionMain(
                fileRepository: _fileRepository,
                bitmapProcessingParams: _bitmapProcessingParams,
                machine: new Machine(
                    inputCreator: _inputCreator,
                    outputCreator: new OutputCreator(),
                    learning: new Learning(),
                    imageLoader: _imageLoader),
                imageRecognizer: new ImageRecognizer(
                    fileRepository: _fileRepository,
                    imageLoader: _imageLoader,
                    inputCreator: _inputCreator,
                    predictionHandler: new PredictionHandler(
                        fileRepository: _fileRepository,
                        firstDigitModelMatcher: new FirstDigitModelMatcher(
                            modelRules: GetFirstModelRules()),
                        secondDigitModelMatcher: new SecondDigitModelMatcher(
                            modelRules: GetSecondModelRules()),
                        logger: _logger)),
                logger: _logger);

            _dataProcessor = GetDataProcessor();

            _inputValidator = new InputValidator();
            _csvUtility     = new CsvUtility(_fileRepository);
            _contextLoader  = new ProcessingContextLoader(
                folderChooser: new FolderChooser(
                    fileRepository: _fileRepository,
                    folderInfo: new FolderInfo(),
                    inputValidator: _inputValidator),
                configLoader: new LocatioSettingsLoader(
                    fileRepository: _fileRepository),
                configChooser: new ConfigChooser(
                    fileRepository: _fileRepository,
                    inputValidator: _inputValidator),
                csvUtility: _csvUtility);

            UIMain = new UIMain(GetTasks(), _inputValidator, new ProcessingContext());
        }
Example #29
0
    // Setup
    public void SetupObjectReferences()
    {
        move = gameObject.GetComponent<TileMovement>();
        attack = gameObject.GetComponent<TileAttack>();

        worldMap = GameObject.FindGameObjectWithTag ("GameController").GetComponent<WorldMap> ();
        worldSound = GameObject.FindGameObjectWithTag ("GameController").GetComponent<WorldSound> ();
        ui = GameObject.FindGameObjectWithTag ("UIMain").GetComponent<UIMain> ();
        actorManager = GameObject.FindGameObjectWithTag ("GameController").GetComponent<ActorManager> ();
        player = GameObject.FindGameObjectWithTag ("Player").GetComponent<Player> ();
        options = GameObject.FindGameObjectWithTag ("GameController").GetComponent<GameOptions> ();

        animationPosition = new Vector2(tileX*worldMap.mapTileSize,tileY*worldMap.mapTileSize);
    }
    // Use this for initialization
    void Start()
    {
        movementInputTimer = Time.fixedTime;

        options = GameObject.FindGameObjectWithTag ("GameController").GetComponent<GameOptions> ();
        worldMap = GameObject.FindGameObjectWithTag ("GameController").GetComponent<WorldMap> ();
        worldSound = GameObject.FindGameObjectWithTag ("GameController").GetComponent<WorldSound> ();

        move = gameObject.GetComponent<TileMovement>();
        attack = gameObject.GetComponent<TileAttack>();

        camera = GameObject.FindGameObjectWithTag ("MainCamera").GetComponent<Camera> ();
        actorManager = GameObject.FindGameObjectWithTag ("GameController").GetComponent<ActorManager> ();

        player = GameObject.FindGameObjectWithTag ("Player").GetComponent<Player> ();
        ui = GameObject.FindGameObjectWithTag ("UIMain").GetComponent<UIMain> ();
    }
 private bool OpenHold()
 {
     UIMain.OpenCargoHold(GameState.hold);
     return(true);
 }
Example #32
0
        static void Main(string[] args)
        {
            UIMain main = new UIMain(new HomeScreen());

            main.StartApplication();
        }
Example #33
0
 // Use this for initialization
 void Start()
 {
     worldMap = GameObject.FindGameObjectWithTag ("GameController").GetComponent<WorldMap> ();
     actor = gameObject.GetComponent<Actor>();
     player = GameObject.FindGameObjectWithTag ("Player").GetComponent<Player> ();
     move = gameObject.GetComponent<TileMovement>();
     attack = gameObject.GetComponent<TileAttack>();
     ui = GameObject.FindGameObjectWithTag ("UIMain").GetComponent<UIMain> ();
 }
Example #34
0
 void Start()
 {
     instance = this;
     GetPanel(UIActivePanel);
 }
 // Use this for initialization
 void Start()
 {
     MainCamera     = GameObject.FindWithTag("MainCamera");
     OxygenVariable = MainCamera.GetComponent <UIMain>();
     Storm          = GameObject.FindGameObjectWithTag("SandStorm");
 }
Example #36
0
 public void Init(UIMain uiMain)
 {
     this.uiMain = uiMain;
 }
Example #37
0
        /// <summary>
        /// prefills LaunchSiteManager with the runway and the KSC
        /// </summary>
        private static void AddKSC()
        {
            StaticInstance rwInstance = new StaticInstance();

            rwInstance.gameObject     = Resources.FindObjectsOfTypeAll <Upgradeables.UpgradeableFacility>().Where(x => x.name == "ResearchAndDevelopment").First().gameObject;
            rwInstance.RefLatitude    = getKSCLat;
            rwInstance.RefLongitude   = getKSCLon;
            rwInstance.CelestialBody  = ConfigUtil.GetCelestialBody("HomeWorld");
            rwInstance.RadialPosition = rwInstance.radialPosition;
            rwInstance.hasLauchSites  = true;
            rwInstance.launchSite     = runway;

            StaticInstance padInstance = new StaticInstance();

            padInstance.gameObject     = Resources.FindObjectsOfTypeAll <Upgradeables.UpgradeableFacility>().Where(x => x.name == "ResearchAndDevelopment").First().gameObject;
            padInstance.RefLatitude    = getKSCLat;
            padInstance.RefLongitude   = getKSCLon;
            padInstance.CelestialBody  = ConfigUtil.GetCelestialBody("HomeWorld");
            padInstance.RadialPosition = rwInstance.radialPosition;
            padInstance.hasLauchSites  = true;
            padInstance.launchSite     = launchpad;

            runway.staticInstance        = rwInstance;
            runway.isSquad               = true;
            runway.LaunchSiteName        = "Runway";
            runway.LaunchSiteAuthor      = "Squad";
            runway.LaunchSiteType        = SiteType.SPH;
            runway.sitecategory          = LaunchSiteCategory.Runway;
            runway.logo                  = UIMain.MakeSprite("KerbalKonstructs/Assets/KSCRunway");
            runway.LaunchSiteDescription = "The KSC runway is a concrete runway measuring about 2.5km long and 70m wide, on a magnetic heading of 90/270. It is not uncommon to see burning chunks of metal sliding across the surface.";
            runway.body                  = ConfigUtil.GetCelestialBody("HomeWorld");
            runway.refLat                = (float)rwInstance.RefLatitude;
            runway.refLon                = (float)rwInstance.RefLongitude;
            runway.refAlt                = 69f;
            runway.LaunchSiteLength      = 2500f;
            runway.LaunchSiteWidth       = 0f;
            runway.InitialCameraRotation = -60f;
            runway.staticInstance.mesh   = rwInstance.gameObject;
            runway.SetOpen();

            launchpad.staticInstance        = padInstance;
            launchpad.isSquad               = true;
            launchpad.LaunchSiteName        = "LaunchPad";
            launchpad.LaunchSiteAuthor      = "Squad";
            launchpad.LaunchSiteType        = SiteType.VAB;
            launchpad.sitecategory          = LaunchSiteCategory.RocketPad;
            launchpad.logo                  = UIMain.MakeSprite("KerbalKonstructs/Assets/KSCLaunchpad");
            launchpad.LaunchSiteDescription = "The KSC launchpad is a platform used to fire screaming Kerbals into the kosmos. There was a tower here at one point but for some reason nobody seems to know where it went...";
            launchpad.body                  = ConfigUtil.GetCelestialBody("HomeWorld");
            launchpad.refLat                = getKSCLat;
            launchpad.refLon                = getKSCLon;
            launchpad.refAlt                = 72;
            launchpad.LaunchSiteLength      = 0f;
            launchpad.LaunchSiteWidth       = 0f;
            launchpad.InitialCameraRotation = -60f;
            launchpad.staticInstance.mesh   = Resources.FindObjectsOfTypeAll <Upgradeables.UpgradeableFacility>().Where(x => x.name == "ResearchAndDevelopment").First().gameObject;
            launchpad.SetOpen();


            AddLaunchSite(runway);
            AddLaunchSite(launchpad);
        }
 // Use this for initialization
 void Start()
 {
     worldMap = GameObject.FindGameObjectWithTag ("GameController").GetComponent<WorldMap> ();
     worldSound = GameObject.FindGameObjectWithTag ("GameController").GetComponent<WorldSound> ();
     actor = gameObject.GetComponent<Actor>();
     ui = GameObject.FindGameObjectWithTag ("UIMain").GetComponent<UIMain> ();
 }
Example #39
0
 void Awake()
 {
     singleton = this;
 }