Untitled

mail@pastecode.io avatar
unknown
javascript
4 years ago
654 B
5
Indexable
Never
	private function checkLand():Void {
		for (var clip in this.link._parent.track_holder) {
			if (clip != this.last_track) {
				for (var i:Number = 1; i<=25; i++) {
					if (this.link._parent.track_holder[clip].hit.hitTest(this.link._parent._x+this.link._x+this.link["hit_"+i]._x, this.link._parent._y+this.link._y+this.link["hit_"+i]._y+this.y_offset, true)) {
						if (this.link._parent.track_holder[clip].getBroken() == true) {
							trace(clip+" is broken so cant snap to it");
						} else if (this.link._parent.track_holder[clip].getBroken() == false) {
							this.snapToTrack(clip);
							break;
						}
					}
				}
			}
		}
	}