moved BIM/UIM to World, and added World.CreateActor

This commit is contained in:
Bob
2010-01-17 12:50:16 +13:00
parent 79a5966af7
commit e792c9ce17
20 changed files with 55 additions and 52 deletions

View File

@@ -21,7 +21,7 @@ namespace OpenRa.Mods.RA
public Mine(Actor self)
{
this.self = self;
Game.UnitInfluence.Add(self, this);
Game.world.UnitInfluence.Add(self, this);
}
public void OnCrush(Actor crusher)

View File

@@ -17,7 +17,7 @@ namespace OpenRa.Mods.RA
return null;
// Ensure that the cell is empty except for the minelayer
if (Game.UnitInfluence.GetUnitsAt(xy).Any(a => a != self))
if (Game.world.UnitInfluence.GetUnitsAt(xy).Any(a => a != self))
return null;
if (mi.Button == MouseButton.Right && underCursor == self)
@@ -37,7 +37,7 @@ namespace OpenRa.Mods.RA
// todo: delay a bit? (req making deploy-mine an activity)
Game.world.AddFrameEndTask(
w => w.Add(new Actor(self.Info.Traits.Get<MinelayerInfo>().Mine, self.Location, self.Owner)));
w => w.CreateActor(self.Info.Traits.Get<MinelayerInfo>().Mine, self.Location, self.Owner));
}
}
}