• Unlikely Objects
  • Ludography
    • Nonoku
    • Acquisition
    • Image Mark Up
  • About
Menu

Unlikely Objects

  • Unlikely Objects
  • Ludography
  • Pint Sized Planet
    • Nonoku
    • Acquisition
    • Image Mark Up
  • About
2017-01-29 00_38_31.gif

Nonoku - Level Select Selections

February 7, 2017

Updated the Level Select screen to handle touch interactions. It’s now possible to tap on a puzzle image and be taken to that puzzle. I ended up using the userData: NSMutableDictionary property on the SKNode to both determine if the node the user tapped represents a puzzle, but also, which puzzle they tapped.

private func nodes(touches: Set<UITouch>) -> [SKNode]? {
    for touch in touches {
        let location = touch.location(in: currentScene)
        nodesTouched = currentScene.nodes(at: location)
        return nodesTouched.filter {
            guard let _ = $0.userData?[“puzzleName”] else { return false }
            return true
        }
    }
    return nil
}
In An Evening of Code Tags iOS, nonoku, Swift, Xcode, gamedev
← Nonoku - Old is NewNonoku - Level Select Update →

Latest

Unlikely Objects
Fractal Plant in Godot
about a year ago
Binary Tree in Godot
about a year ago
Sierpinski Triangle in Godot
about a year ago
Re-visiting some old code
about a year ago
React - Starting a New Project
about 3 years ago
Satsuma Tosser
about 4 years ago
1HGJ #002: Deeper and Deeper
about 7 years ago
1HGJ #001: Telekinetic Bomberman Rush
about 7 years ago
Migrating to NSPersistentContainer
about 7 years ago
Nonoku - SpriteKit Shader
about 7 years ago

Powered by Squarespace