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

@@ -1,24 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OpenRa.Game.Traits
{
class ProvidesRadarInfo : ITraitInfo
{
public object Create(Actor self) { return new ProvidesRadar(self); }
}
class ProvidesRadarInfo : StatelessTraitInfo<ProvidesRadar> {}
class ProvidesRadar
{
Actor self;
public ProvidesRadar(Actor self)
{
this.self = self;
}
public bool IsActive()
public bool IsActive(Actor self)
{
// TODO: Check for nearby MRJ