summary refs log tree commit diff stats
path: root/Classes/GameModeInfo.h
diff options
context:
space:
mode:
authorStarla Insigna <starla4444@gmail.com>2011-11-30 12:57:06 -0500
committerStarla Insigna <starla4444@gmail.com>2011-11-30 12:57:06 -0500
commit6e96fb2144718722208d22f892716b55548135e1 (patch)
tree4dd550de787dd370a13039c03969442f54a3a856 /Classes/GameModeInfo.h
parentfd58a0cde1bb5473e39e6cb82d28113da84b9ae0 (diff)
downloadcartcollect-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/GameModeInfo.h')
-rw-r--r--Classes/GameModeInfo.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/Classes/GameModeInfo.h b/Classes/GameModeInfo.h new file mode 100644 index 0000000..2262526 --- /dev/null +++ b/Classes/GameModeInfo.h
@@ -0,0 +1,41 @@
1//
2// GameModeInfo.h
3// Cartographic
4//
5// Created by Starla Insigna on 11/28/11.
6// Copyright (c) 2011 Four Island. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import "cocos2d.h"
11
12@interface GameModeInfo : NSObject {
13 NSString* name;
14 NSString* location;
15 BOOL* stars;
16 int numOfStars;
17 BOOL unlocked;
18 UIImage* image;
19 NSString* unlockCondition;
20 Class gameClass;
21 NSString* globalHighscoreKey;
22 int starsToUnlock;
23}
24
25@property (readonly) NSString* name;
26@property (readonly) NSString* location;
27@property (readonly) int numOfStars;
28@property (readonly) UIImage* image;
29@property (readonly) BOOL unlocked;
30@property (readonly) NSString* unlockCondition;
31@property (readonly) NSString* globalHighscoreKey;
32@property (readonly) int starsToUnlock;
33- (id)initWithName:(NSString*)m_name location:(NSString*)m_location numOfStars:(int)m_numOfStars imageFilename:(NSString*)m_imageFilename unlocked:(BOOL)m_unlocked unlockCondition:(NSString*)m_unlockCondition gameClass:(Class)m_gameClass globalHighscoreKey:(NSString*)m_globalHighscoreKey starsToUnlock:(int)m_starsToUnlock;
34- (void)setStar:(int)star_id withMessage:(NSString*)message;
35- (BOOL)star:(int)star_id;
36- (int)starsCollected;
37- (CCScene*)scene;
38- (void)unlock;
39- (void)dealloc;
40
41@end