public override void Draw(HouseRenderState state, HouseBatch batch) { if (!m_Active) { return; } if (m_Dirty) { if (FloorStyle == 0) { m_Active = false; return; } var floorStyle = ArchitectureCatalog.GetFloor(FloorStyle); if (floorStyle == null) { m_Active = false; return; } var position = state.TileToScreen(Position); PaintCoords = new Rectangle((int)position.X, (int)position.Y, state.CellWidth, state.CellHeight); Texture = floorStyle.GetTexture(state.Zoom, state.Rotation); m_Dirty = false; } batch.Draw(new HouseBatchSprite { Pixel = Texture, DestRect = PaintCoords, SrcRect = new Rectangle(0, 0, Texture.Width, Texture.Height), RenderMode = HouseBatchRenderMode.NO_DEPTH }); //batch.Draw(Texture, PaintCoords, Color.White); }
public override void Draw(HouseRenderState state, HouseBatch batch) { var position = state.TileToScreen(Position); if ((WallInfo.Segments & WallSegments.BottomLeft) == WallSegments.BottomLeft) { var wall = ArchitectureCatalog.GetWallPattern(WallInfo.BottomLeftPattern); if (wall != null) { var tx = wall.Far.RightTexture; //batch.Draw(tx, new Rectangle((int)position.X, (int)position.Y - 49, 16, 67), Color.White); //batch.Draw(tx, new Rectangle((int)position.X, (int)position.Y - 49, 16, 67), Color.White); } } if ((WallInfo.Segments & WallSegments.BottomRight) == WallSegments.BottomRight) { var wall = ArchitectureCatalog.GetWallPattern(WallInfo.BottomRightPattern); if (wall != null) { var tx = wall.Far.LeftTexture; //batch.Draw(tx, new Rectangle((int)position.X, (int)position.Y - 49, 16, 67), Color.White); //batch.Draw(tx, new Rectangle((int)position.X + 16, (int)position.Y - 49, 16, 67), Color.White); } } //if ((WallInfo.Segments & WallSegments.BottomRight) == WallSegments.BottomRight) //{ // var wall = ArchitectureCatalog.GetWallPattern(WallInfo.BottomRightPattern); // if (wall != null) // { // var tx = wall.Far.LeftTexture; // //batch.Draw(tx, new Rectangle((int)position.X, (int)position.Y - 49, 16, 67), Color.White); // batch.Draw(tx, new Rectangle((int)position.X + 16, (int)position.Y - 49, 16, 67), Color.White); // } //} //if ((WallInfo.Segments & WallSegments.BottomRight) == WallSegments.BottomRight) //{ // var wall = ArchitectureCatalog.GetWallPattern(WallInfo.BottomLeftPattern); // if (wall != null) // { // var tx = wall.Far.LeftTexture; // batch.Draw(tx, new Rectangle((int)position.X, (int)position.Y - 58, 16, 67), Color.White); // } //} }