infantry squads; a bit tight at the moment.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using IjwFramework.Types;
|
||||
using OpenRa.Game.Graphics;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
@@ -88,5 +90,11 @@ namespace OpenRa.Game.Traits
|
||||
return (RotateVectorByFacing(new float2(offset[0], offset[1]), quantizedFacing, .7f) + GetRecoil(self, recoil));
|
||||
}
|
||||
|
||||
public static Pair<Sprite, float2> Centered(Sprite s, float2 location)
|
||||
{
|
||||
var loc = location - 0.5f * s.size;
|
||||
return Pair.New(s, loc.Round());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user