summary refs log tree commit diff stats
path: root/Classes/TutorialBubble.m
diff options
context:
space:
mode:
authorStarla Insigna <starla4444@gmail.com>2011-08-12 09:51:50 -0400
committerStarla Insigna <starla4444@gmail.com>2011-08-12 09:51:50 -0400
commitd19677f9f73d8fe7436982bdf8d40f69d69d1b43 (patch)
tree74853f369ef51bc9f9f595ff31153ce1a718e651 /Classes/TutorialBubble.m
parent07f40d804de35d1cead13217c448811e774e6e67 (diff)
downloadcartcollect-d19677f9f73d8fe7436982bdf8d40f69d69d1b43.tar.gz
cartcollect-d19677f9f73d8fe7436982bdf8d40f69d69d1b43.tar.bz2
cartcollect-d19677f9f73d8fe7436982bdf8d40f69d69d1b43.zip
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
Diffstat (limited to 'Classes/TutorialBubble.m')
-rw-r--r--Classes/TutorialBubble.m13
1 files changed, 11 insertions, 2 deletions
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 @@
134 boxLoc = CGPointMake(CGRectGetMaxX(spriteBounds), CGRectGetMaxY(spriteBounds) - self.frame.size.height); 134 boxLoc = CGPointMake(CGRectGetMaxX(spriteBounds), CGRectGetMaxY(spriteBounds) - self.frame.size.height);
135 arrowLoc = CGPointMake(0, button.frame.size.height - spriteBounds.size.height/2 + 4); 135 arrowLoc = CGPointMake(0, button.frame.size.height - spriteBounds.size.height/2 + 4);
136 } 136 }
137 } else {
138 arrowRotation = 180;
139
140 if (CGRectGetMidX(spriteBounds) < button.frame.size.width)
141 {
142 boxLoc = CGPointMake(0, CGRectGetMaxY(spriteBounds)-4);
143 arrowLoc = CGPointMake(spriteBounds.origin.x+4, 0);
144 } else {
145 boxLoc = CGPointMake(CGRectGetMaxX(spriteBounds) - self.frame.size.width, CGRectGetMaxY(spriteBounds)-4);
146 arrowLoc = CGPointMake(button.frame.size.width - spriteBounds.size.width/2 + 4, 0);
147 }
137 } 148 }
138 149
139 CGImageRef framestuff = [[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"framestuff" ofType:@"png"]] CGImage]; 150 CGImageRef framestuff = [[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"framestuff" ofType:@"png"]] CGImage];
@@ -153,8 +164,6 @@
153 164
154- (void)buttonPressed:(id)sender 165- (void)buttonPressed:(id)sender
155{ 166{
156 [self removeFromSuperview];
157
158 if (target != nil) 167 if (target != nil)
159 { 168 {
160 [target performSelector:action]; 169 [target performSelector:action];