Hi, welcome back.
In this lecture, we will learn how to make our game a choose from the two types of pipes as a following.
So we will add.
And if a statement.
As the following, if random, not a choice between two parentheses Vibe's underscored last double Ekwall
vibes.
Or by surface, double equal by game dot image, dot loot between two parentheses fifes underscored
last column, so by service, Pickwell by game, the damage that lude pipes underscore last.
Of index one else by service, equal by game dot image dot lude between two entities, Vibe's underscore
list zero.
And it's OK.
Now, I will build the project to run the game, so when we run the game, the game will choose from
the two types of pipes.
As you see, every restaurant will choose a different type of pipe.
As you see, OK, now we want to take and flip that.
We will take the bird wants to avoid losing of the bird image quality, so we will always use the original
bird image to take our bird only once.
So we will create a function to take the bird one time, as we said.
So give bird underscore rotation between two.
Berentson will take bird service or bird serve as a barometer for this function then column.
Then inside the function we will add lovely bird equal by a game to transform that role to zoom between
two parentheses bird surface comma bird movement multiply by three.
We will add the speed of the animation to be travel time, the speed of the bird and one for the zoom.
We don't need to zoom more than one one time, then return lovely bird.
We will change the parameter of the bird to rotation function from their service to bird.
So we will write the function again to be D.F. bird rotation between two parentheses bird column bird
loving equal by game.
Don't transfer that role to zone between two parentheses bird and the angle of the bird comma the scale
of the zoom.
So our bird or our will be the bird Cerf's.
And the angle will be on point nine for experimentation and the scale will be one, we don't need to
zoom more than one time.
OK, so we will return the birds flying by the normal size.
Let's do that.
Then we will call this function where the rotation inside the game loop through assigning a new variable
called bird flapping, which will equal bird underscore rotation between two prentice's bird, underscore
surface and convert the bird surface inside the game.
Underscore this blatant belet method and to underscore birds.
OK.
And run our game by building our project.
So it ran, but without the rotation or the animation to be seen or observed.
And we will solve this problem by using.
Observed the movements variable to be multiplied by three times.
Or by two and a half times.
To be assigned as the angle so Bird underscores loving equal by game that transformed Daytrotter zone
between two Prentice's bird and the bird movement, multiply by four, comma one and the build our project
again to run our game.
And we observe that the animation of our bird and flapping is very fast.
So we want to solve this problem which can be solved with decreasing the speed to be multiplied by.
Let's try to multiply it by five and build our project again to see what the speed of the animation
we will get.
The speed is very fast, but but we will let that be as it is for now, and we will solve another issue,
which is the black rectangle around the belt, which we can solve by using DOT convert alpha instead
of DOT convert to be added to the bird service.
And build our Brusic again, and we observe that the black rectangle around the world has disappeared.
OK.
Until now, we are fine.
Now we will change the angle of the zoom method from bird movement, multiply it by five to bed, underscore
movement, multiply by two and a half and build our project again.
And we will get the unique and special effects animation for our birds at this point.
We reached the end of this lecture.
Hope you enjoyed this lecture and get all of that.
Thanks for watching and thanks for being here.
See you.
Next video.