Пример #1
0
        private IEnumerable <Vector2> fleetMovementPathVertices(FleetInfo fleet, IEnumerable <Vector2> waypoints)
        {
            var lastPosition = fleetDisplayPosition(fleet).Xy;

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

                lastPosition = nextPosition;
            }
        }
Пример #2
0
 private void setupWormholeSprites()
 {
     this.UpdateScene(
         ref this.wormholeSprites,
         new SceneObject(new PolygonData(
                             WormholeZ,
                             new SpriteData(
                                 Matrix4.Identity, GalaxyTextures.Get.PathLine.Id, Color.Blue
                                 ),
                             this.currentPlayer.Wormholes.SelectMany(wormhole => SpriteHelpers.PathRectVertexData(
                                                                         convert(wormhole.FromStar.Position),
                                                                         convert(wormhole.ToStar.Position),
                                                                         0.8f * PathWidth,
                                                                         GalaxyTextures.Get.PathLine
                                                                         ))
                             ))
         );
 }