Advertisement
Nojus_Globys

mar29

Mar 29th, 2023
524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | Software | 0 0
  1.  
  2. float
  3.   // ball
  4.     ballX = 0,
  5.     ballY = 0,
  6.     ballSize,
  7.     ballStep,
  8.   // paddle
  9.     paddleX,
  10.     paddleY,
  11.     paddleW,
  12.     paddleH,
  13.     paddleStep;
  14.  
  15. void setup () {
  16.   size (1280, 740);
  17.   rectMode (CENTER);
  18.  
  19.   ballSize = height * 0.1;
  20.   ballStep = width * 0.01;
  21.  
  22.   paddleX = width * 0.5;
  23.   paddleY = height * 0.95;
  24.   paddleW = width * 0.125;
  25.   paddleH = height * 0.03;
  26.   paddleStep = width * 0.01;
  27.  
  28.   circle (width/2, height/2, ballSize);
  29.   rect (paddleX, paddleY, paddleW, paddleH);
  30. }
  31.  
  32. void ball () {
  33.   ;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement