Skip to content

Instantly share code, notes, and snippets.

@kahilkubilay
Created December 26, 2019 23:03
Show Gist options
  • Save kahilkubilay/6a7def02ed9ef4426f0b991449bfd31a to your computer and use it in GitHub Desktop.
Save kahilkubilay/6a7def02ed9ef4426f0b991449bfd31a to your computer and use it in GitHub Desktop.
Javascript İle Oyun Yapımı: Nesnelerin Kontrolü - Top
// top üst ve alt bloklara çarparsa, X ekseninde geri seksin
if(parseInt(ball.style.top) <= 0 || parseInt(ball.style.top) + 16 >= window.height){
ballTop *= -1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment