O'Reilly logo

iOS Game Development By Example by Samanyu Chopra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding animations and controls in our Platformer game

After discussing about the SKAction class and various methods to add controls in our game, it's time to revisit our Platformer game and implement some of them.

Adding actions

Now, it's time to add actions in our game. Let's start with adding animation to the player and block collision. Until the last chapter, there was no collision effect between the player and the blocks.

Here we will add collision between the block and the player. Along with this, we can make the player die in an animated way. We can denote the animation after the player and block collision as a player death animation.

First of all, we will update the maximum size of the X-axis for the blocks, because currently, the blocks are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required