Exemplo n.º 1
0
        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));
            }
        }
Exemplo n.º 2
0
 public void Add(ShipAction a)
 {
     Actions.Add(a);
 }