public ScorePanel(string name)
{
StackPanel stack = new StackPanel(name)
{
Width = (int)768,
Height = 76,
HorizontalAlignment = HorizontalAlignment.Right,
VerticalAlignment = VerticalAlignment.Bottom,
Orientation = Orientation.Horizontal,
Margin = new Thickness(10),
};
stack.Add(new Image(WaveContent.Assets.Textures.starfish_png)
{
Width = 70,
Height = 70,
Stretch = Stretch.Fill,
DrawOrder = 0.1f,
VerticalAlignment = VerticalAlignment.Center,
Margin = new Thickness(5),
});
this.scoreText = new TextBlock("scoresText")
{
Width = 80,
FontPath = WaveContent.Assets.Fonts.Bulky_Pixels_26_TTF,
VerticalAlignment = VerticalAlignment.Center,
TextAlignment = WaveEngine.Components.UI.TextAlignment.Center,
Margin = new Thickness(5, 10, 5, 5),
DrawOrder = 0.1f,
};
stack.Add(this.scoreText);
this.entity = stack.Entity;
this.Score = 0;
}