I know this is a silly question, but I just want to be safe.
I have multiple subclasses of SKSpriteNode in my app. In touchesBegan I am looking for a specific type, MyPeg. I just want to make sure that the code below fails if the node is not a MyPeg. I have this fear that if another of my subclasses is the same size, or too similar, or even has the same variables that I might get a positive.
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?){
super.touchesBegan(touches , with:event)
guard let touch = touches.first else { return }
let location = touch.location(in: self)
let touchedNodes = self.nodes(at: location)
for theNode in touchedNodes{
if let node = theNode as? MyPeg{