Post

Replies

Boosts

Views

Activity

Reply to Having strange trouble with touchesMoved, need help.
I cannot access the URL, (after removing the spaces) All of a sudden FileZilla won't properly transfer images at all (yes, set to binary). Looking for a new FTP. Have added super. to all my touches (as seen below) and it still happens     override func touchesMoved(_ touches: SetUITouch, with event: UIEvent?){         super.touchesMoved(touches , with:event)         guard touches.first != nil else { return }         if toggleHigh {highliteGem(theGem: myGems[0], clearAll: true)}         if let touch = touches.first, let node = myGV.currentGem, node.isMoving == true {             let touchLocation = touch.location(in: self)             node.moved    = true             print(touchLocation)             node.position = touchLocation             node.isMoving = true             node.inSlot = false             //addTrailToTwinkle(theNode: node)         }     }
Topic: Programming Languages SubTopic: Swift Tags:
May ’21
Reply to How can I have an SKSpriteNode follow the same path back and forth?
Actually someone gave me an easier answer on StackOverflow. This is a quote from the link below There is a method called reversed() which you could use. Below I have given your action a name of "youraction" let youraction = SKAction.follow(iconPath0, asOffset: false, orientToPath: false, duration: 1) let reverseaction = SKAction.reversed(youraction) yourspritenode.run(reverseaction) Alternatively, you can just use reversed after the action name to run it in reverse: yourspritenode.run(youraction.reversed()) https://stackoverflow.com/questions/66354936/how-can-i-have-an-skspritenode-follow-the-same-path-back-and-forth/66357189#66357189
Mar ’21