In this class, we’ve learned how to get to higher level and how to add clouds.
We created a variable for the level.
And we’ve set the levelLabel’s position.
We’ve set the levelLabel text.
If the current score divided by 5, then the levelLabel will update.
You can see that if you get score 5, your level goes up each time.
Now we are going to add clouds.
I downloaded the assets from our class website.
Put the cloud image in assets.xcassets.
And we will add a new swift file.
This is our code for cloudStatus.
And go to the gameScene.swift.
And we’ve set the cloud’s positions.
We gave the names to the clouds.
We’ve set the original and maximum position. And add the clouds.
We created a random number for the clouds.
Now there’s a clouds in my game~