No.9838
|
|
ぼくはだれ?
by
つゆ
from
ウィスラー 2014/06/22 20:50:43
PFont font;
int ballX;
int ballY;
int directionX;
int directionY;
int paddleX;
int paddleY;
int pts;
int speed;
void setup(){
size(400,400);
nostroke();
ballX=300;
ballY=0;
directionX=1;
directionY=1;
rectMode(CENTER);
font=createFont("Arial",16);
textFont(font,16);
pts=0;
speed=10;
}
void draw(){
background(0);
if(ballX<5){
ballX=5;
directionX*=-1;
}
if(ballX>395){
ballX=395;
directionX*=-1;
}
if
|