Advertisement
Guest User

help

a guest
Apr 7th, 2020
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function pierwsza(){
  2.         var i = setInterval(function(){
  3.             var gBCRbacteria1 = bacteria1.getBoundingClientRect();
  4.             bacteria1.style.top = `${counter3}px`;
  5.             counter3++;
  6.             if(counter3 === 600) {
  7.                 bacteria1.style.backgroundColor = 'white';
  8.                 clearInterval(i);
  9.             }
  10.         }, 10);
  11.         }
  12. function druga(){
  13.             var counter2 = 590;
  14.             var i = setInterval(function(){
  15.                 var gBCRammo = ammo.getBoundingClientRect();
  16.  
  17.                 ammo.style.top = `${counter2-2}px`;
  18.                 counter2--;
  19.                 if(counter2 === offsettopgame) {
  20.                     ammo.style.backgroundColor = '';
  21.                     clearInterval(i);
  22.                 }
  23.             }, 1);
  24. }
  25.   if(colision(gBCRammo,gBCRbacteria1 )){
  26.                     console.log('yeeeeeeeeeeeeeeeeeeS')
  27.                 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement