- (BOOL)wallCollision{
if (two.center.x > 320 || two.center.x < 0 ) {
pos.x = -pos.x;
score ++;
NSLog(@"score is %i", score);
scorelabel.text = [NSString stringWithFormat:@"%i",score];
hit = TRUE;
}else {
hit = FALSE;
}
return hit;
}
- (BOOL)ceilingCollision{
if (two.center.y > 460 || two.center.y < 0 ) {
pos.y = -pos.y;
score ++;
NSLog(@"score is %i", score);
scorelabel.text = [NSString stringWithFormat:@"%i",score];
hit = TRUE;
}else {
hit = FALSE;
}
return hit;
}
now as you can see, the ceilling and wall collision are called quite a bit. so once the hit equals true you would think the expPlus method would work, right? but it doesnt. please help with this logical error, my ranking system does not work without your help, and i will greatly appreciate it!
- (BOOL)wallCollision{
if (two.center.x > 320 || two.center.x < 0 ) {
pos.x = -pos.x;
score ++;
NSLog(@"score is %i", score);
scorelabel.text = [NSString stringWithFormat:@"%i",score];
hit = TRUE;
}else {
hit = FALSE;
}
return hit;
}
- (BOOL)ceilingCollision{
if (two.center.y > 460 || two.center.y < 0 ) {
pos.y = -pos.y;
score ++;
NSLog(@"score is %i", score);
scorelabel.text = [NSString stringWithFormat:@"%i",score];
hit = TRUE;
}else {
hit = FALSE;
}
return hit;
}
now as you can see, the ceilling and wall collision are called quite a bit. so once the hit equals true you would think the expPlus method would work, right? but it doesnt. please help with this logical error, my ranking system does not work without your help, and i will greatly appreciate it!
I'll gladly give you a hand, but I need more code than this. You can PM me if you like but if not, at least post what "hit" and "exp" are so I can understand a little better where the problem might me.