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