format RenderSimple
This commit is contained in:
@@ -35,7 +35,12 @@ namespace OpenRA.Traits
|
||||
public abstract class RenderSimple : IRender, ITick
|
||||
{
|
||||
public Dictionary<string, AnimationWithOffset> anims = new Dictionary<string, AnimationWithOffset>();
|
||||
public Animation anim { get { return anims[""].Animation; } protected set { anims[""].Animation = value; } }
|
||||
|
||||
public Animation anim
|
||||
{
|
||||
get { return anims[""].Animation; }
|
||||
protected set { anims[""].Animation = value; }
|
||||
}
|
||||
|
||||
public static string GetImage(ActorInfo actor, string Tileset)
|
||||
{
|
||||
@@ -58,6 +63,7 @@ namespace OpenRA.Traits
|
||||
}
|
||||
|
||||
RenderSimpleInfo Info;
|
||||
|
||||
public RenderSimple(Actor self, Func<int> baseFacing)
|
||||
{
|
||||
anims.Add("", new Animation(GetImage(self), baseFacing));
|
||||
@@ -65,6 +71,7 @@ namespace OpenRA.Traits
|
||||
}
|
||||
|
||||
public string Palette(Player p) { return Info.Palette ?? Info.PlayerPalette + p.Index; }
|
||||
|
||||
public virtual IEnumerable<Renderable> Render(Actor self)
|
||||
{
|
||||
foreach (var a in anims.Values)
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace OpenRA.Mods.RA.Effects
|
||||
public Animation flag = new Animation("rallypoint");
|
||||
public Animation circles = new Animation("rallypoint");
|
||||
readonly string palette;
|
||||
|
||||
public RallyPoint(Actor building)
|
||||
{
|
||||
this.building = building;
|
||||
|
||||
Reference in New Issue
Block a user