I am following a game tutorial for an iOS app. But there was a version problem, as the tutorial was made with Xcode 8 and swift 3. Im using Xcode 11 and the latest swift version. Anyways, I managed to solve all of the problems that I came across, all accept this one:
//setup sprites for animation
_Sprites.append(_Atlas.textureNamed("text"))
_Sprites.append(_Atlas.textureNamed("text"))
_Sprites.append(_Atlas.textureNamed("text"))
_Sprites.append(_Atlas.textureNamed("text"))
...
after these lines of code, all of them have the same error: Cannot convert value of type 'SKTexture' to expected argument type 'Int'
I don't know why, because it obviously wants a string(for the name of the sprite), and also, when i try this:
_Sprites.append(_Atlas.textureNamed(Int("text")))
...
It gives me this error: Cannot convert value of type 'Int?' to expected argument type 'String'
Is there anyone who knows why I have this problem?
_Spritesis of type[Int]and not[SKTexture]. - George