Created
January 28, 2013 12:15
-
-
Save ilkinulas/4655053 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bu daha iyi oldu.