Sound effects, jingles and some minor fixes

This commit is contained in:
JappaWakka 2023-05-27 15:40:38 +02:00
parent 4aeecc99d1
commit 2314ce6834
6 changed files with 56 additions and 5 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -18035,6 +18035,18 @@
<Content Include="Content\Sounds\OverworldPoison.wav"> <Content Include="Content\Sounds\OverworldPoison.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Content\Sounds\VoltorbFlip\LoseGame.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Sounds\VoltorbFlip\QuitGame.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Sounds\VoltorbFlip\StartGame.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Sounds\VoltorbFlip\WinGame.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Textures\Battle\Flying\Gust.png"> <Content Include="Content\Textures\Battle\Flying\Gust.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>

View File

@ -286,7 +286,7 @@ Namespace VoltorbFlip
'Coins 'Coins
For ColumnIndex = 0 To GridSize - 1 For ColumnIndex = 0 To GridSize - 1
Dim CoinSumString As String = "00" Dim CoinSumString As String = "00"
If GameState = States.Game Or GameState = States.Memo Then If GameState = States.Game Or GameState = States.Memo Or GameState = States.QuitQuestion Then
Dim CoinSumInteger As Integer = CoinSums(1)(ColumnIndex) Dim CoinSumInteger As Integer = CoinSums(1)(ColumnIndex)
If CoinSumInteger < 10 Then If CoinSumInteger < 10 Then
CoinSumString = "0" & CoinSumInteger.ToString CoinSumString = "0" & CoinSumInteger.ToString
@ -299,7 +299,7 @@ Namespace VoltorbFlip
'Voltorbs 'Voltorbs
For ColumnIndex = 0 To GridSize - 1 For ColumnIndex = 0 To GridSize - 1
Dim VoltorbSumString As String = "0" Dim VoltorbSumString As String = "0"
If GameState = States.Game Or GameState = States.Memo Then If GameState = States.Game Or GameState = States.Memo Or GameState = States.QuitQuestion Then
VoltorbSumString = VoltorbSums(1)(ColumnIndex).ToString VoltorbSumString = VoltorbSums(1)(ColumnIndex).ToString
End If End If
SpriteBatch.DrawString(FontManager.VoltorbFlipFont, VoltorbSumString, New Vector2(CInt(BoardOrigin.X + TileSize.Width * ColumnIndex + TileSize.Width - 8 - FontManager.VoltorbFlipFont.MeasureString(VoltorbSumString).X), BoardOrigin.Y + TileSize.Height * GridSize + 34), mainBackgroundColor) SpriteBatch.DrawString(FontManager.VoltorbFlipFont, VoltorbSumString, New Vector2(CInt(BoardOrigin.X + TileSize.Width * ColumnIndex + TileSize.Width - 8 - FontManager.VoltorbFlipFont.MeasureString(VoltorbSumString).X), BoardOrigin.Y + TileSize.Height * GridSize + 34), mainBackgroundColor)
@ -756,8 +756,10 @@ TryAgain:
If KeyBoardHandler.KeyPressed(KeyBindings.RunKey) Or ControllerHandler.ButtonPressed(Buttons.X) Then If KeyBoardHandler.KeyPressed(KeyBindings.RunKey) Or ControllerHandler.ButtonPressed(Buttons.X) Then
If GameState = States.Game Then If GameState = States.Game Then
GameState = States.Memo GameState = States.Memo
SoundManager.PlaySound("select")
ElseIf GameState = States.Memo Then ElseIf GameState = States.Memo Then
GameState = States.Game GameState = States.Game
SoundManager.PlaySound("select")
End If End If
End If End If
@ -766,8 +768,10 @@ TryAgain:
If Controls.Accept(True, False, False) = True AndAlso MouseHandler.IsInRectangle(ButtonRectangle) AndAlso Delay = 0 Then If Controls.Accept(True, False, False) = True AndAlso MouseHandler.IsInRectangle(ButtonRectangle) AndAlso Delay = 0 Then
If GameState = States.Game Then If GameState = States.Game Then
GameState = States.Memo GameState = States.Memo
SoundManager.PlaySound("select")
ElseIf GameState = States.Memo Then ElseIf GameState = States.Memo Then
GameState = States.Game GameState = States.Game
SoundManager.PlaySound("select")
End If End If
End If End If
@ -786,12 +790,14 @@ TryAgain:
If MemoIndex < 0 Then If MemoIndex < 0 Then
MemoIndex = 3 MemoIndex = 3
End If End If
SoundManager.PlaySound("select")
End If End If
If Controls.Right(True, False, True, False, False, False) = True OrElse ControllerHandler.ButtonPressed(Buttons.RightShoulder) Then If Controls.Right(True, False, True, False, False, False) = True OrElse ControllerHandler.ButtonPressed(Buttons.RightShoulder) Then
MemoIndex += 1 MemoIndex += 1
If MemoIndex > 3 Then If MemoIndex > 3 Then
MemoIndex = 0 MemoIndex = 0
End If End If
SoundManager.PlaySound("select")
End If End If
'Set the Memo type to the one under the mouse 'Set the Memo type to the one under the mouse
@ -800,18 +806,22 @@ TryAgain:
If MouseHandler.IsInRectangle(New Rectangle(MemoMenuRectangle.X, MemoMenuRectangle.Y, CInt(MemoMenuRectangle.Width / 2), CInt(MemoMenuRectangle.Height / 2))) = True Then If MouseHandler.IsInRectangle(New Rectangle(MemoMenuRectangle.X, MemoMenuRectangle.Y, CInt(MemoMenuRectangle.Width / 2), CInt(MemoMenuRectangle.Height / 2))) = True Then
'Voltorb 'Voltorb
MemoIndex = 0 MemoIndex = 0
SoundManager.PlaySound("select")
End If End If
If MouseHandler.IsInRectangle(New Rectangle(MemoMenuRectangle.X + CInt(MemoMenuRectangle.Width / 2), MemoMenuRectangle.Y, CInt(MemoMenuRectangle.Width / 2), CInt(MemoMenuRectangle.Height / 2))) = True Then If MouseHandler.IsInRectangle(New Rectangle(MemoMenuRectangle.X + CInt(MemoMenuRectangle.Width / 2), MemoMenuRectangle.Y, CInt(MemoMenuRectangle.Width / 2), CInt(MemoMenuRectangle.Height / 2))) = True Then
'One 'One
MemoIndex = 1 MemoIndex = 1
SoundManager.PlaySound("select")
End If End If
If MouseHandler.IsInRectangle(New Rectangle(MemoMenuRectangle.X, MemoMenuRectangle.Y + CInt(MemoMenuRectangle.Height / 2), CInt(MemoMenuRectangle.Width / 2), CInt(MemoMenuRectangle.Height / 2))) = True Then If MouseHandler.IsInRectangle(New Rectangle(MemoMenuRectangle.X, MemoMenuRectangle.Y + CInt(MemoMenuRectangle.Height / 2), CInt(MemoMenuRectangle.Width / 2), CInt(MemoMenuRectangle.Height / 2))) = True Then
'Two 'Two
MemoIndex = 2 MemoIndex = 2
SoundManager.PlaySound("select")
End If End If
If MouseHandler.IsInRectangle(New Rectangle(MemoMenuRectangle.X + CInt(MemoMenuRectangle.Width / 2), MemoMenuRectangle.Y + CInt(MemoMenuRectangle.Height / 2), CInt(MemoMenuRectangle.Width / 2), CInt(MemoMenuRectangle.Height / 2))) = True Then If MouseHandler.IsInRectangle(New Rectangle(MemoMenuRectangle.X + CInt(MemoMenuRectangle.Width / 2), MemoMenuRectangle.Y + CInt(MemoMenuRectangle.Height / 2), CInt(MemoMenuRectangle.Width / 2), CInt(MemoMenuRectangle.Height / 2))) = True Then
'Three 'Three
MemoIndex = 3 MemoIndex = 3
SoundManager.PlaySound("select")
End If End If
End If End If
Else Else
@ -829,6 +839,7 @@ TryAgain:
'Quiting Voltorb Flip 'Quiting Voltorb Flip
If Controls.Dismiss(False, True, True) AndAlso GameState = States.Game AndAlso Delay = 0 Then If Controls.Dismiss(False, True, True) AndAlso GameState = States.Game AndAlso Delay = 0 Then
TextBox.Show(QuitQuestionText) TextBox.Show(QuitQuestionText)
SoundManager.PlaySound("select")
GameState = States.QuitQuestion GameState = States.QuitQuestion
End If End If
@ -836,6 +847,7 @@ TryAgain:
Dim QuitButtonRectangle As New Rectangle(CInt(GameOrigin.X + 424), CInt(GameOrigin.Y + 448), 128, 56) Dim QuitButtonRectangle As New Rectangle(CInt(GameOrigin.X + 424), CInt(GameOrigin.Y + 448), 128, 56)
If Controls.Accept(True, False, False) AndAlso MouseHandler.IsInRectangle(QuitButtonRectangle) AndAlso GameState = States.Game AndAlso Delay = 0 Then If Controls.Accept(True, False, False) AndAlso MouseHandler.IsInRectangle(QuitButtonRectangle) AndAlso GameState = States.Game AndAlso Delay = 0 Then
TextBox.Show(QuitQuestionText) TextBox.Show(QuitQuestionText)
SoundManager.PlaySound("select")
GameState = States.QuitQuestion GameState = States.QuitQuestion
End If End If
@ -854,6 +866,9 @@ TryAgain:
'Flip currently selected Tile 'Flip currently selected Tile
If Controls.Accept(False, True, True) AndAlso GameState = States.Game AndAlso Delay = 0 Then If Controls.Accept(False, True, True) AndAlso GameState = States.Game AndAlso Delay = 0 Then
Dim CurrentTile As Vector2 = GetCurrentTile() Dim CurrentTile As Vector2 = GetCurrentTile()
If Board(CInt(CurrentTile.Y))(CInt(CurrentTile.X)).Flipped = False Then
SoundManager.PlaySound("select")
End If
Board(CInt(CurrentTile.Y))(CInt(CurrentTile.X)).Flip() Board(CInt(CurrentTile.Y))(CInt(CurrentTile.X)).Flip()
End If End If
@ -861,11 +876,18 @@ TryAgain:
If Controls.Accept(True, False, False) AndAlso GameState = States.Game AndAlso MouseHandler.IsInRectangle(New Rectangle(CInt(BoardOrigin.X), CInt(BoardOrigin.Y), BoardSize.Width, BoardSize.Height)) AndAlso Delay = 0 Then If Controls.Accept(True, False, False) AndAlso GameState = States.Game AndAlso MouseHandler.IsInRectangle(New Rectangle(CInt(BoardOrigin.X), CInt(BoardOrigin.Y), BoardSize.Width, BoardSize.Height)) AndAlso Delay = 0 Then
Dim TileUnderMouse As Vector2 = GetTileUnderMouse() Dim TileUnderMouse As Vector2 = GetTileUnderMouse()
BoardCursorDestination = GetCursorOffset(CInt(TileUnderMouse.X), CInt(TileUnderMouse.Y)) BoardCursorDestination = GetCursorOffset(CInt(TileUnderMouse.X), CInt(TileUnderMouse.Y))
If Board(CInt(TileUnderMouse.Y))(CInt(TileUnderMouse.X)).Flipped = False Then
SoundManager.PlaySound("select")
End If
Board(CInt(TileUnderMouse.Y))(CInt(TileUnderMouse.X)).Flip() Board(CInt(TileUnderMouse.Y))(CInt(TileUnderMouse.X)).Flip()
End If End If
'Adding currently selected Memo to currently selected Tile 'Adding currently selected Memo to currently selected Tile
If Controls.Accept(False, True, True) AndAlso GameState = States.Memo AndAlso Board(CInt(GetCurrentTile.Y))(CInt(GetCurrentTile.X)).Flipped = False AndAlso Delay = 0 Then If Controls.Accept(False, True, True) AndAlso GameState = States.Memo AndAlso Board(CInt(GetCurrentTile.Y))(CInt(GetCurrentTile.X)).Flipped = False AndAlso Delay = 0 Then
If Board(CInt(GetCurrentTile.Y))(CInt(GetCurrentTile.X)).GetMemo(MemoIndex) = False Then
SoundManager.PlaySound("select")
End If
Board(CInt(GetCurrentTile.Y))(CInt(GetCurrentTile.X)).SetMemo(MemoIndex, True) Board(CInt(GetCurrentTile.Y))(CInt(GetCurrentTile.X)).SetMemo(MemoIndex, True)
End If End If
@ -873,13 +895,19 @@ TryAgain:
If Controls.Accept(True, False, False) AndAlso GameState = States.Memo AndAlso MouseHandler.IsInRectangle(New Rectangle(CInt(BoardOrigin.X), CInt(BoardOrigin.Y), BoardSize.Width, BoardSize.Height)) AndAlso Delay = 0 Then If Controls.Accept(True, False, False) AndAlso GameState = States.Memo AndAlso MouseHandler.IsInRectangle(New Rectangle(CInt(BoardOrigin.X), CInt(BoardOrigin.Y), BoardSize.Width, BoardSize.Height)) AndAlso Delay = 0 Then
Dim TileUnderMouse As Vector2 = GetTileUnderMouse() Dim TileUnderMouse As Vector2 = GetTileUnderMouse()
BoardCursorDestination = GetCursorOffset(CInt(TileUnderMouse.X), CInt(TileUnderMouse.Y)) BoardCursorDestination = GetCursorOffset(CInt(TileUnderMouse.X), CInt(TileUnderMouse.Y))
If Board(CInt(GetTileUnderMouse.Y))(CInt(GetTileUnderMouse.X)).Flipped = False Then If Board(CInt(TileUnderMouse.Y))(CInt(TileUnderMouse.X)).Flipped = False Then
If Board(CInt(TileUnderMouse.Y))(CInt(TileUnderMouse.X)).GetMemo(MemoIndex) = False Then
SoundManager.PlaySound("select")
End If
Board(CInt(TileUnderMouse.Y))(CInt(TileUnderMouse.X)).SetMemo(MemoIndex, True) Board(CInt(TileUnderMouse.Y))(CInt(TileUnderMouse.X)).SetMemo(MemoIndex, True)
End If End If
End If End If
'Removing currently selected Memo from currently selected Tile 'Removing currently selected Memo from currently selected Tile
If Controls.Dismiss(False, True, True) AndAlso GameState = States.Memo AndAlso Board(CInt(GetCurrentTile.Y))(CInt(GetCurrentTile.X)).Flipped = False AndAlso Delay = 0 Then If Controls.Dismiss(False, True, True) AndAlso GameState = States.Memo AndAlso Board(CInt(GetCurrentTile.Y))(CInt(GetCurrentTile.X)).Flipped = False AndAlso Delay = 0 Then
If Board(CInt(GetCurrentTile.Y))(CInt(GetCurrentTile.X)).GetMemo(MemoIndex) = True Then
SoundManager.PlaySound("select")
End If
Board(CInt(GetCurrentTile.Y))(CInt(GetCurrentTile.X)).SetMemo(MemoIndex, False) Board(CInt(GetCurrentTile.Y))(CInt(GetCurrentTile.X)).SetMemo(MemoIndex, False)
End If End If
@ -887,7 +915,10 @@ TryAgain:
If Controls.Dismiss(True, False, False) AndAlso GameState = States.Memo AndAlso MouseHandler.IsInRectangle(New Rectangle(CInt(BoardOrigin.X), CInt(BoardOrigin.Y), BoardSize.Width, BoardSize.Height)) AndAlso Delay = 0 Then If Controls.Dismiss(True, False, False) AndAlso GameState = States.Memo AndAlso MouseHandler.IsInRectangle(New Rectangle(CInt(BoardOrigin.X), CInt(BoardOrigin.Y), BoardSize.Width, BoardSize.Height)) AndAlso Delay = 0 Then
Dim TileUnderMouse As Vector2 = GetTileUnderMouse() Dim TileUnderMouse As Vector2 = GetTileUnderMouse()
BoardCursorDestination = GetCursorOffset(CInt(TileUnderMouse.X), CInt(TileUnderMouse.Y)) BoardCursorDestination = GetCursorOffset(CInt(TileUnderMouse.X), CInt(TileUnderMouse.Y))
If Board(CInt(GetTileUnderMouse.Y))(CInt(GetTileUnderMouse.X)).Flipped = False Then If Board(CInt(TileUnderMouse.Y))(CInt(TileUnderMouse.X)).Flipped = False Then
If Board(CInt(TileUnderMouse.Y))(CInt(TileUnderMouse.X)).GetMemo(MemoIndex) = True Then
SoundManager.PlaySound("select")
End If
Board(CInt(TileUnderMouse.Y))(CInt(TileUnderMouse.X)).SetMemo(MemoIndex, False) Board(CInt(TileUnderMouse.Y))(CInt(TileUnderMouse.X)).SetMemo(MemoIndex, False)
End If End If
End If End If
@ -897,6 +928,7 @@ TryAgain:
'Level complete! 'Level complete!
If CurrentCoins >= MaxCoins AndAlso GameState = States.Game Then If CurrentCoins >= MaxCoins AndAlso GameState = States.Game Then
Dim GameClearText = "Game clear! You received~" & CurrentCoins.ToString & " " & "Coins!" Dim GameClearText = "Game clear! You received~" & CurrentCoins.ToString & " " & "Coins!"
SoundManager.PlaySound("VoltorbFlip\WinGame")
TextBox.Show(GameClearText) TextBox.Show(GameClearText)
If Delay = 0 Then If Delay = 0 Then
PreviousLevel = CurrentLevel PreviousLevel = CurrentLevel
@ -947,6 +979,7 @@ TryAgain:
If Controls.Accept = True AndAlso TextBox.Showing = False Then If Controls.Accept = True AndAlso TextBox.Showing = False Then
If ReadyAmount = CInt(GridSize * GridSize) Then If ReadyAmount = CInt(GridSize * GridSize) Then
SoundManager.PlaySound("select")
GameState = States.FlipWon GameState = States.FlipWon
End If End If
End If End If
@ -976,6 +1009,7 @@ TryAgain:
Else Else
CurrentLevel = 1 CurrentLevel = 1
End If End If
SoundManager.PlaySound("select")
GameState = States.FlipLost GameState = States.FlipLost
End If End If
End If End If
@ -1020,6 +1054,7 @@ TryAgain:
'Prepare new Level 'Prepare new Level
If GameState = States.NewLevel Then If GameState = States.NewLevel Then
If TextBox.Showing = False Then If TextBox.Showing = False Then
SoundManager.PlaySound("VoltorbFlip\StartGame")
Board = CreateBoard(CurrentLevel) Board = CreateBoard(CurrentLevel)
If CurrentLevel < PreviousLevel Then If CurrentLevel < PreviousLevel Then
TextBox.Show("Dropped to Game Lv." & " " & CurrentLevel & "!") TextBox.Show("Dropped to Game Lv." & " " & CurrentLevel & "!")
@ -1098,6 +1133,7 @@ TryAgain:
End If End If
PreviousLevel = CurrentLevel PreviousLevel = CurrentLevel
SoundManager.PlaySound("VoltorbFlip\QuitGame", True)
TextBox.Show("Game Over!~Dropped to Game Lv." & " " & CurrentLevel & "!") TextBox.Show("Game Over!~Dropped to Game Lv." & " " & CurrentLevel & "!")
CurrentFlips = 0 CurrentFlips = 0
@ -1213,6 +1249,9 @@ TryAgain:
If Flipped = True Then If Flipped = True Then
If Activated = False Then If Activated = False Then
If Me.Value = Values.Voltorb Then If Me.Value = Values.Voltorb Then
If VoltorbFlipScreen.GameState = VoltorbFlipScreen.States.Game Then
SoundManager.PlaySound("VoltorbFlip\LoseGame", True)
End If
Screen.TextBox.Show("Oh no! You get 0 coins!") Screen.TextBox.Show("Oh no! You get 0 coins!")
VoltorbFlipScreen.GameState = VoltorbFlipScreen.States.GameLost VoltorbFlipScreen.GameState = VoltorbFlipScreen.States.GameLost
Else Else