Animation für Slots fertig gestellt
This commit is contained in:
+1
-1
@@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
<Button Content="Spin" HorizontalAlignment="Center" Grid.Row="4" Grid.Column="0" Height="50" Width="100" Click="Spin" Margin="0,100,0,0" Background="DarkRed" Foreground="Silver"/>
|
<Button Content="Spin" HorizontalAlignment="Center" Grid.Row="4" Grid.Column="0" Height="50" Width="100" Click="Spin" Margin="0,100,0,0" Background="DarkRed" Foreground="Silver"/>
|
||||||
<Button Grid.Row="0" Content="Hauptmenü" HorizontalAlignment="Center" Click="Hauptmenue" Width="100" Height="50"/>
|
<Button Grid.Row="0" Content="Hauptmenü" HorizontalAlignment="Center" Click="Hauptmenue" Width="100" Height="50"/>
|
||||||
<TextBlock x:Name="Konto" Grid.Column="12" Grid.Row="4" Height="30" Width="100" Margin="0,100,0,0" Background="DarkRed" Foreground="Silver" TextAlignment="Right" FontSize="25"/>
|
<TextBlock x:Name="Konto" Grid.Column="12" Grid.Row="4" Height="30" Width="100" Margin="0,100,0,0" Background="DarkRed" Foreground="Silver" TextAlignment="Right" FontSize="25" Text="{Binding Path=Geld}"/>
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -72,11 +72,12 @@ namespace Casino
|
|||||||
}
|
}
|
||||||
private async Task Spin()
|
private async Task Spin()
|
||||||
{
|
{
|
||||||
|
int[,] currentSlot = new int[3, 6];
|
||||||
users[MainWindow.currentUser].Geld += 100;
|
users[MainWindow.currentUser].Geld += 100;
|
||||||
for (int i = 0; i < 50; i++)
|
for (int i = 0; i < 15; i++)
|
||||||
{
|
{
|
||||||
int[,] currentSlot = new int[6, 3];
|
|
||||||
for (int j = 6; j<_bilder.Count;j--)
|
for (int j = 5; j>=0;j--)
|
||||||
{
|
{
|
||||||
int randomBild = _random.Next(0, AlleBilder.Count);
|
int randomBild = _random.Next(0, AlleBilder.Count);
|
||||||
|
|
||||||
@@ -94,9 +95,9 @@ namespace Casino
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
currentSlot[1, j] = currentSlot[0, j];
|
|
||||||
LoadCard(_bilder[j + 12], currentSlot[1, j]);
|
|
||||||
currentSlot[2, j] = currentSlot[1, j];
|
currentSlot[2, j] = currentSlot[1, j];
|
||||||
|
LoadCard(_bilder[j + 12], currentSlot[1, j]);
|
||||||
|
currentSlot[1, j] = currentSlot[0, j];
|
||||||
LoadCard(_bilder[j + 6], currentSlot[0, j]);
|
LoadCard(_bilder[j + 6], currentSlot[0, j]);
|
||||||
currentSlot[0, j] = randomBild;
|
currentSlot[0, j] = randomBild;
|
||||||
LoadCard(_bilder[j], randomBild);
|
LoadCard(_bilder[j], randomBild);
|
||||||
@@ -114,6 +115,7 @@ namespace Casino
|
|||||||
private async void Spin(object sender, RoutedEventArgs e)
|
private async void Spin(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
await Spin();
|
await Spin();
|
||||||
|
users[MainWindow.currentUser].Geld++;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Hauptmenue(object sender, RoutedEventArgs e)
|
private void Hauptmenue(object sender, RoutedEventArgs e)
|
||||||
|
|||||||
Reference in New Issue
Block a user