using StatelessTraitInfo<> for some things

This commit is contained in:
Chris Forbes
2010-01-10 14:15:45 +13:00
parent 79ce6b70b6
commit be9fd1e277
18 changed files with 20 additions and 89 deletions

View File

@@ -3,15 +3,10 @@ using System.Collections.Generic;
using System.Linq;
namespace OpenRa.Game.Traits
{
class ThiefInfo : ITraitInfo
{
public object Create(Actor self) { return new Thief(self); }
}
class ThiefInfo : StatelessTraitInfo<Thief> { }
class Thief : IIssueOrder, IResolveOrder
{
public Thief(Actor self) { }
public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor)
{
if (mi.Button != MouseButton.Right) return null;