Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int score;
- int i=0;
- laser[] l= new laser[70];
- boolean lost=false;
- void setup() {
- size(displayWidth, displayHeight);
- for (int i=0; i<l.length; i++) {
- l[i]= new laser();
- }
- textSize(24);
- }
- void draw() {
- if (lost!=true) {
- background(0);
- shapeMode(CENTER);
- beginShape();
- vertex(15,0);
- vertex(0,25);
- vertex(0,50);
- vertex(30,50);
- vertex(30,25);
- endShape(CLOSE);
- for (i=0; i<l.length; i++) {
- l[i].show();
- l[i].fall();
- l[i].touch();
- }
- fill(255);
- text(score, 24, 24 );
- }
- }
- void mousePressed() {
- lost=false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement