splitting traits into own files

This commit is contained in:
Chris Forbes
2009-10-13 21:11:21 +13:00
parent 9af7b09e1d
commit 3b1558d678
15 changed files with 435 additions and 328 deletions

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenRa.Game.Graphics;
using IjwFramework.Types;
namespace OpenRa.Game.Traits
{
abstract class RenderSimple : IRender, ITick
{
public Animation anim;
public RenderSimple(Actor self)
{
anim = new Animation(self.unitInfo.Image ?? self.unitInfo.Name);
}
public abstract IEnumerable<Pair<Sprite, float2>> Render(Actor self);
public virtual void Tick(Actor self, Game game, int dt)
{
anim.Tick(dt);
}
}
}