Actor.traits is implementation detail
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user