Tweak CashTick and Oil Derricks
This commit is contained in:
@@ -35,7 +35,7 @@ namespace OpenRA.Graphics
|
|||||||
|
|
||||||
public ITexture PaletteTexture;
|
public ITexture PaletteTexture;
|
||||||
|
|
||||||
public readonly SpriteFont RegularFont, BoldFont, TitleFont, TinyFont;
|
public readonly SpriteFont RegularFont, BoldFont, TitleFont, TinyFont, TinyBoldFont;
|
||||||
|
|
||||||
internal const int TempBufferSize = 8192;
|
internal const int TempBufferSize = 8192;
|
||||||
const int TempBufferCount = 8;
|
const int TempBufferCount = 8;
|
||||||
@@ -59,7 +59,8 @@ namespace OpenRA.Graphics
|
|||||||
BoldFont = new SpriteFont("FreeSansBold.ttf", 14);
|
BoldFont = new SpriteFont("FreeSansBold.ttf", 14);
|
||||||
TitleFont = new SpriteFont("titles.ttf", 48);
|
TitleFont = new SpriteFont("titles.ttf", 48);
|
||||||
TinyFont = new SpriteFont("FreeSans.ttf", 10);
|
TinyFont = new SpriteFont("FreeSans.ttf", 10);
|
||||||
|
TinyBoldFont = new SpriteFont("FreeSansBold.ttf", 10);
|
||||||
|
|
||||||
for( int i = 0 ; i < TempBufferCount ; i++ )
|
for( int i = 0 ; i < TempBufferCount ; i++ )
|
||||||
{
|
{
|
||||||
tempBuffersV.Enqueue( device.CreateVertexBuffer( TempBufferSize ) );
|
tempBuffersV.Enqueue( device.CreateVertexBuffer( TempBufferSize ) );
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
class CashTricklerInfo : ITraitInfo
|
class CashTricklerInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public readonly int Period = 10;
|
public readonly int Period = 50;
|
||||||
public readonly int Amount = 3;
|
public readonly int Amount = 15;
|
||||||
public readonly bool ShowTicks = true;
|
public readonly bool ShowTicks = true;
|
||||||
public readonly int TickLifetime = 30;
|
public readonly int TickLifetime = 30;
|
||||||
public readonly int TickVelocity = 2;
|
public readonly int TickVelocity = 1;
|
||||||
|
|
||||||
public object Create (ActorInitializer init) { return new CashTrickler(this); }
|
public object Create (ActorInitializer init) { return new CashTrickler(this); }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ namespace OpenRA.Mods.RA.Effects
|
|||||||
this.color = color;
|
this.color = color;
|
||||||
this.lifetime = lifetime;
|
this.lifetime = lifetime;
|
||||||
this.velocity = velocity;
|
this.velocity = velocity;
|
||||||
s = "${0}".F(value);
|
s = "{0}${1}".F(value < 0 ? "-" : "+", value);
|
||||||
this.pos = pos - 0.5f*Game.Renderer.BoldFont.Measure(s).ToFloat2();
|
this.pos = pos - 0.5f*Game.Renderer.TinyBoldFont.Measure(s).ToFloat2();
|
||||||
remaining = lifetime;
|
remaining = lifetime;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.RA.Effects
|
|||||||
|
|
||||||
public IEnumerable<Renderable> Render()
|
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;
|
yield break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user