Esempio n. 1
0
        public override void Draw(GraphicsDevice device)
        {
            var batch = new HouseBatch(GameFacade.GraphicsDevice);
            //batch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Immediate, SaveStateMode.SaveState);
            batch.Begin();
            foreach (var item in StaticLayer)
            {
                item.Draw(RenderState, batch);
            }
            batch.End();

            //var layer = Layers[0];
            //layer.DrawFloor(device, scene, this);
        }
Esempio n. 2
0
        public override void Draw(GraphicsDevice device)
        {
            var batch = new HouseBatch(GameFacade.GraphicsDevice);

            //batch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Immediate, SaveStateMode.SaveState);
            batch.Begin();
            foreach (var item in StaticLayer)
            {
                item.Draw(RenderState, batch);
            }
            batch.End();


            //var layer = Layers[0];
            //layer.DrawFloor(device, scene, this);
        }
Esempio n. 3
0
        public void Draw(GraphicsDevice device, HouseRenderState state)
        {
            var batch = new HouseBatch(device);
            //batch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Immediate, SaveStateMode.SaveState);
            batch.Begin();
            Floor.Draw(device, batch, state);
            Walls.Draw(device, batch, state);

            /** Draw indicator in center of screen **/
            var rectSize = 5;
            var gw = GlobalSettings.Default.GraphicsWidth;
            var gh = GlobalSettings.Default.GraphicsHeight;

            batch.Draw(new TSOClient.Code.Rendering.Lot.Framework.HouseBatchSprite {
                DestRect = new Rectangle((gw-rectSize)/2, (gh-rectSize)/2, rectSize, rectSize),
                SrcRect = new Rectangle(0, 0, 1, 1),
                Pixel = TextureUtils.TextureFromColor(device, Color.Pink),
                RenderMode = TSOClient.Code.Rendering.Lot.Framework.HouseBatchRenderMode.NO_DEPTH
            });

            batch.End();
        }
Esempio n. 4
0
        public void Draw(GraphicsDevice device, HouseRenderState state)
        {
            var batch = new HouseBatch(device);

            //batch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Immediate, SaveStateMode.SaveState);
            batch.Begin();
            Floor.Draw(device, batch, state);
            Walls.Draw(device, batch, state);

            /** Draw indicator in center of screen **/
            var rectSize = 5;
            var gw       = GlobalSettings.Default.GraphicsWidth;
            var gh       = GlobalSettings.Default.GraphicsHeight;

            batch.Draw(new TSOClient.Code.Rendering.Lot.Framework.HouseBatchSprite {
                DestRect   = new Rectangle((gw - rectSize) / 2, (gh - rectSize) / 2, rectSize, rectSize),
                SrcRect    = new Rectangle(0, 0, 1, 1),
                Pixel      = TextureUtils.TextureFromColor(device, Color.Pink),
                RenderMode = TSOClient.Code.Rendering.Lot.Framework.HouseBatchRenderMode.NO_DEPTH
            });

            batch.End();
        }
Esempio n. 5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="device"></param>
 /// <param name="batch"></param>
 /// <param name="state"></param>
 public void Draw(GraphicsDevice device, HouseBatch batch, HouseRenderState state)
 {
     Components.ForEach(x => x.Draw(state, batch));
 }
Esempio n. 6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="device"></param>
 /// <param name="batch"></param>
 /// <param name="state"></param>
 public void Draw(GraphicsDevice device, HouseBatch batch, HouseRenderState state)
 {
     Components.ForEach(x => x.Draw(state, batch));
 }