User prompt
if more than 5 balls are spawned, add a 50% chance of ball2 spawning instead of ball one
User prompt
keep track off how many balls are spawned in, also add a debug message
User prompt
the balls should always spawn at y=300 and only follow the mouse x position
User prompt
the balls should always spawn at y=2000 and only follow the mouse x position
User prompt
make the balls have roll resistance
User prompt
make the force that pushes the balls on screen harder the longer it takes to get the ball on screen
User prompt
make the balls solid so that the cant go through each other
User prompt
if part off a ball is ofscreen, slowely roll it so its on screen
User prompt
make a ball 4 up to ball 9
User prompt
Fix Bug: 'TypeError: window.parseInt is not a function' in or related to this line: 'var nextTypeInt = window.parseInt(self.type, 10);' Line Number: 32
User prompt
Fix Bug: 'TypeError: parseInt is not a function' in or related to this line: 'var nextTypeInt = parseInt(self.type, 10);' Line Number: 32
User prompt
make a ball 4 up to ball 9
User prompt
ball_small should be ball1 etc with all the other balls
User prompt
Fix Bug: 'ReferenceError: ballGraphics is not defined' in or related to this line: 'if (balls[i].y + balls[i].velocity.y > 2732 - ballGraphics.height / 2) {' Line Number: 90
User prompt
the balls should not be able to fall through the bottom
User prompt
make the balls have grafity
Initial prompt
merge balls
===================================================================
--- original.js
+++ change.js
@@ -88,9 +88,13 @@
var ballCount = 0;
game.on('down', function (obj) {
var event = obj.event;
var pos = event.getLocalPosition(game);
- var newBall = new Ball('1');
+ var ballType = '1';
+ if (ballCount > 5 && Math.random() < 0.5) {
+ ballType = '2';
+ }
+ var newBall = new Ball(ballType);
newBall.x = pos.x;
newBall.y = 300;
balls.push(newBall);
game.addChild(newBall);