Ejemplo n.º 1
0
        public TelescopeMenu(Transform Position)
        {
            //unique id for the gui window.
            this.WindowTitle = "CactEye Telescope Control System";
            this.WindowId    = WindowTitle.GetHashCode() + new System.Random().Next(65536);

            //Grabbin' textures
            PreviewTexture            = GameDatabase.Instance.GetTexture("CactEye/Icons/preview", false);
            PreviewTexture.filterMode = FilterMode.Point;
            CrosshairTexture          = GameDatabase.Instance.GetTexture("CactEye/Icons/crosshair", false);
            TargetPointerTexture      = GameDatabase.Instance.GetTexture("CactEye/Icons/target", false);
            SaveScreenshotTexture     = GameDatabase.Instance.GetTexture("CactEye/Icons/save", false);
            Atom6Icon    = GameDatabase.Instance.GetTexture("CactEye/Icons/atom6", false);
            Back9Icon    = GameDatabase.Instance.GetTexture("CactEye/Icons/back19", false);
            Forward9Icon = GameDatabase.Instance.GetTexture("CactEye/Icons/forward19", false);

            //Create the window rectangle object
            float StartXPosition = Screen.width * 0.1f;
            float StartYPosition = Screen.height * 0.1f;
            float WindowWidth    = Screen.width * ScreenToGUIRatio;
            float WindowHeight   = Screen.height * ScreenToGUIRatio;

            WindowPosition = new Rect(StartXPosition, StartYPosition, WindowWidth, WindowHeight);

            //Attempt to create the Telescope camera object.
            try
            {
                CameraModule = new CactEyeCamera(Position);
            }
            catch (Exception E)
            {
                Debug.Log("CactEye 2: Exception 2: Was not able to create the camera object.");
                Debug.Log(E.ToString());
            }
        }
Ejemplo n.º 2
0
        //Check for pause menu
        //private bool GameIsPaused = false;
        public TelescopeMenu(Transform Position)
        {
            //unique id for the gui window.
            this.WindowTitle = "CactEye Telescope Control System";
            this.WindowId = WindowTitle.GetHashCode() + new System.Random().Next(65536);

            //Grabbin' textures
            PreviewTexture = GameDatabase.Instance.GetTexture("CactEye/Icons/preview", false);
            PreviewTexture.filterMode = FilterMode.Point;
            CrosshairTexture = GameDatabase.Instance.GetTexture("CactEye/Icons/crosshair", false);
            TargetPointerTexture = GameDatabase.Instance.GetTexture("CactEye/Icons/target", false);
            SaveScreenshotTexture = GameDatabase.Instance.GetTexture("CactEye/Icons/save", false);
            Atom6Icon = GameDatabase.Instance.GetTexture("CactEye/Icons/atom6", false);
            Back9Icon = GameDatabase.Instance.GetTexture("CactEye/Icons/back19", false);
            Forward9Icon = GameDatabase.Instance.GetTexture("CactEye/Icons/forward19", false);

            //Create the window rectangle object
            float StartXPosition = Screen.width * 0.1f;
            float StartYPosition = Screen.height * 0.1f;
            float WindowWidth = Screen.width * ScreenToGUIRatio;
            float WindowHeight = Screen.height * ScreenToGUIRatio;
            WindowPosition = new Rect(StartXPosition, StartYPosition, WindowWidth, WindowHeight);

            //Attempt to create the Telescope camera object.
            try
            {
                CameraModule = new CactEyeCamera(Position);
            }
            catch (Exception E)
            {
                Debug.Log("CactEye 2: Exception 2: Was not able to create the camera object.");
                Debug.Log(E.ToString());
            }
        }