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