- -(void)resetPlayerWithX:(float)x andY:(float)y
- {
- invulnerable = YES;
- //set the position, reset velocity and angular rotation
- playerBody->p = ccp(x,y);
- playerBody->v = cpvzero;
- playerBody->w = 0.0f;
- [self schedule:@selector(disableInvulnerability) interval:1.5f];
- }
- -(void)disableInvulnerability
- {
- invulnerable = NO;
- [self unschedule:@selector(disableInvulnerability)];
- }
