Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pierwsza(){
- var i = setInterval(function(){
- var gBCRbacteria1 = bacteria1.getBoundingClientRect();
- bacteria1.style.top = `${counter3}px`;
- counter3++;
- if(counter3 === 600) {
- bacteria1.style.backgroundColor = 'white';
- clearInterval(i);
- }
- }, 10);
- }
- function druga(){
- var counter2 = 590;
- var i = setInterval(function(){
- var gBCRammo = ammo.getBoundingClientRect();
- ammo.style.top = `${counter2-2}px`;
- counter2--;
- if(counter2 === offsettopgame) {
- ammo.style.backgroundColor = '';
- clearInterval(i);
- }
- }, 1);
- }
- if(colision(gBCRammo,gBCRbacteria1 )){
- console.log('yeeeeeeeeeeeeeeeeeeS')
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement