Conversation
* Convert `texture` property to optional * Add `init` func default value for image parameter * Set `texture` nil when image is nil
* - Reconfig physics of Magnetic when size is changed (efremidze#15) * Update Magnetic.swift
('characters' is deprecated: Please use String or Substring directly)
|
Found an issue while trying to select a node on an iPad. Looking into it now. |
|
K fixed |
|
Going to take a look at the codebeat thing tomorrow |
This will help the node stay under the user's finger when the physics strength is higher.
|
Don't worry about Codebeat, Ill review the PR later today |
| /** | ||
| Lets the user move all of the nodes at once. On by default. | ||
| **/ | ||
| open var allowAllNodeMovement: Bool = true |
There was a problem hiding this comment.
aren't allowSingleNodeMovement and allowAllNodeMovement mutually exclusive?
| movingNodeTimer?.invalidate() | ||
| movingNodeTimer = nil | ||
| } | ||
| movingNodeTimer = Timer.scheduledTimer(timeInterval: 0.01, target: self, selector: #selector(self.moveNode(timer:)), userInfo: ["touchLocation":touchLocation, "node": node], repeats: true) |
There was a problem hiding this comment.
use the Timer block function
https://developer.apple.com/documentation/foundation/timer/2091889-scheduledtimer
There was a problem hiding this comment.
I would love to but it seems to only be available in iOS 10 or later.
| var movingNode: SKNode? = nil | ||
| var initialTouchLocation: CGPoint? = nil | ||
| var initialTouchStartedOnNode: Bool = false | ||
| var movingNodeTimer: Timer? = nil |
There was a problem hiding this comment.
Whats a state machine? Got any good examples?
|
@efremidze I am still making some tweaks fyi. I will give you a heads up when its more finalized. |
get rid of isDragging in lieu of the distance of the initial touch location extract moveAllNodes, node at point and moveNode rename keepNodeStill move all the things
|
@efremidze I am feeling better about the pr now. Feel free to check out the new changes at your convenience. |
|
Ill review it this week. I might want to make some changes. |
|
I'll try to include this asap |
|
Woot. Thank you. Now that xcode 9.3 is out let me know if you want me to resolve the conflicts first. |
|
Hello guys, |

Checklist
Motivation and Context
I wanted to allow the user to move an individual node.
Description
Allows for single node movements. Also exposed a field for making it easier to select a node:
nodeSelectionForgivenessDistance.