Change traits to use RenderSprites directly.

This commit is contained in:
Paul Chote
2013-05-25 11:41:23 +12:00
parent 07f3c0171d
commit e7aa6ce998
18 changed files with 58 additions and 42 deletions

View File

@@ -13,7 +13,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render
{
public class WithSmokeInfo : ITraitInfo, Requires<RenderSimpleInfo>
public class WithSmokeInfo : ITraitInfo, Requires<RenderSpritesInfo>
{
public object Create(ActorInitializer init) { return new WithSmoke(init.self); }
}
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.RA.Render
public WithSmoke(Actor self)
{
var rs = self.Trait<RenderSimple>();
var rs = self.Trait<RenderSprites>();
anim = new Animation("smoke_m");
rs.anims.Add("smoke", new AnimationWithOffset(anim, null, () => !isSmoking));