Created
December 26, 2019 23:01
-
-
Save kahilkubilay/54e06ba9dd1af3b8a1a72954cfb91b71 to your computer and use it in GitHub Desktop.
Javascript İle Oyun Yapımı: Nesnelerin Kontrolü - Top
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
// oyunun sürekli devam etmesi için gerekli yapı | |
function gameLoop(){ | |
// topun alacağı değerler | |
ball.style.top = pxAdd(parseInt(ball.style.top) + 2); | |
ball.style.left = pxAdd(parseInt(ball.style.left) + 2); | |
} | |
setInterval(gameLoop, 20); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment