summary refs log tree commit diff stats
path: root/Classes/GameModeInfo.m
diff options
context:
space:
mode:
authorStarla Insigna <starla4444@gmail.com>2013-01-02 23:08:46 -0500
committerStarla Insigna <starla4444@gmail.com>2013-01-02 23:08:46 -0500
commit28497668761472e085d0c9955aa8077d11bf353c (patch)
tree48676176c8f2de27f4959d05f209f2f98da3979b /Classes/GameModeInfo.m
parent6e96fb2144718722208d22f892716b55548135e1 (diff)
downloadcartcollect-28497668761472e085d0c9955aa8077d11bf353c.tar.gz
cartcollect-28497668761472e085d0c9955aa8077d11bf353c.tar.bz2
cartcollect-28497668761472e085d0c9955aa8077d11bf353c.zip
Removed locked game modes from selection screen
Also removed cluttering attributes "unlockCondition" and "starsToUnlock" from GameModeInfo because they're really not that generalized (and unlockCondition doesn't really make sense if locked game modes are invisible anyway). starsToUnlock can be replaced by simply putting if statements in to GameModeManager's setStars: and then unlocking modes based off that.

Completing the tutorial also now unlocks both Collect AND Jump. The idea is that we should make more than just Collect available at the start, and have only a few super hidden game modes that are unlockable; hence locked game modes being invisible.
Diffstat (limited to 'Classes/GameModeInfo.m')
-rw-r--r--Classes/GameModeInfo.m6
1 files changed, 2 insertions, 4 deletions
diff --git a/Classes/GameModeInfo.m b/Classes/GameModeInfo.m index 8b33fd8..1f85978 100644 --- a/Classes/GameModeInfo.m +++ b/Classes/GameModeInfo.m
@@ -14,9 +14,9 @@
14 14
15@implementation GameModeInfo 15@implementation GameModeInfo
16 16
17@synthesize name, location, numOfStars, image, unlocked, unlockCondition, globalHighscoreKey, starsToUnlock; 17@synthesize name, location, numOfStars, image, unlocked, globalHighscoreKey;
18 18
19- (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 19- (id)initWithName:(NSString*)m_name location:(NSString*)m_location numOfStars:(int)m_numOfStars imageFilename:(NSString*)m_imageFilename unlocked:(BOOL)m_unlocked gameClass:(Class)m_gameClass globalHighscoreKey:(NSString*)m_globalHighscoreKey
20{ 20{
21 self = [super init]; 21 self = [super init];
22 22
@@ -26,9 +26,7 @@
26 location = m_location; 26 location = m_location;
27 numOfStars = m_numOfStars; 27 numOfStars = m_numOfStars;
28 image = [[UIImage alloc] initWithContentsOfFile:m_imageFilename]; 28 image = [[UIImage alloc] initWithContentsOfFile:m_imageFilename];
29 unlockCondition = m_unlockCondition;
30 globalHighscoreKey = m_globalHighscoreKey; 29 globalHighscoreKey = m_globalHighscoreKey;
31 starsToUnlock = m_starsToUnlock;
32 30
33 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; 31 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
34 unlocked = [defaults boolForKey:[NSString stringWithFormat:@"gameModeUnlocked-%@", name]]; 32 unlocked = [defaults boolForKey:[NSString stringWithFormat:@"gameModeUnlocked-%@", name]];