Actor.traits is implementation detail

This commit is contained in:
Bob
2010-08-14 15:19:30 +12:00
committed by alzeih
parent f6c6255f64
commit ae703d50b2
165 changed files with 586 additions and 561 deletions

View File

@@ -6,11 +6,11 @@
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
#endregion
using System;
using System.Drawing;
using OpenRA.Graphics;
using OpenRA.Graphics;
using OpenRA.Traits;
using OpenRA.Widgets;
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.RA.Widgets
{
powerCollection = "power-" + world.LocalPlayer.Country.Race;
var resources = world.LocalPlayer.PlayerActor.traits.Get<PlayerResources>();
var resources = world.LocalPlayer.PlayerActor.Trait<PlayerResources>();
// Nothing to draw
if (resources.PowerProvided == 0
@@ -83,4 +83,4 @@ namespace OpenRA.Mods.RA.Widgets
Game.Renderer.RgbaSpriteRenderer.Flush();
}
}
}
}