1 00:00:00,540 --> 00:00:01,860 Hi, welcome back. 2 00:00:02,130 --> 00:00:10,390 In this region, we will add the game sound system to make our game more reliable and more fun to play. 3 00:00:10,620 --> 00:00:11,820 So let's begin. 4 00:00:12,090 --> 00:00:20,520 The first step is to add a new variable called scoring sound using by game look mixer method and the 5 00:00:20,520 --> 00:00:20,970 following. 6 00:00:21,150 --> 00:00:34,770 So scoring underscores sound equal by game to make sure the sound was as capital and of in parentheses 7 00:00:34,770 --> 00:00:44,820 between two single codes scoring that waves which exist in our game folder, as you see. 8 00:00:45,180 --> 00:00:53,700 Also we will add another variable and assign it to buy a game that mixes that sound. 9 00:00:54,420 --> 00:01:00,330 But in this case we will use the bombing, that wav file which exists in our folders. 10 00:01:00,570 --> 00:01:09,840 So Bob and underscore sound equal by game that makes sure the sound was as capital between two parentheses 11 00:01:09,840 --> 00:01:12,890 and to send the code fobbing that way. 12 00:01:13,560 --> 00:01:22,950 Now we need to activate the sounds inside our game loop so we will add the scoring, underscore sound 13 00:01:23,400 --> 00:01:29,340 or scoring sound after every score point for any of the two players. 14 00:01:29,640 --> 00:01:31,200 Player one and the player two. 15 00:01:31,200 --> 00:01:40,960 So after the line of code score one plus equals one, we will add in the first half. 16 00:01:40,960 --> 00:01:50,550 The statement of the whole algorithm scoring underscores the delay and also inside the second F statement 17 00:01:50,550 --> 00:01:59,740 of the algorithm after the score to plus equals one scoring underscore sound. 18 00:01:59,760 --> 00:02:10,720 The play finally inside the last F statement of which also includes the call of Bolto Townsing method. 19 00:02:11,190 --> 00:02:20,190 We add bobbing underscore sound the delay method which will blaze absorbing sound when the ball hits 20 00:02:20,490 --> 00:02:23,790 the two paddles the following. 21 00:02:23,910 --> 00:02:34,710 So we based the scoring underscore sound the play method and convert it to bobbing underscore sound 22 00:02:34,740 --> 00:02:44,520 the blame them build our project and it will run correctly with the sound system of our game. 23 00:02:44,640 --> 00:02:54,930 As you see the game run perfectly with the sound system that we implement inside it, and we will test 24 00:02:54,930 --> 00:02:56,670 the game for a while. 25 00:04:35,720 --> 00:04:40,940 Bitter, bitter, bitter, bitter. 26 00:04:49,860 --> 00:04:57,430 At this point, we reached the end of this lecture, probably enjoyed the lecture and get all of that. 27 00:04:57,920 --> 00:05:00,870 Thanks for watching and thanks for being here. 28 00:05:01,140 --> 00:05:02,680 See you next, Badi.