Add mod project this time; Fix trees

This commit is contained in:
Paul Chote
2010-02-05 19:58:31 +13:00
parent 1ea8e212c4
commit e3e4f4a853
8 changed files with 300 additions and 77 deletions

View File

@@ -7,7 +7,7 @@ namespace OpenRa.Traits
public abstract class RenderSimpleInfo : ITraitInfo
{
public readonly string Image = null;
public readonly string Palette = null;
public abstract object Create(Actor self);
}
@@ -28,9 +28,10 @@ namespace OpenRa.Traits
public virtual IEnumerable<Renderable> Render( Actor self )
{
var palette = self.Info.Traits.Get<RenderSimpleInfo>().Palette;
foreach( var a in anims.Values )
if( a.DisableFunc == null || !a.DisableFunc() )
yield return a.Image( self );
yield return ( palette == null ) ? a.Image( self ) : a.Image( self ).WithPalette(palette);
}
public virtual void Tick(Actor self)