1
00:00:00,390 --> 00:00:01,520
Hi, welcome back.

2
00:00:01,800 --> 00:00:12,440
In this lecture, we will learn how to make our game a choose from the two types of pipes as a following.

3
00:00:12,990 --> 00:00:14,970
So we will add.

4
00:00:16,130 --> 00:00:17,840
And if a statement.

5
00:00:19,340 --> 00:00:28,190
As the following, if random, not a choice between two parentheses Vibe's underscored last double Ekwall

6
00:00:28,190 --> 00:00:28,880
vibes.

7
00:00:30,710 --> 00:00:41,870
Or by surface, double equal by game dot image, dot loot between two parentheses fifes underscored

8
00:00:41,870 --> 00:00:51,280
last column, so by service, Pickwell by game, the damage that lude pipes underscore last.

9
00:00:52,360 --> 00:01:03,880
Of index one else by service, equal by game dot image dot lude between two entities, Vibe's underscore

10
00:01:03,880 --> 00:01:05,440
list zero.

11
00:01:06,490 --> 00:01:08,130
And it's OK.

12
00:01:09,390 --> 00:01:18,570
Now, I will build the project to run the game, so when we run the game, the game will choose from

13
00:01:18,840 --> 00:01:20,820
the two types of pipes.

14
00:01:21,240 --> 00:01:28,740
As you see, every restaurant will choose a different type of pipe.

15
00:01:30,870 --> 00:01:37,250
As you see, OK, now we want to take and flip that.

16
00:01:38,640 --> 00:01:48,660
We will take the bird wants to avoid losing of the bird image quality, so we will always use the original

17
00:01:48,660 --> 00:01:53,060
bird image to take our bird only once.

18
00:01:53,130 --> 00:01:59,300
So we will create a function to take the bird one time, as we said.

19
00:01:59,940 --> 00:02:05,070
So give bird underscore rotation between two.

20
00:02:05,070 --> 00:02:15,870
Berentson will take bird service or bird serve as a barometer for this function then column.

21
00:02:16,200 --> 00:02:25,620
Then inside the function we will add lovely bird equal by a game to transform that role to zoom between

22
00:02:25,620 --> 00:02:31,620
two parentheses bird surface comma bird movement multiply by three.

23
00:02:31,860 --> 00:02:43,120
We will add the speed of the animation to be travel time, the speed of the bird and one for the zoom.

24
00:02:43,170 --> 00:02:52,520
We don't need to zoom more than one one time, then return lovely bird.

25
00:02:52,560 --> 00:02:58,710
We will change the parameter of the bird to rotation function from their service to bird.

26
00:02:58,890 --> 00:03:09,240
So we will write the function again to be D.F. bird rotation between two parentheses bird column bird

27
00:03:09,360 --> 00:03:12,360
loving equal by game.

28
00:03:12,360 --> 00:03:22,620
Don't transfer that role to zone between two parentheses bird and the angle of the bird comma the scale

29
00:03:22,620 --> 00:03:24,600
of the zoom.

30
00:03:24,870 --> 00:03:30,360
So our bird or our will be the bird Cerf's.

31
00:03:31,250 --> 00:03:42,590
And the angle will be on point nine for experimentation and the scale will be one, we don't need to

32
00:03:43,040 --> 00:03:46,050
zoom more than one time.

33
00:03:46,820 --> 00:03:54,440
OK, so we will return the birds flying by the normal size.

34
00:03:54,770 --> 00:03:55,700
Let's do that.

35
00:03:56,270 --> 00:04:04,460
Then we will call this function where the rotation inside the game loop through assigning a new variable

36
00:04:04,700 --> 00:04:15,050
called bird flapping, which will equal bird underscore rotation between two prentice's bird, underscore

37
00:04:15,050 --> 00:04:20,450
surface and convert the bird surface inside the game.

38
00:04:20,450 --> 00:04:26,200
Underscore this blatant belet method and to underscore birds.

39
00:04:26,660 --> 00:04:27,290
OK.

40
00:04:28,580 --> 00:04:32,450
And run our game by building our project.

41
00:04:35,300 --> 00:04:43,860
So it ran, but without the rotation or the animation to be seen or observed.

42
00:04:44,270 --> 00:04:48,200
And we will solve this problem by using.

43
00:04:49,460 --> 00:04:55,520
Observed the movements variable to be multiplied by three times.

44
00:04:56,710 --> 00:05:01,300
Or by two and a half times.

45
00:05:02,840 --> 00:05:11,630
To be assigned as the angle so Bird underscores loving equal by game that transformed Daytrotter zone

46
00:05:11,840 --> 00:05:20,480
between two Prentice's bird and the bird movement, multiply by four, comma one and the build our project

47
00:05:20,480 --> 00:05:21,890
again to run our game.

48
00:05:22,070 --> 00:05:27,860
And we observe that the animation of our bird and flapping is very fast.

49
00:05:28,310 --> 00:05:40,280
So we want to solve this problem which can be solved with decreasing the speed to be multiplied by.

50
00:05:40,440 --> 00:05:47,690
Let's try to multiply it by five and build our project again to see what the speed of the animation

51
00:05:47,690 --> 00:05:48,770
we will get.

52
00:05:49,710 --> 00:05:57,930
The speed is very fast, but but we will let that be as it is for now, and we will solve another issue,

53
00:05:57,930 --> 00:06:09,060
which is the black rectangle around the belt, which we can solve by using DOT convert alpha instead

54
00:06:09,060 --> 00:06:12,960
of DOT convert to be added to the bird service.

55
00:06:13,860 --> 00:06:21,630
And build our Brusic again, and we observe that the black rectangle around the world has disappeared.

56
00:06:22,320 --> 00:06:22,920
OK.

57
00:06:24,650 --> 00:06:26,170
Until now, we are fine.

58
00:06:33,400 --> 00:06:43,570
Now we will change the angle of the zoom method from bird movement, multiply it by five to bed, underscore

59
00:06:43,570 --> 00:06:49,150
movement, multiply by two and a half and build our project again.

60
00:06:50,170 --> 00:06:57,830
And we will get the unique and special effects animation for our birds at this point.

61
00:06:57,850 --> 00:06:59,890
We reached the end of this lecture.

62
00:07:00,130 --> 00:07:02,780
Hope you enjoyed this lecture and get all of that.

63
00:07:03,100 --> 00:07:05,920
Thanks for watching and thanks for being here.

64
00:07:06,130 --> 00:07:06,790
See you.

65
00:07:06,940 --> 00:07:08,050
Next video.
