Commits

Tao Chen  committed fc857e0

turn the ball smaller so it is easy to score and easier to do a direct shot

  • Participants
  • Parent commits 047b849

Comments (0)

Files changed (3)

 		public function Ball(player:Player)
 		{
 			sprite = new Spritemap(ImgBall, 8, 8);
-			super(x, y, sprite);
-			setHitbox(8, 8, 0, 0);
+			sprite.originX = 1;
+			sprite.originY = 1;
+			
+			super(-10, -10, sprite);
+			setHitbox(6, 6, 0, 0);
+			
+			
 			sprite.add("fadeout", [4, 5, 6], 10, false);
 			sprite.add("fadein", [6, 5, 4, 0], 10, false);
 			_player = player;
 		public function roll():void
 		{
 			sprite.frame = (sprite.frame + 1) % 4;
+			
+			FP.console.log('------');
+			FP.console.log(sprite.x - sprite.originX);
+			FP.console.log(x);
 		}
 		
 		override public function render():void
 			if (ball != null) {
 				// player holding the ball
 				ball.x = x + 3;
-				ball.y = y - 8;
+				ball.y = y - 6;
 			}
 			
 			// update with velocity
 
 
 bugs
-1. sometimes the prediction line would disappear, this is pretty bad
+1!. sometimes the prediction line would disappear, this is pretty bad
+2. the ball is actually not rolled...