git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1365 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -4,18 +4,13 @@ using System.Text;
|
||||
|
||||
namespace OpenRa.Game
|
||||
{
|
||||
class Building : Actor
|
||||
class Building : PlayerOwned
|
||||
{
|
||||
protected Animation animation;
|
||||
protected int2 location;
|
||||
|
||||
public Building( string name, int2 location, Player owner, Game game )
|
||||
: base( game )
|
||||
: base( game, name, location )
|
||||
{
|
||||
this.location = location;
|
||||
this.owner = owner;
|
||||
|
||||
animation = new Animation( name );
|
||||
animation.PlayThen( "make", delegate { animation.PlayRepeating( "idle" ); } );
|
||||
owner.TechTree.Build( name, true );
|
||||
}
|
||||
@@ -25,14 +20,5 @@ namespace OpenRa.Game
|
||||
animation.Tick( t );
|
||||
}
|
||||
|
||||
public override Sprite[] CurrentImages
|
||||
{
|
||||
get { return animation.Images; }
|
||||
}
|
||||
|
||||
public override float2 RenderLocation
|
||||
{
|
||||
get { return 24.0f * (float2)location; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user