Skip to content

Commit

Permalink
Change mass of paddle to a manifest constant.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaycoskey committed Aug 21, 2011
1 parent fc10ad1 commit 1127258
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Classes/Paddle.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ @implementation Paddle
@synthesize chipmunkObjects;
@synthesize body;

#define MASS 9999999.0f
- (void)updatePosition
{
// Sync ball positon with chipmunk body
//imageView.transform = CGAffineTransformMakeTranslation(body.pos.x - RADIUS, body.pos.y - RADIUS);
imageView.transform = CGAffineTransformMakeTranslation(body.pos.x - offset.x, body.pos.y - offset.y);
}

Expand All @@ -25,9 +25,8 @@ - (id)initWithPosition:(cpVect)position Dimensions:(cpVect)dimensions;

// Set up Chipmunk objects.

body = [[ChipmunkBody alloc] initStaticBody];
//cpFloat mass = 999999.0f;
body.mass = 9999999.0;;
body = [[ChipmunkBody alloc] initStaticBody];
body.mass = MASS;

ChipmunkPolyShape * shape = [ChipmunkPolyShape boxWithBody:body width:dimensions.x height:dimensions.y];

Expand Down

0 comments on commit 1127258

Please sign in to comment.