Last active
July 25, 2020 13:52
-
-
Save Core-commits/11da7feb4ec9d43cba448dbfda2c27a6 to your computer and use it in GitHub Desktop.
BrickRotation
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
function rotateBrick(name, increment, rot) | |
world.bricks.forEach(async(brick) => { // Finds all brick possible in the map. | |
if (brick.name == "car") { | |
brickRot= brick.rotation | |
setInterval(function () { | |
for (brickRot <= rot; brickRot + increment;) { | |
console.log(brick.rotation) | |
} | |
}, interval); | |
} | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment