diff options
author | Starla Insigna <starla4444@gmail.com> | 2011-11-30 12:57:06 -0500 |
---|---|---|
committer | Starla Insigna <starla4444@gmail.com> | 2011-11-30 12:57:06 -0500 |
commit | 6e96fb2144718722208d22f892716b55548135e1 (patch) | |
tree | 4dd550de787dd370a13039c03969442f54a3a856 /Classes/GameModeSelection.h | |
parent | fd58a0cde1bb5473e39e6cb82d28113da84b9ae0 (diff) | |
download | cartcollect-6e96fb2144718722208d22f892716b55548135e1.tar.gz cartcollect-6e96fb2144718722208d22f892716b55548135e1.tar.bz2 cartcollect-6e96fb2144718722208d22f892716b55548135e1.zip |
Created a game mode manager
There is now one location for information relating to each GameMode instead of several places, so that info can be easily updated and propagated to, for instance, GameModeSelectionLayer. GameModes can also be specified by an info instance each owns. There's also a way to get an ordered list of game modes. The three star game mode unlocking system has also been added. Closes #213
Diffstat (limited to 'Classes/GameModeSelection.h')
-rw-r--r-- | Classes/GameModeSelection.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/Classes/GameModeSelection.h b/Classes/GameModeSelection.h index bdb38fb..ec6d5ad 100644 --- a/Classes/GameModeSelection.h +++ b/Classes/GameModeSelection.h | |||
@@ -8,23 +8,17 @@ | |||
8 | 8 | ||
9 | #import "cocos2d.h" | 9 | #import "cocos2d.h" |
10 | #import "GameModeSelectionDelegate.h" | 10 | #import "GameModeSelectionDelegate.h" |
11 | #import "GameModeInfo.h" | ||
11 | 12 | ||
12 | @interface GameModeSelection : CCMenuItem { | 13 | @interface GameModeSelection : CCMenuItem { |
13 | NSString* name; | 14 | GameModeInfo* gameMode; |
14 | NSString* location; | ||
15 | BOOL unlocked; | ||
16 | NSString* unlockCondition; | ||
17 | id<GameModeSelectionDelegate> delegate; | 15 | id<GameModeSelectionDelegate> delegate; |
18 | } | 16 | } |
19 | 17 | ||
20 | @property (readonly) NSString* name; | 18 | @property (readonly) GameModeInfo* gameMode; |
21 | @property (readonly) NSString* location; | ||
22 | @property (readonly) BOOL unlocked; | ||
23 | @property (nonatomic,retain) id<GameModeSelectionDelegate> delegate; | 19 | @property (nonatomic,retain) id<GameModeSelectionDelegate> delegate; |
24 | + (id)selectionWithName:(NSString*)name location:(NSString*)location filename:(NSString*)filename unlocked:(BOOL)unlocked; | 20 | + (id)selectionWithGameModeInfo:(GameModeInfo*)m_gameMode; |
25 | + (id)selectionWithName:(NSString *)name location:(NSString *)location filename:(NSString *)filename unlockCondition:(NSString*)unlockCondition; | 21 | - (id)initWithGameModeInfo:(GameModeInfo*)m_gameMode; |
26 | - (id)initWithName:(NSString*)name location:(NSString*)location filename:(NSString*)filename unlocked:(BOOL)unlocked; | ||
27 | - (id)initWithName:(NSString *)name location:(NSString *)location filename:(NSString *)filename unlockCondition:(NSString*)unlockCondition; | ||
28 | - (void)buttonTapped; | 22 | - (void)buttonTapped; |
29 | 23 | ||
30 | @end | 24 | @end |