Hi, welcome back.
In this region, we will add the game sound system to make our game more reliable and more fun to play.
So let's begin.
The first step is to add a new variable called scoring sound using by game look mixer method and the
following.
So scoring underscores sound equal by game to make sure the sound was as capital and of in parentheses
between two single codes scoring that waves which exist in our game folder, as you see.
Also we will add another variable and assign it to buy a game that mixes that sound.
But in this case we will use the bombing, that wav file which exists in our folders.
So Bob and underscore sound equal by game that makes sure the sound was as capital between two parentheses
and to send the code fobbing that way.
Now we need to activate the sounds inside our game loop so we will add the scoring, underscore sound
or scoring sound after every score point for any of the two players.
Player one and the player two.
So after the line of code score one plus equals one, we will add in the first half.
The statement of the whole algorithm scoring underscores the delay and also inside the second F statement
of the algorithm after the score to plus equals one scoring underscore sound.
The play finally inside the last F statement of which also includes the call of Bolto Townsing method.
We add bobbing underscore sound the delay method which will blaze absorbing sound when the ball hits
the two paddles the following.
So we based the scoring underscore sound the play method and convert it to bobbing underscore sound
the blame them build our project and it will run correctly with the sound system of our game.
As you see the game run perfectly with the sound system that we implement inside it, and we will test
the game for a while.
Bitter, bitter, bitter, bitter.
At this point, we reached the end of this lecture, probably enjoyed the lecture and get all of that.
Thanks for watching and thanks for being here.
See you next, Badi.