public void SetPositionInSector() { position = new Vector2( (int)Game.random.Next(sector.SpaceRegionArea.Left, sector.SpaceRegionArea.Right), (int)Game.random.Next(sector.SpaceRegionArea.Top, sector.SpaceRegionArea.Bottom)); while (ShipAction.InRestrictedSpace(this, position)) { position = new Vector2( (int)Game.random.Next(sector.SpaceRegionArea.Left, sector.SpaceRegionArea.Right), (int)Game.random.Next(sector.SpaceRegionArea.Top, sector.SpaceRegionArea.Bottom)); } }
public void Add(ShipAction a) { Actions.Add(a); }