ConstructionYard.cs!

git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1286 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
chrisf
2007-07-16 10:29:03 +00:00
parent 333a20d29e
commit 58be529e32
13 changed files with 146 additions and 205 deletions

View File

@@ -0,0 +1,38 @@
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) { }
}
}