Exemplo n.º 1
0
        protected override void LoadContent()
        {
            model = Game.Content.Load<Model>(modelName);
            scale = 1.0f;
            boundingBox = new BoundingBox();

            boundingBoxTranslate = new Vector3(0f, 0f, 0f);
            bb_size = new Vector3(1f, 1f, 1f);
            boundingBoxPositionFix = new Vector3(0f, 0f, 0f);

            debugDraw = new DebugDraw(Game.GraphicsDevice);

            base.LoadContent();
        }
        protected override void LoadContent()
        {
            Model = Game.Content.Load<Model>("Panel/MainOperatorPanel");
            BoundingBox = new BoundingBox();
            debugDraw = new DebugDraw(Game.GraphicsDevice);

            Position = new Vector3(6, 15, 14);
            Rotation = new Vector3(0, 0, 0);
            scale = new Vector3(1.0f, 1.0f, 1.0f);
            bb_size = new Vector3(8f, 4.4f, 0.02f);

            //tex = Game.Content.Load<Texture2D>("text_box_tex");

            //timer = new Timer();

            spriteBatch = new SpriteBatch(Game.GraphicsDevice);

               /*     target = new RenderTarget2D(Game.GraphicsDevice, Game.GraphicsDevice.PresentationParameters.BackBufferWidth,
                                        Game.GraphicsDevice.PresentationParameters.BackBufferHeight,
                                        false,
                                        Game.GraphicsDevice.PresentationParameters.BackBufferFormat,
                                        DepthFormat.Depth24,
                                        2,
                                        RenderTargetUsage.PlatformContents);
               // whiteRectangle = new Texture2D(Game.GraphicsDevice, 1, 1);
               // whiteRectangle.SetData(new[] { Color.White });
            */

               // panelIcon = new PanelIcon[3];

            base.LoadContent();
        }
Exemplo n.º 3
0
        public void LoadContent(ContentManager content, string modelName)
        {
            Model = content.Load<Model>(modelName);
            InterfaceBoxType = modelName;
            BoundingBox = new BoundingBox();
            //   transformMatrix = new Matrix();
            bb_size_min = new Vector3();
            bb_size_max = new Vector3();
            //  bb_size_min = GetBoundingBoxSize(Model, transformMatrix).Min;
            //  bb_size_max = GetBoundingBoxSize(Model, transformMatrix).Max;

            boundingBoxTranslate = new Vector3(0.5f, 1.0f, 0.125f);
            //bb_size = new Vector3(4f, 3f, 1f);
            boundingBoxPositionFix = new Vector3(0f, 1.5f, 0f);

            debugDraw = new DebugDraw(Game.GraphicsDevice);

            timer = new Timer();
        }
Exemplo n.º 4
0
 protected override void LoadContent()
 {
     base.LoadContent();
     BoundingBox = new BoundingBox();
     debugDraw = new DebugDraw(Game.GraphicsDevice);
 }
Exemplo n.º 5
0
        protected override void LoadContent()
        {
            Model = Game.Content.Load<Model>("Panel/PanelIcon");

            BoundingBox = new BoundingBox();
            debugDraw = new DebugDraw(Game.GraphicsDevice);
            bb_size = new Vector3(3.75f, 1.0f, 0.02f);

               // Position = new Vector3(6, 15, 14);
            Rotation = new Vector3(0, 0, 0);
            //scale = new Vector3(1.0f, 1.0f, 1.0f);

            textureIconCombined = Game.Content.Load<Texture2D>("Panel/panels_iconstatuses_all");

            iconSpaceHeight = 200;
            iconSpaceWidth = (int)(iconSpaceHeight*3.654f);

            iconSizeY = (int) (iconSpaceHeight*0.62f);
            iconSizeX = (int) (iconSizeY*1.17f);

            statusSizeY = (int)(iconSpaceHeight * 0.8f);
            statusSizeX = (int) (statusSizeY*2.86f);

            iconMediaTypeAudioRectangle = new Rectangle(0, 0, 143, 122);
            iconMediaTypeVideoRectangle = new Rectangle(0, 161, 143, 122);
            iconMediaTypePictureRectangle = new Rectangle(0, 315, 143, 122);

            iconManagerStatusNotAssignedRectangle = new Rectangle(145, 0, 461, 162);
            iconManagerStatusAssignedRectangle = new Rectangle(145, 161, 461, 161);
            iconManagerStatusFinishedRectangle = new Rectangle(145, 315, 461, 158);

            switch (mediaType)
            {
                case Task.MediaType.Audio:
                    currentRectangle = iconMediaTypeAudioRectangle;
                    break;
                case Task.MediaType.Video:
                    currentRectangle = iconMediaTypeVideoRectangle;
                    break;
                case Task.MediaType.Picture:
                    currentRectangle = iconMediaTypePictureRectangle;
                    break;

            }

            //timer = new Timer();

            spriteBatch = new SpriteBatch(Game.GraphicsDevice);
            spriteFont = Game.Content.Load<SpriteFont>("Segoe16");
            textcontent = "Номер";

            target = new RenderTarget2D(Game.GraphicsDevice,
                                        iconSpaceWidth, iconSpaceHeight,
                                        //Game.GraphicsDevice.PresentationParameters.BackBufferWidth / 4,
                                        //Game.GraphicsDevice.PresentationParameters.BackBufferHeight / 5,
                                        false,
                                        Game.GraphicsDevice.PresentationParameters.BackBufferFormat,
                                        DepthFormat.Depth24,
                                        2,
                                        RenderTargetUsage.DiscardContents);

            base.LoadContent();
        }