splitting traits into own files
This commit is contained in:
23
OpenRa.Game/Traits/RenderBuilding.cs
Normal file
23
OpenRa.Game/Traits/RenderBuilding.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using IjwFramework.Types;
|
||||
using OpenRa.Game.Graphics;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class RenderBuilding : RenderSimple
|
||||
{
|
||||
public RenderBuilding(Actor self)
|
||||
: base(self)
|
||||
{
|
||||
anim.PlayThen("make", () => anim.PlayRepeating("idle"));
|
||||
}
|
||||
|
||||
public override IEnumerable<Pair<Sprite, float2>> Render(Actor self)
|
||||
{
|
||||
yield return Pair.New(anim.Image, 24f * (float2)self.Location);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user