Files
OpenRA/OpenRa.Game/ConstructionYard.cs
chrisf 58be529e32 ConstructionYard.cs!
git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1286 993157c7-ee19-0410-b2c4-bb4e9862e678
2007-07-16 10:29:03 +00:00

39 lines
881 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using BluntDirectX.Direct3D;
namespace OpenRa.Game
{
class ConstructionYard : Actor
{
static Range<int> normalSequence = UnitSheetBuilder.GetUnit("fact");
static Range<int> makeSequence = UnitSheetBuilder.GetUnit("factmake");
Range<int> sequence = makeSequence;
int frame = -1;
public ConstructionYard(float2 location, int palette)
{
this.renderLocation = location;
this.palette = palette;
}
public override Sprite[] CurrentImages
{
get
{
if ((sequence.Start == makeSequence.Start) && ++frame >= sequence.End - sequence.Start)
{
frame = 0;
sequence = normalSequence;
}
return new Sprite[] { UnitSheetBuilder.sprites[sequence.Start + frame] };
}
}
public override void Tick(World world, double t) { }
}
}