diff options
author | Starla Insigna <starla4444@gmail.com> | 2013-01-02 23:08:46 -0500 |
---|---|---|
committer | Starla Insigna <starla4444@gmail.com> | 2013-01-02 23:08:46 -0500 |
commit | 28497668761472e085d0c9955aa8077d11bf353c (patch) | |
tree | 48676176c8f2de27f4959d05f209f2f98da3979b /Classes/GameModeManager.m | |
parent | 6e96fb2144718722208d22f892716b55548135e1 (diff) | |
download | cartcollect-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/GameModeManager.m')
-rw-r--r-- | Classes/GameModeManager.m | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Classes/GameModeManager.m b/Classes/GameModeManager.m index 5a6e109..d7cd21e 100644 --- a/Classes/GameModeManager.m +++ b/Classes/GameModeManager.m | |||
@@ -56,13 +56,7 @@ static GameModeManager* sharedInstance = nil; | |||
56 | NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; | 56 | NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; |
57 | [defaults setInteger:m_stars forKey:@"stars"]; | 57 | [defaults setInteger:m_stars forKey:@"stars"]; |
58 | 58 | ||
59 | for (GameModeInfo* gameMode in gameModes) | 59 | // Here, unlock game modes that have reached enough stars |
60 | { | ||
61 | if ((!gameMode.unlocked) && (stars >= gameMode.starsToUnlock)) | ||
62 | { | ||
63 | [gameMode unlock]; | ||
64 | } | ||
65 | } | ||
66 | } | 60 | } |
67 | } | 61 | } |
68 | 62 | ||