I have tried to make it optional and retyped a few times.
Every time the cat hits the bed an error appears. Before of that it works well.
Thanks!
I have tried to make it optional and retyped a few times.
Every time the cat hits the bed an error appears. Before of that it works well.
Thanks!
It’s been a while since this post, so you might have figured it out already, but make sure you typed the string names correctly.
I can’t see the name of your scene files, but my guess is that the name of the scene is probably CatCurl instead of cat_Curl (the string after "fileNamed:)
let catCurl = SKSpriteNode(fileNamed: "CatCurl")!.childNode(withName: "cat_curl")!