public void Render() { if (renderable == null) { return; } if (self.Height > 0) { renderable.SetPosition(self.GraphicPositionWithoutHeight + info.Offset); renderable.SetColor(Color.Shadow); renderable.Render(); } renderable.SetPosition(self.GraphicPosition + info.Offset); renderable.SetColor(cachedColor); renderable.Render(); }
public Terrain(World world, MPos position, TerrainType type) { this.world = world; Position = position; Type = type; renderable = new StaticBatchRenderable(Position.ToCPos(), VAngle.Zero, type.Texture); if (type.Overlay != null) { overlay = new BatchSequence(type.Overlay, startRandom: true); overlay.SetPosition(Position.ToCPos()); } edges = new StaticBatchRenderable[4]; corners = new StaticBatchRenderable[4]; }