git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1312 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -8,14 +8,17 @@ namespace OpenRa.Game
|
||||
{
|
||||
class Tree : Actor
|
||||
{
|
||||
int2 location;
|
||||
|
||||
public Tree(TreeReference r, TreeCache renderer, Map map)
|
||||
{
|
||||
renderLocation = 24 * (new float2(r.Location) - new float2(map.XOffset, map.YOffset));
|
||||
location = new int2( r.Location ) - new int2( map.XOffset, map.YOffset );
|
||||
currentImages = new Sprite[] { renderer.GetImage(r.Image) };
|
||||
}
|
||||
|
||||
Sprite[] currentImages;
|
||||
|
||||
public override Sprite[] CurrentImages { get { return currentImages; } }
|
||||
|
||||
public override float2 RenderLocation { get { return 24 * location.ToFloat2(); } }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user