From 002dc99a071a4a8f7d2afc15d1fdf2ae0312faed Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Tue, 9 Aug 2011 21:36:09 -0400 Subject: Abstracted a lot of GameLayer's functionality out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to prepare for tutorial mode (and eventually, the other game modes), a lot of GameLayer's functionality (reading the accelerometer, moving the cart, moving falling objects, reacting to collisions…) has been abstracted out to FallingObject and subclasses of FallingObject, as well as a new Cart class, and GameMode, a new superclass of GameLayer. The only things that were not abstracted out that probably will be in the future are the pause functionality and the tutorial bubble functionality (which will in fact be moved to the tutorial mode class). A lot of work was also done to cut down on compiler warnings and a lot of #imports were moved from header files to implementation files because I realized THAT'S HOW YOU'RE SUPPOSED TO DO IT. Refs #193 --- Classes/MainMenuLayer.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Classes/MainMenuLayer.m') diff --git a/Classes/MainMenuLayer.m b/Classes/MainMenuLayer.m index ac7f4a7..11cffd7 100755 --- a/Classes/MainMenuLayer.m +++ b/Classes/MainMenuLayer.m @@ -7,7 +7,9 @@ // #import "MainMenuLayer.h" - +#import "HighscoreListController.h" +#import "GameLayer.h" +#import "Cart_CollectAppDelegate.h" @implementation MainMenuLayer @@ -61,7 +63,8 @@ - (void)highscores { HighscoreListController* listController = [[HighscoreListController alloc] initWithStyle:UITableViewStylePlain]; - [[[[UIApplication sharedApplication] delegate] window] setRootViewController:listController]; + Cart_CollectAppDelegate* appDelegate = ((Cart_CollectAppDelegate*) [[UIApplication sharedApplication] delegate]); + [[appDelegate window] setRootViewController:listController]; [listController release]; } -- cgit 1.4.1