public override void Draw(SpriteBatchRelative spriteBatch) { spriteBatch.DrawRelative(Texture, BoundingBox, Color.Red, Layer.GetWorldDepth(GridLocation)); effectDisplay.Sequence = effects[ActivatedEffect].sequence; effectDisplay.Draw(spriteBatch, true); }
public override void Draw(SpriteBatchRelative spriteBatch, bool isRelative) { base.Draw(spriteBatch, isRelative); Rectangle frontBarBoundingBox = BoundingBox; frontBarBoundingBox.Width = (int)(frontBarBoundingBox.Width * fraction); if (isRelative) { spriteBatch.DrawRelative(MediaRepository.Textures["Blank"], frontBarBoundingBox, frontColor, layerDepth); } else { spriteBatch.DrawAbsolute(MediaRepository.Textures["Blank"], frontBarBoundingBox, frontColor); } }
public override void Draw(SpriteBatchRelative spriteBatch) { Rectangle arrowBox = Display.GridLocationToViewport(GridLocation); Color arrowColor = new Color(255, 255, 255, 200); switch (direction) { case DirectionType.North: spriteBatch.DrawRelative(MediaRepository.Textures["Arrow_N"], arrowBox, arrowColor, Layer.Depth["Arrow"]); break; case DirectionType.East: spriteBatch.DrawRelative(MediaRepository.Textures["Arrow_E"], arrowBox, arrowColor, Layer.Depth["Arrow"]); break; case DirectionType.South: spriteBatch.DrawRelative(MediaRepository.Textures["Arrow_S"], arrowBox, arrowColor, Layer.Depth["Arrow"]); break; case DirectionType.West: spriteBatch.DrawRelative(MediaRepository.Textures["Arrow_W"], arrowBox, arrowColor, Layer.Depth["Arrow"]); break; } spriteBatch.DrawRelative(Texture, BoundingBox, Color.White, Layer.GetWorldDepth(GridLocation)); }
public override void Draw(SpriteBatchRelative spriteBatch, bool isRelative) { if (IsActive) { base.Draw(spriteBatch, isRelative); Point curPivot = new Point(BoundingBox.X, BoundingBox.Y); Point increment = new Point(tileSize.Width + indent, 0); for (Light.LightType type = 0; type < Light.LightType.SIZE; type++) { for (int count = 0; count < sequence.Frequencies[type]; count++) { if (isRelative) { spriteBatch.DrawRelative(MediaRepository.Textures["Blank"], Geometry.ConstructRectangle(curPivot, tileSize), Light.GetLightColor(type), layerDepth); } else { spriteBatch.DrawAbsolute(MediaRepository.Textures["Blank"], Geometry.ConstructRectangle(curPivot, tileSize), Light.GetLightColor(type)); } curPivot = Geometry.Sum(curPivot, increment); } } } }
public override void Draw(SpriteBatchRelative spriteBatch) { spriteBatch.DrawRelative(GetTexture(), BoundingBox, Color.White, Layer.GetWorldDepth(GridLocation)); }
public override void Draw(SpriteBatchRelative spriteBatch) { Rectangle arrowBox = Display.GridLocationToViewport(GridLocation); Color arrowColor = new Color(255, 255, 255, 200); switch (direction) { case DirectionType.North: spriteBatch.DrawRelative(MediaRepository.Textures["Arrow_N"], arrowBox, arrowColor, Layer.Depth["Arrow"]); break; case DirectionType.East: spriteBatch.DrawRelative(MediaRepository.Textures["Arrow_E"], arrowBox, arrowColor, Layer.Depth["Arrow"]); break; case DirectionType.South: spriteBatch.DrawRelative(MediaRepository.Textures["Arrow_S"], arrowBox, arrowColor, Layer.Depth["Arrow"]); break; case DirectionType.West: spriteBatch.DrawRelative(MediaRepository.Textures["Arrow_W"], arrowBox, arrowColor, Layer.Depth["Arrow"]); break; } spriteBatch.DrawRelative(Texture, BoundingBox, Color.White, Layer.GetWorldDepth(GridLocation)); if (IsEducated && (profession == ProfessionType.Worker)) { Rectangle noticeBox = new Rectangle(BoundingBox.X, BoundingBox.Y, BoundingBox.Width / 2, BoundingBox.Height / 2); spriteBatch.DrawRelative(MediaRepository.Textures["Notice"], noticeBox, Color.Yellow, Layer.Depth["Notice"]); } }
public override void Draw(SpriteBatchRelative spriteBatch) { switch (type) { case TileType.Grass: spriteBatch.DrawRelative(MediaRepository.Textures["GrassTile"], BoundingBox, new Color(255, 255, 255, 100), Layer.Depth["Tile"]); break; case TileType.Water: spriteBatch.DrawRelative(MediaRepository.Textures["WaterTile"], BoundingBox, new Color(255, 255, 255, 100), Layer.Depth["Tile"]); break; } if (highlightColor != TileHighlightColor.None) { spriteBatch.DrawRelative(MediaRepository.Textures["BlankTile"], BoundingBox, tileHighlightColors[highlightColor], Layer.Depth["Highlight"]); } foreach (Entity entity in entities) { if (!entity.DeferDraw && !entity.Hidden) { entity.Draw(spriteBatch); } } }