Beispiel #1
0
 private void setupStarSprites()
 {
     this.UpdateScene(
         ref this.starSprites,
         this.currentPlayer.Stars.Select(star => new SceneObject(
                                             new [] {
         new PolygonData(
             StarColorZ,
             new SpriteData(Matrix4.Identity, GalaxyTextures.Get.StarColor.Id, star.Color),
             SpriteHelpers.TexturedRectVertexData(convert(star.Position), 1, 1, GalaxyTextures.Get.StarColor)
             ),
         new PolygonData(
             StarSaturationZ,
             new SpriteData(Matrix4.Identity, GalaxyTextures.Get.StarGlow.Id, Color.White),
             SpriteHelpers.TexturedRectVertexData(convert(star.Position), 1, 1, GalaxyTextures.Get.StarGlow)
             ),
         new PolygonData(
             StarNameZ,
             new SpriteData(Matrix4.Identity, TextRenderUtil.Get.TextureId, starNameColor(star)),
             TextRenderUtil.Get.BufferText(
                 star.Name.ToText(LocalizationManifest.Get.CurrentLanguage),
                 -0.5f,
                 Matrix4.CreateScale(StarNameScale) * Matrix4.CreateTranslation((float)star.Position.X, (float)star.Position.Y - 0.5f, 0)
                 ).ToList()
             )
     },
                                             new PhysicalData(convert(star.Position), new Vector2(0, 0)),
                                             star
                                             )).ToList()
         );
 }