Tao Chen avatar Tao Chen committed fc857e0

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

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...
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.