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 --- Cart Collect.xcodeproj/project.pbxproj | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'Cart Collect.xcodeproj/project.pbxproj') diff --git a/Cart Collect.xcodeproj/project.pbxproj b/Cart Collect.xcodeproj/project.pbxproj index b3c5dfa..231e838 100755 --- a/Cart Collect.xcodeproj/project.pbxproj +++ b/Cart Collect.xcodeproj/project.pbxproj @@ -84,6 +84,9 @@ 50F4144910692EE7002A0D5E /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 50F4144410692EE7002A0D5E /* Default.png */; }; 50F4144A10692EE7002A0D5E /* fps_images.png in Resources */ = {isa = PBXBuildFile; fileRef = 50F4144510692EE7002A0D5E /* fps_images.png */; }; 50F4144B10692EE7002A0D5E /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 50F4144610692EE7002A0D5E /* Icon.png */; }; + 6C0C140E13F1C3EC003A31B2 /* ValuableObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C0C140D13F1C3EC003A31B2 /* ValuableObject.m */; }; + 6C0C141113F2099B003A31B2 /* Cart.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C0C141013F2099B003A31B2 /* Cart.m */; }; + 6C0C141413F20E98003A31B2 /* GameMode.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C0C141313F20E98003A31B2 /* GameMode.m */; }; 6C29041013EAEB590032DA0F /* TutorialBubble.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C29040F13EAEB590032DA0F /* TutorialBubble.m */; }; 6C29041213EAEC8A0032DA0F /* framestuff.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C29041113EAEC8A0032DA0F /* framestuff.png */; }; 6C5179C613DF3839006F1F38 /* Morning1.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C5179C513DF3839006F1F38 /* Morning1.png */; }; @@ -328,7 +331,6 @@ 3F7D0F4913D8F17C00B6CE14 /* highscores2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = highscores2.png; sourceTree = ""; }; 3F7D0F4A13D8F17C00B6CE14 /* newgame.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = newgame.png; sourceTree = ""; }; 3F7D0F4B13D8F17C00B6CE14 /* newgame2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = newgame2.png; sourceTree = ""; }; - 3F8394AC13D72E2C0059AEE8 /* ValuableObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValuableObject.h; sourceTree = ""; }; 3F8394F213D732330059AEE8 /* pause.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pause.png; sourceTree = ""; }; 3F8394F413D7328E0059AEE8 /* pause2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pause2.png; sourceTree = ""; }; 3F83955113D739B10059AEE8 /* MainMenuLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainMenuLayer.h; sourceTree = ""; }; @@ -373,6 +375,12 @@ 50F4144510692EE7002A0D5E /* fps_images.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = fps_images.png; sourceTree = ""; }; 50F4144610692EE7002A0D5E /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; 50F4144710692EE7002A0D5E /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6C0C140C13F1C3EC003A31B2 /* ValuableObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValuableObject.h; sourceTree = ""; }; + 6C0C140D13F1C3EC003A31B2 /* ValuableObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ValuableObject.m; sourceTree = ""; }; + 6C0C140F13F2099B003A31B2 /* Cart.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cart.h; sourceTree = ""; }; + 6C0C141013F2099B003A31B2 /* Cart.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Cart.m; sourceTree = ""; }; + 6C0C141213F20E98003A31B2 /* GameMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameMode.h; sourceTree = ""; }; + 6C0C141313F20E98003A31B2 /* GameMode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameMode.m; sourceTree = ""; }; 6C29040E13EAEB590032DA0F /* TutorialBubble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TutorialBubble.h; sourceTree = ""; }; 6C29040F13EAEB590032DA0F /* TutorialBubble.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TutorialBubble.m; sourceTree = ""; }; 6C29041113EAEC8A0032DA0F /* framestuff.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = framestuff.png; sourceTree = ""; }; @@ -656,14 +664,13 @@ 2D500B1D0D5A766B00DBA0E3 /* Classes */ = { isa = PBXGroup; children = ( + 6C0C141513F211C7003A31B2 /* Game Modes */, 6C5887E313EE3ED900B5A80A /* Items */, E0F81035120A173C005866B8 /* GameConfig.h */, E0F81036120A173C005866B8 /* RootViewController.h */, E0F81037120A173C005866B8 /* RootViewController.m */, 1F3B9A2C0EF2145700286867 /* Cart_CollectAppDelegate.h */, 507022A2107672FA00393637 /* Cart_CollectAppDelegate.m */, - 3FE79CD213D4DE37001A6B93 /* GameLayer.h */, - 3FE79CD313D4DE37001A6B93 /* GameLayer.m */, 3F6C7EE713D6377D00C038FE /* GameOverLayer.h */, 3F6C7EE813D6377D00C038FE /* GameOverLayer.m */, 3F83955213D739B10059AEE8 /* MainMenuLayer.m */, @@ -821,6 +828,17 @@ path = Resources; sourceTree = ""; }; + 6C0C141513F211C7003A31B2 /* Game Modes */ = { + isa = PBXGroup; + children = ( + 6C0C141213F20E98003A31B2 /* GameMode.h */, + 6C0C141313F20E98003A31B2 /* GameMode.m */, + 3FE79CD213D4DE37001A6B93 /* GameLayer.h */, + 3FE79CD313D4DE37001A6B93 /* GameLayer.m */, + ); + name = "Game Modes"; + sourceTree = ""; + }; 6C5887E313EE3ED900B5A80A /* Items */ = { isa = PBXGroup; children = ( @@ -834,7 +852,10 @@ 3F6C7C7213D5E57100C038FE /* OneUp.m */, 3F6C7EE213D636CF00C038FE /* Rock.h */, 3F6C7EE313D636CF00C038FE /* Rock.m */, - 3F8394AC13D72E2C0059AEE8 /* ValuableObject.h */, + 6C0C140C13F1C3EC003A31B2 /* ValuableObject.h */, + 6C0C140D13F1C3EC003A31B2 /* ValuableObject.m */, + 6C0C140F13F2099B003A31B2 /* Cart.h */, + 6C0C141013F2099B003A31B2 /* Cart.m */, ); name = Items; sourceTree = ""; @@ -1341,6 +1362,9 @@ 3F03221613D78F8C00E6A708 /* HighscoreListController.m in Sources */, 3F03221913D7904E00E6A708 /* Highscore.m in Sources */, 6C29041013EAEB590032DA0F /* TutorialBubble.m in Sources */, + 6C0C140E13F1C3EC003A31B2 /* ValuableObject.m in Sources */, + 6C0C141113F2099B003A31B2 /* Cart.m in Sources */, + 6C0C141413F20E98003A31B2 /* GameMode.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; -- cgit 1.4.1