diff options
| author | Starla Insigna <starla4444@gmail.com> | 2011-08-12 09:51:50 -0400 |
|---|---|---|
| committer | Starla Insigna <starla4444@gmail.com> | 2011-08-12 09:51:50 -0400 |
| commit | d19677f9f73d8fe7436982bdf8d40f69d69d1b43 (patch) | |
| tree | 74853f369ef51bc9f9f595ff31153ce1a718e651 /Classes/GameMode.h | |
| parent | 07f40d804de35d1cead13217c448811e774e6e67 (diff) | |
| download | cartcollect-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/GameMode.h')
| -rw-r--r-- | Classes/GameMode.h | 19 |
1 files changed, 17 insertions, 2 deletions
| diff --git a/Classes/GameMode.h b/Classes/GameMode.h index bd47c90..370550c 100644 --- a/Classes/GameMode.h +++ b/Classes/GameMode.h | |||
| @@ -17,11 +17,26 @@ | |||
| 17 | int score; | 17 | int score; |
| 18 | int lives; | 18 | int lives; |
| 19 | Cart* cart; | 19 | Cart* cart; |
| 20 | |||
| 21 | CCLayerColor* shadedLayer; | ||
| 22 | CCLayer* pauseLayer; | ||
| 23 | |||
| 24 | CCLabelBMFont* scoreLabel; | ||
| 25 | CCLabelBMFont* livesLabel; | ||
| 26 | |||
| 27 | void (^delayedAction)(void); | ||
| 20 | } | 28 | } |
| 21 | 29 | ||
| 22 | @property (readonly) Cart* cart; | 30 | @property (readonly) Cart* cart; |
| 23 | @property (assign) int score; | 31 | @property (nonatomic,assign) int score; |
| 24 | @property (assign) int lives; | 32 | @property (nonatomic,assign) int lives; |
| 33 | + (CCScene*)scene; | ||
| 25 | - (void)tick:(ccTime)dt; | 34 | - (void)tick:(ccTime)dt; |
| 35 | - (BOOL)canPause; | ||
| 36 | - (void)pause; | ||
| 37 | - (void)unpause; | ||
| 38 | - (void)mainmenu; | ||
| 39 | - (void)scheduleDelayedAction:(void(^)(void))delayedAction delay:(float)delay; | ||
| 40 | - (void)runDelayedAction; | ||
| 26 | 41 | ||
| 27 | @end | 42 | @end |
