kodeco.com Forums

Video Tutorial: Beginning SpriteKit Part 2: Game Loop

Learn about the SpriteKit game loop.

This is a companion discussion topic for the original entry at https://www.raywenderlich.com/3876-beginning-spritekit/lessons/3

Hi! :slight_smile:

There’re one small mistake to correct for some future editions:

  1. Open GameScene.swift …
    func rotateSprite(sprite: SKSpriteNode, direction: CGPoint {
    sprite.zRotation = direction.angle

  2. Call …
    rotateSprite(zombie, direction: velocity)

=> There’re missing underscore for the first parameter in the function definition.
Function have to look like this:

func rotateSprite(_ sprite: SKSpriteNode, direction: CGPoint {
sprite.zRotation = direction.angle

Hey thanks for the heads-up. We’re looking into this and will get it corrected as soon as possible.

Hi. The course materials have been updated. =]

When running on actual device, the Game Loop does not show the sprite after a restart.

Any thoughts?

@cparker101 Do you still have issues with this?