Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var loc;
- function checkIfeatingFood() {
- loc = locations[locations.length - 1];
- // for (var j = 0; j < candyLocations.length; j++) {
- for (var j = 0; j < answersContainer.children.length; j++) {
- var candyLocation = answersContainer.children[j];
- candyLocation.alpha = .2;
- var pt = loc.localToLocal(100, 0, candyLocation);
- console.log(candyLocation.x, candyLocation.y); // the position local to objB
- if (candyLocation.hitTest(pt.x, pt.y)) { candyLocation.alpha = 1; }
- }
- //return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement