Tweak CashTick and Oil Derricks

This commit is contained in:
Paul Chote
2011-03-19 17:45:18 +13:00
parent 08158a6929
commit a5af4e85ce
3 changed files with 9 additions and 8 deletions

View File

@@ -35,7 +35,7 @@ namespace OpenRA.Graphics
public ITexture PaletteTexture;
public readonly SpriteFont RegularFont, BoldFont, TitleFont, TinyFont;
public readonly SpriteFont RegularFont, BoldFont, TitleFont, TinyFont, TinyBoldFont;
internal const int TempBufferSize = 8192;
const int TempBufferCount = 8;
@@ -59,7 +59,8 @@ namespace OpenRA.Graphics
BoldFont = new SpriteFont("FreeSansBold.ttf", 14);
TitleFont = new SpriteFont("titles.ttf", 48);
TinyFont = new SpriteFont("FreeSans.ttf", 10);
TinyBoldFont = new SpriteFont("FreeSansBold.ttf", 10);
for( int i = 0 ; i < TempBufferCount ; i++ )
{
tempBuffersV.Enqueue( device.CreateVertexBuffer( TempBufferSize ) );

View File

@@ -15,11 +15,11 @@ namespace OpenRA.Mods.RA
{
class CashTricklerInfo : ITraitInfo
{
public readonly int Period = 10;
public readonly int Amount = 3;
public readonly int Period = 50;
public readonly int Amount = 15;
public readonly bool ShowTicks = true;
public readonly int TickLifetime = 30;
public readonly int TickVelocity = 2;
public readonly int TickVelocity = 1;
public object Create (ActorInitializer init) { return new CashTrickler(this); }
}

View File

@@ -30,8 +30,8 @@ namespace OpenRA.Mods.RA.Effects
this.color = color;
this.lifetime = lifetime;
this.velocity = velocity;
s = "${0}".F(value);
this.pos = pos - 0.5f*Game.Renderer.BoldFont.Measure(s).ToFloat2();
s = "{0}${1}".F(value < 0 ? "-" : "+", value);
this.pos = pos - 0.5f*Game.Renderer.TinyBoldFont.Measure(s).ToFloat2();
remaining = lifetime;
}
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.RA.Effects
public IEnumerable<Renderable> Render()
{
Game.Renderer.BoldFont.DrawTextWithContrast(s, pos - Game.viewport.Location, color, Color.Black,1);
Game.Renderer.TinyBoldFont.DrawTextWithContrast(s, pos - Game.viewport.Location, color, Color.Black,1);
yield break;
}
}