Files
OpenRA/OpenRa.Game/ConstructionYard.cs
(no author) 742a91c3f2 win
git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1288 993157c7-ee19-0410-b2c4-bb4e9862e678
2007-07-17 08:03:02 +00:00

39 lines
768 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using BluntDirectX.Direct3D;
namespace OpenRa.Game
{
class ConstructionYard : Actor
{
const string name = "fact";
static Sequence idle = SequenceProvider.GetSequence(name, "idle");
static Sequence make = SequenceProvider.GetSequence(name, "make");
Sequence current = make;
int frame = -1;
public ConstructionYard(float2 location, int palette)
{
this.renderLocation = location;
this.palette = palette;
}
public override Sprite[] CurrentImages
{
get
{
if ((current == make) && ++frame >= current.Length)
{
frame = 0;
current = idle;
}
return new Sprite[] { current.GetSprite(frame) };
}
}
}
}