i ran into another problem also. In the code below i have initialized 3 platforms, and this code works, but i want to add a special feature to the case 2 platform. I want to make an if statement saying that if my sprite touches it, the sprite's velocity will be different, but i tried all the ways i can think of and have no idea how to continue.
- (void)initPlatform {
CGRect rect;
switch(random()%3) {
case 0: rect = CGRectMake(633,83,64,13); break;
case 1: rect = CGRectMake(633,139,65,14); break;
case 2: rect = CGRectMake(725,80,78,16); break;
}
|