Draw floating text above the shroud.

This commit is contained in:
Paul Chote
2016-08-22 22:01:40 +01:00
parent d2f5fe7380
commit f357163078

View File

@@ -18,7 +18,7 @@ using OpenRA.Mods.Common.Graphics;
namespace OpenRA.Mods.Common.Effects namespace OpenRA.Mods.Common.Effects
{ {
public class FloatingText : IEffect public class FloatingText : IEffect, IEffectAboveShroud
{ {
static readonly WVec Velocity = new WVec(0, 0, 86); static readonly WVec Velocity = new WVec(0, 0, 86);
@@ -45,7 +45,9 @@ namespace OpenRA.Mods.Common.Effects
pos += Velocity; pos += Velocity;
} }
public IEnumerable<IRenderable> Render(WorldRenderer wr) public IEnumerable<IRenderable> Render(WorldRenderer wr) { return SpriteRenderable.None; }
public IEnumerable<IRenderable> RenderAboveShroud(WorldRenderer wr)
{ {
if (wr.World.FogObscures(pos)) if (wr.World.FogObscures(pos))
yield break; yield break;