IMD1 _ levelLabel, add clouds

In this class, we’ve learned how to get to higher level and how to add clouds.

We created a variable for the level.

스크린샷 2016-06-07 오전 10.51.52.png

And we’ve set the levelLabel’s position.

스크린샷 2016-06-07 오전 10.56.24.png

We’ve set the levelLabel text.

스크린샷 2016-06-07 오전 10.58.13.png

If the current score divided by 5, then the levelLabel will update.

스크린샷 2016-06-07 오전 11.27.55.png

You can see that if you get score 5, your level goes up each time.

스크린샷 2016-06-07 오전 11.00.21.png

스크린샷 2016-06-07 오전 11.09.37.png

스크린샷 2016-06-07 오전 11.36.50.png

Now we are going to add clouds.

I downloaded the assets from our class website.

스크린샷 2016-06-07 오전 11.42.58.png

스크린샷 2016-06-07 오전 11.42.53.png

Put the cloud image in assets.xcassets.

스크린샷 2016-06-07 오전 11.47.37.png

스크린샷 2016-06-07 오전 11.47.45.png

And we will add a new swift file.

스크린샷 2016-06-07 오전 11.48.11.png

스크린샷 2016-06-07 오전 11.48.33.png

스크린샷 2016-06-07 오전 11.49.13.png

스크린샷 2016-06-07 오전 11.50.54.png

This is our code for cloudStatus.

스크린샷 2016-06-07 오후 12.01.47.png

And go to the gameScene.swift.

스크린샷 2016-06-07 오후 12.07.18.png

스크린샷 2016-06-07 오후 12.10.28.png

And we’ve set the cloud’s positions.

스크린샷 2016-06-07 오후 12.20.54.png

We gave the names to the clouds.

스크린샷 2016-06-07 오후 12.25.43.png

We’ve set the original and maximum position. And add the clouds.

스크린샷 2016-06-07 오후 12.28.33.png

We created a random number for the clouds.

스크린샷 2016-06-07 오후 12.40.35.png

스크린샷 2016-06-07 오후 12.50.44.png

Now there’s a clouds in my game~

스크린샷 2016-06-07 오후 12.52.18.png

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s