Skip to content

Instantly share code, notes, and snippets.

@kahilkubilay
Created December 26, 2019 23:03
Show Gist options
  • Save kahilkubilay/86fcab92ed69b44245a10a56d31a62cf to your computer and use it in GitHub Desktop.
Save kahilkubilay/86fcab92ed69b44245a10a56d31a62cf to your computer and use it in GitHub Desktop.
Javascript İle Oyun Yapımı: Nesnelerin Kontrolü - Top
function gameLoop(){
//topun alacağı değerler
ball.style.top = pxAdd(parseInt(ball.style.top) + ballTop);
ball.style.left = pxAdd(parseInt(ball.style.left) + ballLeft);
}
setInterval(gameLoop, gameSpeed);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment