Now our new project begins! Mobile Game app.
Create a new project. Make sure to check ‘SpriteKit’ in Game Technology.
If you click play button, you will see this. This is basic game. The rotating jet plane keep appears. We are going to make a game our own, so delete ‘gamescene.sks’.
Then go to Assets.xcassets and there’s a Spaceship icon. Delete it also.
And I downloaded game assets in our IMD homepage.
The link is here.
After you finish downloading, bring the hero icon to the assets.xcassets folder.
And let’s call him ‘jeff’.
And go to the GameScene.swift. There’s some code we don’t need.
I deleted unnecessary codes.
And go to the GameViewController.swift.
This is our code.
This code will make your gamescreen bigger.
Go to the Deployment Info. And make sure to uncheck ‘Portrait’.
And I created a new file named ‘Hero.swift’.
And this is our entire code in GameViewController.swift.
If you click play button, you can see hero in it!!
We are going to write some code to make jeff movable.
We can make it Ease In or Out.
This is entire code.
Now our jeff can move upside down!