title: SpriteKit - Rotate and Jump Both Ending at same Time
body: <p><strong>New to Sprite Kit and Game Development</strong> i am learning by the <a href="http://www.raywenderlich.com/62049/sprite-kit-tutorial-make-platform-game-like-super-mario-brothers-part-1" rel="nofollow">Following tutorial</a> @ <strong>Raywenderlich</strong>.</p>
  
  <p><strong><code>WHAT I AM DOING ?</code></strong></p>
  
  <p>I have implemented the Continuous Motion on the map and Gravity on the Player and i know that the rotation action can be added to the SKSpriteNode like this.</p>
  
  <pre><code>        SKAction *action = [SKAction rotateByAngle:M_PI duration:1];
  
          [myPlayer runAction:[SKAction repeatActionForever:action]];
  </code></pre>
  
  <p>And my Player with gravity is as follows</p>
  
  <p><strong>MSPlayer.h</strong></p>
  
  <pre><code>#import &lt;SpriteKit/SpriteKit.h&gt;
  
  @interface MSPlayer : SKSpriteNode
  @property (nonatomic, assign) CGPoint velocity;
  - (void)update:(NSTimeInterval)delta;
  @end
  </code></pre>
  
  <p><strong>MSPlayer.m</strong></p>
  
  <pre><code>#import "MSPlayer.h"
  #import "SKTUtils.h"
  
  @implementation MSPlayer
  //2
  - (instancetype)initWithImageNamed:(NSString *)name {
      if (self == [super initWithImageNamed:name]) {
          self.velocity = CGPointMake(0.0, 0.0);
      }
      return self;
  }
  
  - (void)update:(NSTimeInterval)delta {
      //3
      CGPoint gravity = CGPointMake(0.0, -10.0);
      //4
      CGPoint gravityStep = CGPointMultiplyScalar(gravity, delta);
      //5
      self.velocity = CGPointAdd(self.velocity, gravityStep);
      CGPoint velocityStep = CGPointMultiplyScalar(self.velocity, delta);
      //6
      self.position = CGPointAdd(self.position, velocityStep);
  }
  -(CGRect)collisionBoundingBox {
      return CGRectInset(self.frame, 2, 0);
  }
  
  @end
  </code></pre>
  
  <p><strong><code>My Issue is</code></strong></p>
  
  <p>Now the issue is that i want the Node to be rotated and give make it jump with gravity and the rotation ends just before the Node is about to end its jump. What should be done to make both animations end at the same time?</p>