Difference between revisions of "Thing2"

From CodeStuff
Jump to: navigation, search
(setcolor)
Line 11: Line 11:
 
var aliens=[];
 
var aliens=[];
  
−
var ship=loadImage("Purzen_rocket.png‎");
+
var ship=loadImage("Purzen_rocket.png");
 
ship.handleY=22;
 
ship.handleY=22;
 
ship.handleX=14;
 
ship.handleX=14;
Line 83: Line 83:
 
   if (keyIsDown(39)) cx+=speed;
 
   if (keyIsDown(39)) cx+=speed;
 
    
 
    
−
   if (keyWentDown(32)) {
+
   if (keyIsDown(32)) {
 
       bullets.push(makeBullet(cx,cy));
 
       bullets.push(makeBullet(cx,cy));
 
   }
 
   }
Line 108: Line 108:
 
   drawImage(ship,cx,cy);
 
   drawImage(ship,cx,cy);
 
   fillCircle(cx,cy,6);
 
   fillCircle(cx,cy,6);
 +
 +
  setColour("white");
 +
  print(bullets.length,20,20);
 
}
 
}
  

Revision as of 00:47, 14 June 2012