ios - Why Does This Not Produce an Animation? -


I'm using SpriteKit to animate the character jump.

I know what is the correct code, but I do not know why my last code was wrong.

Correct:

  Let's move actionMove = SKAction.moveTo (CP point (x: size width * 0.1, y: size. * 0.85), duration: 0.3) Let's go to ActionFalls = SKAction.Movete (CP point (X: Size with * 0.1, Y: Size. * 0.3), Duration: 0.3) ActionMiveMingMode = Action Flat in SKAMingMode. TeamingMode = SKActionMingMode.Soat if CACRRTMTEE (Time) - Time & GT; 0.7 {player.runAction (SKAction.sequence ([actionMove, actionFall]) time = CACurrentMediaTime ()}  

incorrect:

  func jump () { Let's say = sction.movato (cp point (x: size. With * 0.1, y: size. Hight * 0.85), duration: 0.3) take action, take action = SKAction.moveTo (CP point (X: Wide * 0.1, y: Size.height * 0.3), Duration: 0.3) Action above. TM.Mode = SKActionTimingMode.EaseIn actionFall.timingMode = SKActionTimingMode.EaseOut player.runAction (SKAction.sequence ([actionMove, actionFall]) if ( Player.position.y == size.hit * 0.3) {jump ();}  

In the wrong code, when the screen screen And the user does not jumps if the character is null - character remains at 0.3 height.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -