示例#1
0
        private IEnumerable <Vector2> fleetMovementPathVertices(FleetInfo fleet, IEnumerable <Vector2> waypoints)
        {
            var lastPosition = fleetDisplayPosition(fleet);

            foreach (var nextPosition in waypoints)
            {
                foreach (var v in SpriteHelpers.PathRect(lastPosition, nextPosition, PathWidth, GalaxyTextures.Get.PathLine))
                {
                    yield return(v);
                }

                lastPosition = nextPosition;
            }
        }
示例#2
0
 private void setupWormholeSprites()
 {
     this.UpdateScene(
         ref this.wormholeSprites,
         new SceneObjectBuilder().
         StartSprite(WormholeZ, GalaxyTextures.Get.PathLine.Id, Color.Blue).
         AddVertices(
             this.currentPlayer.Wormholes.SelectMany(wormhole => SpriteHelpers.PathRect(
                                                         convert(wormhole.Endpoints.First.Position),
                                                         convert(wormhole.Endpoints.Second.Position),
                                                         0.8f * PathWidth,
                                                         GalaxyTextures.Get.PathLine
                                                         ))).
         Build()
         );
 }