Allow Animation to generate its own Renderables.

This commit is contained in:
Paul Chote
2013-07-15 19:21:18 +12:00
parent fc458d191d
commit 15688eed13
22 changed files with 70 additions and 51 deletions

View File

@@ -9,6 +9,7 @@
#endregion
using System;
using System.Collections.Generic;
namespace OpenRA.Graphics
{
@@ -44,6 +45,16 @@ namespace OpenRA.Graphics
}
}
public IEnumerable<IRenderable> Render(WPos pos, int zOffset, PaletteReference palette, float scale)
{
yield return new SpriteRenderable(Image, pos, zOffset, palette, scale);
}
public IEnumerable<IRenderable> Render(WPos pos, PaletteReference palette)
{
return Render(pos, 0, palette, 1f);
}
public void Play(string sequenceName)
{
PlayThen(sequenceName, null);