1
00:00:00,150 --> 00:00:04,640
Now that we've introduced the score, we need a way to show the score to the player.

2
00:00:04,920 --> 00:00:09,510
So now we're going to start out first by applying some of success, where do you have an element here

3
00:00:09,510 --> 00:00:11,310
that we can apply scoring to?

4
00:00:11,670 --> 00:00:17,560
Let's create that class of score within our styling and update some of the values.

5
00:00:17,620 --> 00:00:22,410
So, first of all, let's set a background color, and this should be a relatively quick lesson where

6
00:00:22,410 --> 00:00:27,750
we're just going to be updating and outputting the score into the HTML, into the element setting a

7
00:00:27,750 --> 00:00:37,380
height for a text line center, set a color of white and font size, and also let's take a font family.

8
00:00:37,380 --> 00:00:38,630
So how about we do fantasy?

9
00:00:39,630 --> 00:00:44,870
So now we've got our score area and we can put a default value in there so we can see it.

10
00:00:45,150 --> 00:00:47,220
So the score is kind of in the background there.

11
00:00:47,400 --> 00:00:52,560
So what we want to happen is what the score actually to update and the only place we're changing the

12
00:00:52,560 --> 00:00:53,940
score is over here.

13
00:00:54,150 --> 00:01:00,270
So it's relatively straightforward where we can take the inner HTML or the inner text and we can set

14
00:01:00,270 --> 00:01:03,230
it to be equal to the value of score.

15
00:01:03,840 --> 00:01:08,190
And let's also put a message to the player so we can say score.

16
00:01:08,520 --> 00:01:14,110
And then here we've got player taking that player score value and outputting it.

17
00:01:14,130 --> 00:01:15,030
So let's try that out.

18
00:01:15,390 --> 00:01:19,260
So now when we start the game, we see our score is decreasing.

19
00:01:20,510 --> 00:01:27,290
And every time we do a next lap, it's decreasing again, so hopefully by now we've hit our target and

20
00:01:27,290 --> 00:01:30,890
we've got another target and then we can increase the score again by two thousand.

21
00:01:31,100 --> 00:01:34,040
So that's an extra incentive not to miss the target.

22
00:01:34,310 --> 00:01:41,050
And also, every time that we drop one of the bombs, then we also want to decrease the score value.

23
00:01:41,330 --> 00:01:46,130
And there's one other thing that I just quickly noticed, and that's the value of why.

24
00:01:46,310 --> 00:01:50,130
So we don't want to have it overlapping the score area.

25
00:01:50,540 --> 00:01:56,930
So now it's limited to being move, moving up just under the score area and we can probably even change

26
00:01:56,930 --> 00:01:57,880
this to 80.

27
00:01:58,670 --> 00:02:04,100
So sometimes you do need to make these quick minor adjustments just to make sure that your game is functioning

28
00:02:04,100 --> 00:02:04,910
as needed.

29
00:02:05,120 --> 00:02:09,800
And we probably don't need this much spacing for score, but for now, we're going to leave it in case

30
00:02:09,800 --> 00:02:14,960
while playsets, a messaging or some additional information, it's always good to have the spacing for

31
00:02:14,960 --> 00:02:15,680
that builtin.

32
00:02:16,100 --> 00:02:17,480
So add this into your project.

33
00:02:17,750 --> 00:02:21,780
And coming up next, we're going to create the enemy that we need to destroy.

34
00:02:21,890 --> 00:02:23,150
So that's an interesting part.

35
00:02:23,150 --> 00:02:24,380
And that's coming up next.
