renamed Actor.unitInfo to "Info"; other minor changes

This commit is contained in:
Bob
2009-12-05 19:12:29 +13:00
parent 7f1e34e482
commit 74b7d21d4b
29 changed files with 85 additions and 76 deletions

View File

@@ -12,9 +12,9 @@ namespace OpenRa.Game.Traits
public RenderUnitMuzzleFlash(Actor self)
: base(self)
{
if (!self.unitInfo.MuzzleFlash) throw new InvalidOperationException("wtf??");
if (!self.Info.MuzzleFlash) throw new InvalidOperationException("wtf??");
muzzleFlash = new Animation(self.unitInfo.Name);
muzzleFlash = new Animation(self.Info.Name);
muzzleFlash.PlayFetchIndex("muzzle",
() =>
{
@@ -37,8 +37,8 @@ namespace OpenRa.Game.Traits
if (attack.primaryRecoil > 0)
return base.Render(self).Concat(new[] {Util.Centered(self,
muzzleFlash.Image, self.CenterLocation + new float2(
self.unitInfo.PrimaryOffset.ElementAtOrDefault(2),
self.unitInfo.PrimaryOffset.ElementAtOrDefault(3)))});
self.Info.PrimaryOffset.ElementAtOrDefault(2),
self.Info.PrimaryOffset.ElementAtOrDefault(3)))});
else
return base.Render(self);
}