daily pastebin goal
24%
SHARE
TWEET

hj

a guest Feb 22nd, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var pionek = function() {
  2. fill(255, 0, 0);
  3. rect(x,y,10,10);
  4.    if (keyIsPressed &&  keyCode === LEFT) {
  5.        x = x - 1;
  6.    }
  7.    if (keyIsPressed && keyCode === RIGHT) {
  8.        x = x + 1;
  9.    }
  10.    if(keyIsPressed && keyCode === UP&&y>162) {
  11.        y = y - 1;
  12.    }
  13.    if(keyIsPressed && keyCode === DOWN) {
  14.        y = y + 1;
  15.    }
  16.    
  17.    if (x+10 === 10 && y+10 === 50) {
  18.        x = 0 ;
  19.    }
  20. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top