Created
July 21, 2018 17:30
-
-
Save AxGord/b3ad09016f9aca6af66d3f586aa5bb6d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var w = Config.width; | |
var h = Config.height; | |
var space:NapeSpaceView = new NapeSpaceView(new Point<Float>(0, 600)); | |
space.debugLines = {size: 3, color: 0xFFFFFF}; | |
c.addChild(space); | |
space.createStaticRect(new Rect<Float>(50, h - 50, w - 100, 1)); | |
space.createStaticRect(new Rect<Float>(w - 50, 50, 1, h - 100)); | |
var ball = space.createCircle(50); | |
ball.core.pos = new Point<Float>(50, h / 2); | |
ball.core.angularVel = 20 * 4; | |
ball.core.setSpeed(700); | |
for (i in 0...16) { | |
var box = space.createBox(new Point<Float>(16, 32)); | |
box.core.pos = new Point<Float>(w / 2, (h - 100) - 32 * (i + 0.5)); | |
// ball.core.collision(box.core) << function() ball.destroy(); | |
} | |
space.play(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment