Skip to content

Instantly share code, notes, and snippets.

@ilkinulas
Created January 28, 2013 12:15
Show Gist options
  • Save ilkinulas/4655053 to your computer and use it in GitHub Desktop.
Save ilkinulas/4655053 to your computer and use it in GitHub Desktop.
private function onEnterFrame(event:EnterFrameEvent):void {
const moveBy:Number = event.passedTime * velocity;
const numBoxes:int = boxes.length;
var box:Quad;
for (var i:int = 0; i < numBoxes; i++) {
box = boxes[i];
if (box.y >= boxEndY) {
var topBox:Quad = boxes[(i + 1) % numBoxes];
box.y = topBox.y - boxSize;
}
box.y += moveBy;
}
}
@ilkinulas
Copy link
Author

Bu daha iyi oldu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment