Sound merge
This commit is contained in:
+23
-16
@@ -45,6 +45,7 @@ namespace Casino
|
|||||||
|
|
||||||
|
|
||||||
private int highestWin = 5;
|
private int highestWin = 5;
|
||||||
|
private int bestSoundId;
|
||||||
|
|
||||||
// Lenard Gerdes
|
// Lenard Gerdes
|
||||||
public Slots()
|
public Slots()
|
||||||
@@ -62,9 +63,9 @@ namespace Casino
|
|||||||
AlleBilder = new List<Byte[]>
|
AlleBilder = new List<Byte[]>
|
||||||
{
|
{
|
||||||
db.GetCardImage(2),db.GetCardImage(3),
|
db.GetCardImage(2),db.GetCardImage(3),
|
||||||
db.GetCardImage(4),db.GetCardImage(5),
|
/*db.GetCardImage(4),db.GetCardImage(5),
|
||||||
db.GetCardImage(6),db.GetCardImage(7),
|
db.GetCardImage(6),db.GetCardImage(7),
|
||||||
db.GetCardImage(8),db.GetCardImage(9), db.GetCardImage(10)
|
db.GetCardImage(8),db.GetCardImage(9), db.GetCardImage(10)*/
|
||||||
|
|
||||||
};
|
};
|
||||||
Konto.Text = users[MainWindow.currentUser].Geld.ToString();
|
Konto.Text = users[MainWindow.currentUser].Geld.ToString();
|
||||||
@@ -166,6 +167,14 @@ namespace Casino
|
|||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UpdateSound(int soundId)
|
||||||
|
{
|
||||||
|
// Speichert nur den EINEN soundId-Wert, der am höchsten ist
|
||||||
|
if (soundId > bestSoundId)
|
||||||
|
{
|
||||||
|
bestSoundId = soundId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Lenard Gerdes
|
// Lenard Gerdes
|
||||||
public decimal CheckWin(int[,] board, decimal einsatz)
|
public decimal CheckWin(int[,] board, decimal einsatz)
|
||||||
@@ -264,7 +273,7 @@ namespace Casino
|
|||||||
if (fullBoard)
|
if (fullBoard)
|
||||||
{
|
{
|
||||||
multiplikator += FULLBOARD;
|
multiplikator += FULLBOARD;
|
||||||
highestWin++;
|
highestWin = 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (multiplikator != 0) PlayWinSound();
|
if (multiplikator != 0) PlayWinSound();
|
||||||
@@ -292,33 +301,40 @@ namespace Casino
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (gleiche >= 3)
|
if (gleiche >= 3)
|
||||||
|
{
|
||||||
gewinn += DREI;
|
gewinn += DREI;
|
||||||
|
if (5 > bestSoundId) bestSoundId = 5;
|
||||||
|
}
|
||||||
|
|
||||||
if (gleiche >= 4)
|
if (gleiche >= 4)
|
||||||
{
|
{
|
||||||
gewinn += VIER;
|
gewinn += VIER;
|
||||||
highestWin++;
|
highestWin++;
|
||||||
|
if (6 > bestSoundId) bestSoundId = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gleiche >= 5)
|
if (gleiche >= 5)
|
||||||
{
|
{
|
||||||
gewinn += FUENF;
|
gewinn += FUENF;
|
||||||
highestWin++;
|
highestWin++;
|
||||||
|
if (7 > bestSoundId) bestSoundId = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gleiche >= 6)
|
if (gleiche >= 6)
|
||||||
{
|
{
|
||||||
gewinn += SECHS;
|
gewinn += SECHS;
|
||||||
highestWin++;
|
highestWin++;
|
||||||
|
if (8 > bestSoundId) bestSoundId = 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return gewinn;
|
return gewinn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PlayWinSound()
|
||||||
|
{
|
||||||
|
audio.PlaySound(db.GetSound(bestSoundId));
|
||||||
|
highestWin = 5;
|
||||||
|
}
|
||||||
|
|
||||||
//Numberfield Colin Langer
|
//Numberfield Colin Langer
|
||||||
private static readonly Regex _regex = new Regex("^[0-9]"); // Regex to match non-numeric input
|
private static readonly Regex _regex = new Regex("^[0-9]"); // Regex to match non-numeric input
|
||||||
@@ -350,14 +366,5 @@ namespace Casino
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lenard Gerdes
|
|
||||||
void PlayWinSound()
|
|
||||||
{
|
|
||||||
audio.PlaySound(db.GetSound(highestWin));
|
|
||||||
highestWin = 5;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user