neue version von slot animation (unfertig)
This commit is contained in:
@@ -31,7 +31,7 @@ namespace Casino
|
|||||||
private void Sound_Click(object sender, RoutedEventArgs e)
|
private void Sound_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Database data = new Database();
|
Database data = new Database();
|
||||||
byte[] blobData = data.GetSound(1);
|
byte[] blobData = data.GetSound(2);
|
||||||
var audioService = new Audioplayer();
|
var audioService = new Audioplayer();
|
||||||
audioService.PlayMusic(blobData);
|
audioService.PlayMusic(blobData);
|
||||||
}
|
}
|
||||||
|
|||||||
+28
-3
@@ -75,14 +75,39 @@ namespace Casino
|
|||||||
users[MainWindow.currentUser].Geld += 100;
|
users[MainWindow.currentUser].Geld += 100;
|
||||||
for (int i = 0; i < 50; i++)
|
for (int i = 0; i < 50; i++)
|
||||||
{
|
{
|
||||||
foreach (var image in _bilder)
|
int[,] currentSlot = new int[6, 3];
|
||||||
|
for (int j = 6; j<_bilder.Count;j--)
|
||||||
{
|
{
|
||||||
int randomBild = _random.Next(0, AlleBilder.Count);
|
int randomBild = _random.Next(0, AlleBilder.Count);
|
||||||
|
|
||||||
LoadCard(image, randomBild);
|
if (i == 0)
|
||||||
}
|
{
|
||||||
|
currentSlot[0,j] = randomBild;
|
||||||
|
LoadCard(_bilder[j], randomBild);
|
||||||
|
}
|
||||||
|
else if (i == 1)
|
||||||
|
{
|
||||||
|
currentSlot[1, j] = currentSlot[0, j];
|
||||||
|
LoadCard(_bilder[j + 6], currentSlot[0,j]);
|
||||||
|
currentSlot[0, j] = randomBild;
|
||||||
|
LoadCard(_bilder[j], randomBild);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentSlot[1, j] = currentSlot[0, j];
|
||||||
|
LoadCard(_bilder[j + 12], currentSlot[1, j]);
|
||||||
|
currentSlot[2, j] = currentSlot[1, j];
|
||||||
|
LoadCard(_bilder[j + 6], currentSlot[0, j]);
|
||||||
|
currentSlot[0, j] = randomBild;
|
||||||
|
LoadCard(_bilder[j], randomBild);
|
||||||
|
}
|
||||||
|
|
||||||
|
await Task.Delay(70);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
await Task.Delay(70);
|
await Task.Delay(70);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user