Apple Game Frameworks and Technologies: func Touchdown (p166) - else is missing


I think the code proposed is missing an else; in case the user moves outside the pad (where the node does not start with “controller_”), the player will continue to move continuously

func touchDown(atPoint pos : CGPoint) {

let nodeAtPoint = atPoint(pos)
if let touchedNode = nodeAtPoint as? SKSpriteNode {
if “controller_”) == true {
let direction = “controller_”, with: “”) player?.move(Direction(rawValue: direction ?? “stop”)!)
else {
*** }***