fixed the roof of the WEAP. we'll still need to do the z-order for it.

This commit is contained in:
Chris Forbes
2009-10-06 19:58:20 +13:00
parent e4c3c7e5af
commit 924c515f57
4 changed files with 49 additions and 9 deletions

View File

@@ -1,3 +1,5 @@
using OpenRa.Game.Graphics;
using System.Linq;
namespace OpenRa.Game
{
@@ -20,4 +22,37 @@ namespace OpenRa.Game
});
}
}
class WarFactory : Building
{
Animation roof;
public WarFactory(int2 location, Player owner, Game game)
: base("weap", location, owner, game)
{
animation.PlayThen("make", () =>
{
roof = new Animation("weap");
animation.PlayRepeating("idle");
roof.PlayRepeating("idle-top");
});
}
public override Sprite[] CurrentImages
{
get
{
return (roof == null)
? base.CurrentImages
: (base.CurrentImages.Concat( roof.Images ).ToArray());
}
}
public override void Tick(Game game, int t)
{
base.Tick(game, t);
if (roof != null) roof.Tick(t);
}
}
}