From d19677f9f73d8fe7436982bdf8d40f69d69d1b43 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Fri, 12 Aug 2011 09:51:50 -0400 Subject: Added tutorial mode GameLayer was also renamed to ClassicGameMode and its pause functionality and score/lives counters were moved out to GameMode. FallingObjectDelegate was created to allow for custom code to be run when items were caught/missed, something that is used extensively by tutorial mode. Important: Cart Collect's bundle identifier was changed in this revision from com.fourisland.Cart-Collect to com.apatheticink.Cart-Collect, so ensure that before attempting to compile/run this build, you clear your build directory and remove the old version of Cart Collect from your device. Closes #193 --- Classes/TutorialBubble.m | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Classes/TutorialBubble.m') diff --git a/Classes/TutorialBubble.m b/Classes/TutorialBubble.m index b85aa31..74f667f 100644 --- a/Classes/TutorialBubble.m +++ b/Classes/TutorialBubble.m @@ -134,6 +134,17 @@ boxLoc = CGPointMake(CGRectGetMaxX(spriteBounds), CGRectGetMaxY(spriteBounds) - self.frame.size.height); arrowLoc = CGPointMake(0, button.frame.size.height - spriteBounds.size.height/2 + 4); } + } else { + arrowRotation = 180; + + if (CGRectGetMidX(spriteBounds) < button.frame.size.width) + { + boxLoc = CGPointMake(0, CGRectGetMaxY(spriteBounds)-4); + arrowLoc = CGPointMake(spriteBounds.origin.x+4, 0); + } else { + boxLoc = CGPointMake(CGRectGetMaxX(spriteBounds) - self.frame.size.width, CGRectGetMaxY(spriteBounds)-4); + arrowLoc = CGPointMake(button.frame.size.width - spriteBounds.size.width/2 + 4, 0); + } } CGImageRef framestuff = [[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"framestuff" ofType:@"png"]] CGImage]; @@ -153,8 +164,6 @@ - (void)buttonPressed:(id)sender { - [self removeFromSuperview]; - if (target != nil) { [target performSelector:action]; -- cgit 1.4.1