Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var wasSnapped : boolean;
- function Update() {
- snap = false;
- for (snapPos in snapPositions) {
- (if touch is near snapPos) {
- snap = true;
- }
- }
- if (snap) {
- if (!wasSnapped) {
- // this is the first frame of a snap!
- send snap position
- }
- } else {
- send touch position
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment