diff --git a/ImageViewLearn.xcodeproj/project.pbxproj b/ImageViewLearn.xcodeproj/project.pbxproj deleted file mode 100644 index ccb4245..0000000 --- a/ImageViewLearn.xcodeproj/project.pbxproj +++ /dev/null @@ -1,297 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1894DD7817D42DB0009C56CD /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1894DD7717D42DB0009C56CD /* UIKit.framework */; }; - 1894DD7A17D42DB0009C56CD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1894DD7917D42DB0009C56CD /* Foundation.framework */; }; - 1894DD7C17D42DB0009C56CD /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1894DD7B17D42DB0009C56CD /* CoreGraphics.framework */; }; - 1894DD8217D42DB0009C56CD /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1894DD8017D42DB0009C56CD /* InfoPlist.strings */; }; - 1894DD8417D42DB0009C56CD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1894DD8317D42DB0009C56CD /* main.m */; }; - 1894DD8817D42DB0009C56CD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1894DD8717D42DB0009C56CD /* AppDelegate.m */; }; - 1894DD8A17D42DB0009C56CD /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 1894DD8917D42DB0009C56CD /* Default.png */; }; - 1894DD8C17D42DB0009C56CD /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1894DD8B17D42DB0009C56CD /* Default@2x.png */; }; - 1894DD8E17D42DB0009C56CD /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1894DD8D17D42DB0009C56CD /* Default-568h@2x.png */; }; - 1894DD9117D42DB0009C56CD /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1894DD9017D42DB0009C56CD /* ViewController.m */; }; - 1894DD9417D42DB0009C56CD /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1894DD9217D42DB0009C56CD /* ViewController.xib */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1894DD7317D42DB0009C56CD /* ImageViewLearn.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ImageViewLearn.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1894DD7717D42DB0009C56CD /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 1894DD7917D42DB0009C56CD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1894DD7B17D42DB0009C56CD /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 1894DD7F17D42DB0009C56CD /* ImageViewLearn-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ImageViewLearn-Info.plist"; sourceTree = ""; }; - 1894DD8117D42DB0009C56CD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 1894DD8317D42DB0009C56CD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 1894DD8517D42DB0009C56CD /* ImageViewLearn-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ImageViewLearn-Prefix.pch"; sourceTree = ""; }; - 1894DD8617D42DB0009C56CD /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1894DD8717D42DB0009C56CD /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1894DD8917D42DB0009C56CD /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; - 1894DD8B17D42DB0009C56CD /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; - 1894DD8D17D42DB0009C56CD /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - 1894DD8F17D42DB0009C56CD /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 1894DD9017D42DB0009C56CD /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 1894DD9317D42DB0009C56CD /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController.xib; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1894DD7017D42DB0009C56CD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1894DD7817D42DB0009C56CD /* UIKit.framework in Frameworks */, - 1894DD7A17D42DB0009C56CD /* Foundation.framework in Frameworks */, - 1894DD7C17D42DB0009C56CD /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1894DD6817D42DB0009C56CD = { - isa = PBXGroup; - children = ( - 1894DD7D17D42DB0009C56CD /* ImageViewLearn */, - 1894DD7617D42DB0009C56CD /* Frameworks */, - 1894DD7417D42DB0009C56CD /* Products */, - ); - sourceTree = ""; - }; - 1894DD7417D42DB0009C56CD /* Products */ = { - isa = PBXGroup; - children = ( - 1894DD7317D42DB0009C56CD /* ImageViewLearn.app */, - ); - name = Products; - sourceTree = ""; - }; - 1894DD7617D42DB0009C56CD /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1894DD7717D42DB0009C56CD /* UIKit.framework */, - 1894DD7917D42DB0009C56CD /* Foundation.framework */, - 1894DD7B17D42DB0009C56CD /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 1894DD7D17D42DB0009C56CD /* ImageViewLearn */ = { - isa = PBXGroup; - children = ( - 1894DD8617D42DB0009C56CD /* AppDelegate.h */, - 1894DD8717D42DB0009C56CD /* AppDelegate.m */, - 1894DD8F17D42DB0009C56CD /* ViewController.h */, - 1894DD9017D42DB0009C56CD /* ViewController.m */, - 1894DD9217D42DB0009C56CD /* ViewController.xib */, - 1894DD7E17D42DB0009C56CD /* Supporting Files */, - ); - path = ImageViewLearn; - sourceTree = ""; - }; - 1894DD7E17D42DB0009C56CD /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 1894DD7F17D42DB0009C56CD /* ImageViewLearn-Info.plist */, - 1894DD8017D42DB0009C56CD /* InfoPlist.strings */, - 1894DD8317D42DB0009C56CD /* main.m */, - 1894DD8517D42DB0009C56CD /* ImageViewLearn-Prefix.pch */, - 1894DD8917D42DB0009C56CD /* Default.png */, - 1894DD8B17D42DB0009C56CD /* Default@2x.png */, - 1894DD8D17D42DB0009C56CD /* Default-568h@2x.png */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1894DD7217D42DB0009C56CD /* ImageViewLearn */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1894DD9717D42DB0009C56CD /* Build configuration list for PBXNativeTarget "ImageViewLearn" */; - buildPhases = ( - 1894DD6F17D42DB0009C56CD /* Sources */, - 1894DD7017D42DB0009C56CD /* Frameworks */, - 1894DD7117D42DB0009C56CD /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ImageViewLearn; - productName = ImageViewLearn; - productReference = 1894DD7317D42DB0009C56CD /* ImageViewLearn.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 1894DD6A17D42DB0009C56CD /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0450; - ORGANIZATIONNAME = Apple.org; - }; - buildConfigurationList = 1894DD6D17D42DB0009C56CD /* Build configuration list for PBXProject "ImageViewLearn" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 1894DD6817D42DB0009C56CD; - productRefGroup = 1894DD7417D42DB0009C56CD /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1894DD7217D42DB0009C56CD /* ImageViewLearn */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1894DD7117D42DB0009C56CD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1894DD8217D42DB0009C56CD /* InfoPlist.strings in Resources */, - 1894DD8A17D42DB0009C56CD /* Default.png in Resources */, - 1894DD8C17D42DB0009C56CD /* Default@2x.png in Resources */, - 1894DD8E17D42DB0009C56CD /* Default-568h@2x.png in Resources */, - 1894DD9417D42DB0009C56CD /* ViewController.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1894DD6F17D42DB0009C56CD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1894DD8417D42DB0009C56CD /* main.m in Sources */, - 1894DD8817D42DB0009C56CD /* AppDelegate.m in Sources */, - 1894DD9117D42DB0009C56CD /* ViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 1894DD8017D42DB0009C56CD /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 1894DD8117D42DB0009C56CD /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 1894DD9217D42DB0009C56CD /* ViewController.xib */ = { - isa = PBXVariantGroup; - children = ( - 1894DD9317D42DB0009C56CD /* en */, - ); - name = ViewController.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 1894DD9517D42DB0009C56CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 1894DD9617D42DB0009C56CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 1894DD9817D42DB0009C56CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "ImageViewLearn/ImageViewLearn-Prefix.pch"; - INFOPLIST_FILE = "ImageViewLearn/ImageViewLearn-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 1894DD9917D42DB0009C56CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "ImageViewLearn/ImageViewLearn-Prefix.pch"; - INFOPLIST_FILE = "ImageViewLearn/ImageViewLearn-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1894DD6D17D42DB0009C56CD /* Build configuration list for PBXProject "ImageViewLearn" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1894DD9517D42DB0009C56CD /* Debug */, - 1894DD9617D42DB0009C56CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1894DD9717D42DB0009C56CD /* Build configuration list for PBXNativeTarget "ImageViewLearn" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1894DD9817D42DB0009C56CD /* Debug */, - 1894DD9917D42DB0009C56CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - }; - rootObject = 1894DD6A17D42DB0009C56CD /* Project object */; -} diff --git a/ImageViewLearn/AppDelegate.m b/ImageViewLearn/AppDelegate.m index 1125924..c26773c 100644 --- a/ImageViewLearn/AppDelegate.m +++ b/ImageViewLearn/AppDelegate.m @@ -22,7 +22,6 @@ - (void)dealloc - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; - // Override point for customization after application launch. self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease]; self.window.rootViewController = self.viewController; [self.window makeKeyAndVisible]; @@ -31,29 +30,28 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( - (void)applicationWillResignActive:(UIApplication *)application { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + + } - (void)applicationDidEnterBackground:(UIApplication *)application { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } - (void)applicationWillEnterForeground:(UIApplication *)application { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } - (void)applicationDidBecomeActive:(UIApplication *)application { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } - (void)applicationWillTerminate:(UIApplication *)application { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } @end diff --git a/ImageViewLearn/BigNut.h b/ImageViewLearn/BigNut.h new file mode 100644 index 0000000..0ce9b5f --- /dev/null +++ b/ImageViewLearn/BigNut.h @@ -0,0 +1,13 @@ +// +// BigNut.h +// PlantsVsZombies +// +// Created by Ron on 13-9-12. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "Plant.h" + +@interface BigNut : Plant + +@end diff --git a/ImageViewLearn/BigNut.m b/ImageViewLearn/BigNut.m new file mode 100644 index 0000000..c4aeced --- /dev/null +++ b/ImageViewLearn/BigNut.m @@ -0,0 +1,32 @@ +// +// BigNut.m +// PlantsVsZombies +// +// Created by Ron on 13-9-12. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "BigNut.h" + +@implementation BigNut + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + self.costShine=150; + [self setUserInteractionEnabled:YES]; + self.animationImages= [[ImageManager defaultManager]getPlantImagesByType:3]; + self.image = self.animationImages[0]; + self.lifeCount=500; + } + return self; +} + + +-(void)dealloc{ + //NSLog(@"nut dead"); + [super dealloc]; +} + +@end diff --git a/ImageViewLearn/Bullet.h b/ImageViewLearn/Bullet.h new file mode 100644 index 0000000..8551368 --- /dev/null +++ b/ImageViewLearn/Bullet.h @@ -0,0 +1,24 @@ +// +// Bullet.h +// ImageViewLearn +// +// Created by Ron on 13-9-2. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import +#import "ViewController.h" +#import "Zombie.h" +@interface Bullet : UIImageView +@property (nonatomic,assign)int fireIndex; +@property (nonatomic,assign)int bulletState; +@property (nonatomic,assign)ViewController* vc; +@property (nonatomic,assign)unsigned int lineNum; +@property (nonatomic,assign)NSMutableOrderedSet* myLineZombies; +@property (nonatomic,assign)NSMutableOrderedSet* myLinePlants; +@property (nonatomic,assign)UIView* currentFireView; +-(id)initWithVC:(ViewController*)vc x:(int)x y:(int)y LineNum:(unsigned int)lineNum State:(int)state; +-(void)move; +-(void)hitZombie; +-(void)changePicture; +@end diff --git a/ImageViewLearn/Bullet.m b/ImageViewLearn/Bullet.m new file mode 100644 index 0000000..b2335b7 --- /dev/null +++ b/ImageViewLearn/Bullet.m @@ -0,0 +1,147 @@ +// +// Bullet.m +// ImageViewLearn +// +// Created by Ron on 13-9-2. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "Bullet.h" +#import "IceBullet.h" +@implementation Bullet +static UIImage* bulletImage=nil; +static UIImage* iceBulletImage=nil; +static UIImage* fireBulletImage=nil; +-(id)initWithVC:(ViewController *)vc x:(int)x y:(int)y LineNum:(unsigned int)lineNum State:(int)state{ + if(self=[super init]){ + + self.fireIndex=-1; + self.vc=vc; + self.bulletState=state; + if(bulletImage==nil){ + bulletImage=[UIImage imageNamed:@"bullet_0.png"]; + iceBulletImage=[UIImage imageNamed:@"bullet_1.png"]; + fireBulletImage=[UIImage imageNamed:@"bullet_2.png"]; + } + self.frame=CGRectMake(x+10, y-5, 15, 15); + self.tag=100; + //[self changePicture]; + //[self.vc.view addSubview:self]; + //self.lineNum=lineNum; + //self.myLineZombies=self.vc.allZombies[self.lineNum]; + //self.myLinePlants=self.vc.allPlants[self.lineNum]; + //[NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(move:) userInfo:nil repeats:YES]; + } + return self; +} +-(void)changePicture{ + switch (self.bulletState) { + case 0: self.image =bulletImage; + break; + case 1: self.image =fireBulletImage; + break; + case 2: self.image=iceBulletImage; + break; + + } + +} +-(void)move{ + + + self.center = CGPointMake(self.center.x+1, self.center.y); + [self hitZombie]; + + if(self.center.x>480){ + //[timer invalidate]; + self.currentFireView=nil; + [self removeFromSuperview]; + [self.vc.allBullets removeObject:self]; + [self.vc.bulletPool addBullet:self]; + } +} +-(void)changeState{ + if(self.bulletState==1) + return; + if(self.bulletState==0) + self.bulletState+=1; + else + self.bulletState=0; + + + [self changePicture]; + +} +static int oldCount=0; +-(void)hitZombie{ + //************// + + for(int i=0;i<_myLinePlants.count;i++){ + Plant* viewPlant=_myLinePlants[i]; + + if(CGRectContainsRect(viewPlant.viewRect, self.frame)){ + if(viewPlant.tag==123){ + + if(![viewPlant isEqual:self.currentFireView]) + [self changeState]; + + + self.currentFireView=viewPlant; + return; + } + + + } + + } + + oldCount=_myLinePlants.count; + for(int i=0;i<_myLineZombies.count;i++){ + Zombie* viewZom=_myLineZombies[i]; + + if(CGRectIntersectsRect(self.frame, viewZom.frame)){ + self.currentFireView=nil; + if(self.bulletState==0){ + [self normalHit:viewZom]; + }else if (self.bulletState==2){ + [self iceHit:viewZom]; + } + else if(self.bulletState==1){ + [self fireHit:viewZom]; + + } + + if(viewZom.liftCount<=0){ + viewZom.liftCount=99; + [viewZom goToHell]; + + } + //[timer invalidate]; + [self removeFromSuperview]; + // [self release]; + [self.vc.allBullets removeObject:self]; + [self.vc.bulletPool addBullet:self]; + break; + } + + } + } + +-(void)normalHit:(Zombie*)zombie{ + zombie.liftCount-=1; +} +-(void)iceHit:(Zombie*)zombie{ + zombie.liftCount-=1; + zombie.offset=2; + zombie.slowDownCount=60; + zombie.alpha=0.5; +} +-(void)fireHit:(Zombie*)zombie{ + zombie.liftCount-=2; + +} +-(void)dealloc{ + + [super dealloc]; +} +@end diff --git a/ImageViewLearn/BulletPool.h b/ImageViewLearn/BulletPool.h new file mode 100644 index 0000000..9de7f5f --- /dev/null +++ b/ImageViewLearn/BulletPool.h @@ -0,0 +1,19 @@ +// +// BulletPool.h +// PlantsVsZombies +// +// Created by Ron on 13-9-18. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import + +@class Bullet; +@class ViewController; +@interface BulletPool : NSObject +@property (nonatomic,assign)ViewController* vc; +@property (nonatomic,retain)NSMutableArray* allBullets; +-(Bullet*)getBullet; +-(void)addBullet:(Bullet*)bullet; +-(id)initWithVC:(ViewController*)vc; +@end diff --git a/ImageViewLearn/BulletPool.m b/ImageViewLearn/BulletPool.m new file mode 100644 index 0000000..2889140 --- /dev/null +++ b/ImageViewLearn/BulletPool.m @@ -0,0 +1,38 @@ +// +// BulletPool.m +// PlantsVsZombies +// +// Created by Ron on 13-9-18. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "BulletPool.h" +#import "Bullet.h" +@implementation BulletPool +-(id)initWithVC:(ViewController *)vc{ + + if(self=[super init]){ + self.vc=vc; + self.allBullets=[NSMutableArray array]; + [self createAllBullet]; + + } + return self; +} +-(void)createAllBullet{ + for(int i=0;i<200;i++){ + [self.allBullets addObject:[[Bullet alloc]initWithVC:self.vc x:0 y:0 LineNum:0 State:0]]; + + } + +} +-(void)addBullet:(Bullet*)bullet{ + [self.allBullets addObject:bullet]; + +} +-(Bullet*)getBullet{ + Bullet* bullet= [self.allBullets lastObject]; + [self.allBullets removeLastObject]; + return bullet; +} +@end diff --git a/ImageViewLearn/DrumZombie.h b/ImageViewLearn/DrumZombie.h new file mode 100644 index 0000000..dcdc2c9 --- /dev/null +++ b/ImageViewLearn/DrumZombie.h @@ -0,0 +1,13 @@ +// +// DrumZombie.h +// PlantsVsZombies +// +// Created by Ron on 13-9-3. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import +#import "Zombie.h" +@interface DrumZombie : Zombie + +@end diff --git a/ImageViewLearn/DrumZombie.m b/ImageViewLearn/DrumZombie.m new file mode 100644 index 0000000..600586b --- /dev/null +++ b/ImageViewLearn/DrumZombie.m @@ -0,0 +1,29 @@ +// +// DrumZombie.m +// PlantsVsZombies +// +// Created by Ron on 13-9-3. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "DrumZombie.h" + +@implementation DrumZombie + + +-(id)initWithZombieVC:(ViewController*)vc{ + + if(self=[super initWithZombieVC:vc]){ + + + self.liftCount=15; + self.zombieImages= [[ImageManager defaultManager]getZombieImagesByType:2]; + self.image = self.zombieImages[0]; + + + } + return self; +} + + +@end diff --git a/ImageViewLearn/IceBullet.h b/ImageViewLearn/IceBullet.h new file mode 100644 index 0000000..fbca3f1 --- /dev/null +++ b/ImageViewLearn/IceBullet.h @@ -0,0 +1,13 @@ +// +// IceBullet.h +// PlantsVsZombies +// +// Created by Ron on 13-9-13. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "Bullet.h" + +@interface IceBullet : Bullet + +@end diff --git a/ImageViewLearn/IceBullet.m b/ImageViewLearn/IceBullet.m new file mode 100644 index 0000000..02359a6 --- /dev/null +++ b/ImageViewLearn/IceBullet.m @@ -0,0 +1,37 @@ +// +// IceBullet.m +// PlantsVsZombies +// +// Created by Ron on 13-9-13. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "IceBullet.h" + +@implementation IceBullet +static UIImage* iceBulletImage=nil; +-(id)initWithVC:(ViewController *)vc x:(int)x y:(int)y LineNum:(unsigned int)lineNum{ + if(self=[super init]){ + self.vc=vc; + if(iceBulletImage==nil){ + iceBulletImage=[UIImage imageNamed:@"bullet_1.png"]; + } + self.frame=CGRectMake(x+10, y-5, 15, 15); + self.tag=100; + self.image =iceBulletImage; + self.lineNum=lineNum; + self.myLineZombies=self.vc.allZombies[self.lineNum]; + [self.vc.view addSubview:self]; + [NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(move:) userInfo:nil repeats:YES]; + } + return self; +} + + + + + + + + +@end diff --git a/ImageViewLearn/IceShooter.h b/ImageViewLearn/IceShooter.h new file mode 100644 index 0000000..6693c65 --- /dev/null +++ b/ImageViewLearn/IceShooter.h @@ -0,0 +1,13 @@ +// +// IceShooter.h +// PlantsVsZombies +// +// Created by Ron on 13-9-12. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "Plant.h" + +@interface IceShooter : Plant + +@end diff --git a/ImageViewLearn/IceShooter.m b/ImageViewLearn/IceShooter.m new file mode 100644 index 0000000..0177568 --- /dev/null +++ b/ImageViewLearn/IceShooter.m @@ -0,0 +1,45 @@ +// +// IceShooter.m +// PlantsVsZombies +// +// Created by Ron on 13-9-12. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "IceShooter.h" +#import "IceBullet.h" +@implementation IceShooter + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + self.costShine=125; + [self setUserInteractionEnabled:YES]; + self.animationImages= [[ImageManager defaultManager]getPlantImagesByType:2]; + self.image = self.animationImages[0]; + self.lifeCount=10; + + } + return self; +} + +-(void)shoot:(NSTimer*)timer{ + Bullet* bullet= [self.vc.bulletPool getBullet]; + bullet.frame=CGRectMake(self.viewLocation.x+10, self.viewLocation.y-16, 15, 15); + bullet.lineNum=self.lineNum; + bullet.bulletState=2; + bullet.fireIndex=-1; + [bullet changePicture]; + bullet.myLineZombies=self.vc.allZombies[self.lineNum]; + bullet.myLinePlants=self.vc.allPlants[self.lineNum]; + [self.vc.allBullets addObject:bullet]; + [self.vc.view addSubview:bullet]; + + +} +-(void)dealloc{ + // NSLog(@"ice dead"); + [super dealloc]; +} +@end diff --git a/ImageViewLearn/ImageManager.h b/ImageViewLearn/ImageManager.h new file mode 100644 index 0000000..89661c8 --- /dev/null +++ b/ImageViewLearn/ImageManager.h @@ -0,0 +1,19 @@ +// +// ImageManager.h +// PlantsVsZombies +// +// Created by Ron on 13-9-12. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import + +@interface ImageManager : NSObject + ++(id)defaultManager; +-(NSMutableArray*)getZombieImagesByType:(int)type; +-(NSMutableArray*)getZombieDeadImagesByType:(int)type; +-(NSMutableArray*)getPlantImagesByType:(int)type; +-(NSMutableArray*)getPlantSeedImages; +-(UIImage*)getPlantSeedImageByIndex:(int)index; +@end diff --git a/ImageViewLearn/ImageManager.m b/ImageViewLearn/ImageManager.m new file mode 100644 index 0000000..56ab204 --- /dev/null +++ b/ImageViewLearn/ImageManager.m @@ -0,0 +1,235 @@ +// +// ImageManager.m +// PlantsVsZombies +// +// Created by Ron on 13-9-12. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "ImageManager.h" + +@implementation ImageManager +static NSMutableArray* zombie0Images=nil; +static NSMutableArray* zombie1Images=nil; +static NSMutableArray* zombie2Images=nil; +static NSMutableArray* zombie3Images=nil; +static NSMutableArray* zombie0DeadImages=nil; +static UIImage* zombie0DeadImage=nil; +static ImageManager* im=nil; +static UIImage* plant0Image=nil; +static UIImage* plant1Image=nil; +static UIImage* plant2Image=nil; +static UIImage* plant3Image=nil; +static UIImage* plant4Image=nil; +static NSMutableArray* plant0Images=nil; +static NSMutableArray* plant1Images=nil; +static NSMutableArray* plant2Images=nil; +static NSMutableArray* plant3Images=nil; +static NSMutableArray* plant4Images=nil; +static UIImage* zombie0Image=nil; +static UIImage* zombie1Image=nil; +static UIImage* zombie2Image=nil; +static UIImage* zombie3Image=nil; +static UIImage* plantSeedImage=nil; +static NSMutableArray* plantSeedImages=nil; ++(id)defaultManager{ + if(im==nil){ + im =[[ImageManager alloc]init]; + plantSeedImage=[[UIImage imageNamed:@"seedpackets.png"]retain]; + zombie0Image=[[UIImage imageNamed:@"zomb_0.png"]retain]; + zombie1Image=[[UIImage imageNamed:@"zomb_1.png"]retain]; + zombie2Image=[[UIImage imageNamed:@"zomb_2.png"]retain]; + zombie3Image=[[UIImage imageNamed:@"zomb_3.png"]retain]; + plant0Image=[[UIImage imageNamed:@"plant_0.png"]retain]; + plant1Image=[[UIImage imageNamed:@"plant_1.png"]retain]; + plant2Image=[[UIImage imageNamed:@"plant_2.png"]retain]; + plant3Image=[[UIImage imageNamed:@"plant_3.png"]retain]; + plant4Image=[[UIImage imageNamed:@"plant_4.png"]retain]; + zombie0DeadImage=[[UIImage imageNamed:@"zomb_d_0.png"]retain]; + + zombie0DeadImages=[[NSMutableArray array]retain]; + zombie0Images=[[NSMutableArray array]retain]; + zombie1Images=[[NSMutableArray array]retain]; + zombie2Images=[[NSMutableArray array]retain]; + zombie3Images=[[NSMutableArray array]retain]; + plant0Images=[[NSMutableArray array]retain]; + plant1Images=[[NSMutableArray array]retain]; + plant2Images=[[NSMutableArray array]retain]; + plant3Images=[[NSMutableArray array]retain]; + plant4Images=[[NSMutableArray array]retain]; + plantSeedImages=[[NSMutableArray array]retain]; + for(int i=0;i<4;i++){ + [im initZombieImagesByImage:[im getZombieImageByType:i] Type:i]; + + } + for(int i=0;i<5;i++){ + [im initPlantImagesByImage:[im getPlantImageByType:i] Type:i]; + } + + [im initZombieDeadImagesByImage:[im getZombieDeadImageByType:0] Type:0]; + + [im initPlantSeedImagesByImage:plantSeedImage]; + + + } + return im; +} +-(void)initZombieImagesByImage:(UIImage*)zombieImage Type:(int)type{ + for(int i=0;i<8;i++){ + CGImageRef subImage = CGImageCreateWithImageInRect(zombieImage.CGImage, CGRectMake(i*zombieImage.size.width/8, 0, zombieImage.size.width/8, zombieImage.size.height)); + switch (type) { + case 0:[zombie0Images addObject:[UIImage imageWithCGImage:subImage]];break; + case 1:[zombie1Images addObject:[UIImage imageWithCGImage:subImage]];break; + case 2:[zombie2Images addObject:[UIImage imageWithCGImage:subImage]];break; + case 3:[zombie3Images addObject:[UIImage imageWithCGImage:subImage]];break; + } + + //回收cgimage内存 + CGImageRelease(subImage); + } + +} +-(void)initZombieDeadImagesByImage:(UIImage*)zombieImage Type:(int)type{ + for(int i=0;i<4;i++){ + CGImageRef subImage = CGImageCreateWithImageInRect(zombieImage.CGImage, CGRectMake(i*zombieImage.size.width/4, 0, zombieImage.size.width/4, zombieImage.size.height)); + switch (type) { + case 0:[zombie0DeadImages addObject:[UIImage imageWithCGImage:subImage]];break; + case 1:break; + case 2:break; + case 3:break; + } + + //回收cgimage内存 + CGImageRelease(subImage); + } + +} +-(void)initPlantImagesByImage:(UIImage*)plantImage Type:(int)type{ + for(int i=0;i<8;i++){ + CGImageRef subImage = CGImageCreateWithImageInRect(plantImage.CGImage, CGRectMake(i*plantImage.size.width/8, 0, plantImage.size.width/8, plantImage.size.height)); + switch (type) { + case 0:[plant0Images addObject:[UIImage imageWithCGImage:subImage]];break; + case 1:[plant1Images addObject:[UIImage imageWithCGImage:subImage]];break; + case 2:[plant2Images addObject:[UIImage imageWithCGImage:subImage]];break; + case 3:[plant3Images addObject:[UIImage imageWithCGImage:subImage]];break; + case 4:[plant4Images addObject:[UIImage imageWithCGImage:subImage]];break; + } + + //回收cgimage内存 + CGImageRelease(subImage); + } + +} +-(void)initPlantSeedImagesByImage:(UIImage*)plantSeedImage{ + for(int i=0;i<5;i++){ + int index = 0; + switch (i) { + case 0: + index = 0; + break; + case 1: + index = 2; + break; + case 2: + index = 3; + break; + case 3: + index = 5; + break; + case 4: + index=10; + break; + } + CGImageRef subImage = CGImageCreateWithImageInRect(plantSeedImage.CGImage, CGRectMake(index*plantSeedImage.size.width/18, 0, plantSeedImage.size.width/18, plantSeedImage.size.height)); + [plantSeedImages addObject:[UIImage imageWithCGImage:subImage]]; + //回收cgimage内存 + CGImageRelease(subImage); + } + +} +-(UIImage*)getZombieImageByType:(int)type{ + switch (type) { + case 0: + return zombie0Image; + case 1: + return zombie1Image; + case 2: + return zombie2Image; + case 3: + return zombie3Image; + } + return nil; + +} +-(UIImage*)getZombieDeadImageByType:(int)type{ + switch (type) { + case 0: + return zombie0DeadImage; + case 1: + return zombie0DeadImage; + case 2: + return zombie0DeadImage; + case 3: + return zombie0DeadImage; + } + return nil; + +} +-(UIImage*)getPlantImageByType:(int)type{ + switch (type) { + case 0: + return plant0Image; + case 1: + return plant1Image; + case 2: + return plant2Image; + case 3: + return plant3Image; + case 4: + return plant4Image; + } + return nil; + +} +-(NSMutableArray*)getZombieImagesByType:(int)type{ + + switch (type) { + case 0:return zombie0Images; + case 1:return zombie1Images; + case 2:return zombie2Images; + case 3:return zombie3Images; + } + return nil; +} +-(NSMutableArray*)getZombieDeadImagesByType:(int)type{ + + switch (type) { + case 0:return zombie0DeadImages; + case 1:return nil; + case 2:return nil; + case 3:return nil; + } + return nil; +} +-(NSMutableArray*)getPlantImagesByType:(int)type{ + + switch (type) { + case 0:return plant0Images; + case 1:return plant1Images; + case 2:return plant2Images; + case 3:return plant3Images; + case 4:return plant4Images; + } + return nil; +} +-(NSMutableArray*)getPlantSeedImages{ + + return plantSeedImages; +} +-(UIImage*)getPlantSeedImageByIndex:(int)index{ + + return plantSeedImages[index]; +} + + +@end diff --git a/ImageViewLearn/NormalZombie.h b/ImageViewLearn/NormalZombie.h new file mode 100644 index 0000000..fec1c1a --- /dev/null +++ b/ImageViewLearn/NormalZombie.h @@ -0,0 +1,14 @@ +// +// Zombie.h +// ImageViewLearn +// +// Created by Ron on 13-9-2. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import +#import "ViewController.h" +#import "Zombie.h" +@interface NormalZombie : Zombie + +@end diff --git a/ImageViewLearn/NormalZombie.m b/ImageViewLearn/NormalZombie.m new file mode 100644 index 0000000..e6d33fc --- /dev/null +++ b/ImageViewLearn/NormalZombie.m @@ -0,0 +1,29 @@ +// +// Zombie.m +// ImageViewLearn +// +// Created by Ron on 13-9-2. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "NormalZombie.h" + +@implementation NormalZombie + + + +-(id)initWithZombieVC:(ViewController*)vc{ + + if(self=[super initWithZombieVC:vc]){ + + self.liftCount=5; + self.zombieImages= [[ImageManager defaultManager]getZombieImagesByType:0]; + self.image = self.zombieImages[0]; + + + } + return self; +} + + +@end diff --git a/ImageViewLearn/Plant.h b/ImageViewLearn/Plant.h new file mode 100644 index 0000000..a1c60b8 --- /dev/null +++ b/ImageViewLearn/Plant.h @@ -0,0 +1,17 @@ +// +// Plant.h +// PlantsVsZombies +// +// Created by Ron on 13-9-12. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import +#import "Plants.h" +#import "ImageManager.h" +@interface Plant : UIImageView +@property (nonatomic,assign)CGRect viewRect; +@property (nonatomic,assign)CGPoint viewLocation; +-(void)beginAnimation; +-(void)goToHell; +@end diff --git a/ImageViewLearn/Plant.m b/ImageViewLearn/Plant.m new file mode 100644 index 0000000..0872ad2 --- /dev/null +++ b/ImageViewLearn/Plant.m @@ -0,0 +1,74 @@ +// +// Plant.m +// PlantsVsZombies +// +// Created by Ron on 13-9-12. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "Plant.h" +#import "ViewController.h" +@implementation Plant +@synthesize costShine=_costShine; +@synthesize vc=_vc; +@synthesize plantImages=_plantImages; +@synthesize count=_count; +@synthesize lifeCount=_lifeCount; +@synthesize lineNum=_lineNum; +@synthesize shakeTimer=_shakeTimer; +@synthesize shootTimer=_shootTimer; +@synthesize shineTimer=_shineTimer; + +-(void)beginAnimation{ + + //************// + NSLog(@"flower life:%i",[self retainCount]); + self.viewRect=[self convertRect:self.frame toView:self.vc.view]; + self.viewLocation=[self convertPoint:self.center toView:self.vc.view]; + if([self respondsToSelector:@selector(shake:)]) + self.shakeTimer =[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(shake:) userInfo:nil repeats:YES]; + if([self respondsToSelector:@selector(shoot:)]) + self.shootTimer =[NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(shoot:) userInfo:nil repeats:YES]; + if([self respondsToSelector:@selector(comingSunshine)]) + self.shineTimer=[NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(comingSunshine) userInfo:nil repeats:YES]; + NSLog(@"flower life:%i",[self retainCount]); + +} + +-(void)shake:(NSTimer*)timer{ + if(self.count==8) + self.count=0; + + self.image = self.animationImages[self.count]; + self.count+=1; + + +} +-(void)goToHell{ + NSLog(@"----plant go to hell---"); + NSLog(@"init %i",[self retainCount]); + if(self.shakeTimer!=nil){ + [self.shakeTimer invalidate]; + NSLog(@"shake: %i",[self retainCount]); + } + if(self.shootTimer!=nil){ + [self.shootTimer invalidate]; + NSLog(@"shoot: %i",[self retainCount]); + } + if(self.shineTimer!=nil){ + [self.shineTimer invalidate]; + NSLog(@"shine: %i",[self retainCount]); + + } + + //[self release]; + NSLog(@"dead Plant:retainCount:%i",[self retainCount]); + [self.vc.allPlants[self.lineNum] removeObject:self]; + NSLog(@"dead Plant:retainCount:%i",[self retainCount]); + [self removeFromSuperview]; + + + +} + +@end diff --git a/ImageViewLearn/PlantSimpleFactory.h b/ImageViewLearn/PlantSimpleFactory.h new file mode 100644 index 0000000..6c0e9d0 --- /dev/null +++ b/ImageViewLearn/PlantSimpleFactory.h @@ -0,0 +1,13 @@ +// +// PlantSimpleFactory.h +// PlantsVsZombies +// +// Created by Ron on 13-9-12. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import +#import "Plant.h" +@interface PlantSimpleFactory : NSObject +-(Plant*)createPlantWithType:(int)type Frame:(CGRect)frame; +@end diff --git a/ImageViewLearn/PlantSimpleFactory.m b/ImageViewLearn/PlantSimpleFactory.m new file mode 100644 index 0000000..d2978e7 --- /dev/null +++ b/ImageViewLearn/PlantSimpleFactory.m @@ -0,0 +1,40 @@ +// +// PlantSimpleFactory.m +// PlantsVsZombies +// +// Created by Ron on 13-9-12. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "PlantSimpleFactory.h" +#import "Shooter.h" +#import "SunFlower.h" +#import "IceShooter.h" +#import "BigNut.h" +#import "Torch.h" +@interface PlantSimpleFactory() + +@property (nonatomic,retain)NSMutableArray* plantClasses; + +@end +@implementation PlantSimpleFactory +-(id)init{ + if(self=[super init]){ + self.plantClasses=[NSMutableArray arrayWithObjects:[SunFlower class],[Shooter class],[IceShooter class],[BigNut class],[Torch class], nil]; + + + } + return self; +} +//************// +-(id)createPlantWithType:(int)type Frame:(CGRect)frame{ + + return [[self.plantClasses[type] alloc]initWithFrame:frame]; + +} + +-(void)dealloc{ + self.plantClasses=nil; + [super dealloc]; +} +@end diff --git a/ImageViewLearn/Plants.h b/ImageViewLearn/Plants.h new file mode 100644 index 0000000..644dd5b --- /dev/null +++ b/ImageViewLearn/Plants.h @@ -0,0 +1,28 @@ +// +// Plants.h +// PlantsVsZombies +// +// Created by Ron on 13-9-12. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import +@class ViewController; +@protocol Plants +@property(nonatomic,assign)unsigned int count; +@property(nonatomic,assign)unsigned int costShine; +@property (nonatomic,assign)int lifeCount; +@property (nonatomic,assign)ViewController* vc; +@property (nonatomic,assign)NSMutableArray* plantImages; +@property (nonatomic,assign)NSTimer* shakeTimer; +-(void)shake:(NSTimer*)timer; +@property (nonatomic,assign)unsigned int lineNum; + +@optional +//@property (nonatomic,assign)NSTimer* fireTimer; +@property (nonatomic,assign)NSTimer* shootTimer; +@property (nonatomic,assign)NSTimer* shineTimer; +-(void)shoot:(NSTimer*)timer; + +-(void)comingSunshine; +@end diff --git a/ImageViewLearn/ImageViewLearn-Info.plist b/ImageViewLearn/PlantsVsZombies-Info.plist similarity index 85% rename from ImageViewLearn/ImageViewLearn-Info.plist rename to ImageViewLearn/PlantsVsZombies-Info.plist index df0521b..a214424 100644 --- a/ImageViewLearn/ImageViewLearn-Info.plist +++ b/ImageViewLearn/PlantsVsZombies-Info.plist @@ -9,7 +9,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - Ron.Tarena.${PRODUCT_NAME:rfc1034identifier} + com.ron.${PRODUCT_NAME:rfc1034identifier} CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -30,8 +30,6 @@ UISupportedInterfaceOrientations - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight diff --git a/ImageViewLearn/ImageViewLearn-Prefix.pch b/ImageViewLearn/PlantsVsZombies-Prefix.pch similarity index 100% rename from ImageViewLearn/ImageViewLearn-Prefix.pch rename to ImageViewLearn/PlantsVsZombies-Prefix.pch diff --git a/ImageViewLearn/RoadBlockZombie.h b/ImageViewLearn/RoadBlockZombie.h new file mode 100644 index 0000000..7707231 --- /dev/null +++ b/ImageViewLearn/RoadBlockZombie.h @@ -0,0 +1,12 @@ +// +// RoadBlockZombie.h +// PlantsVsZombies +// +// Created by Ron on 13-9-3. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import +#import "Zombie.h" +@interface RoadBlockZombie :Zombie +@end diff --git a/ImageViewLearn/RoadBlockZombie.m b/ImageViewLearn/RoadBlockZombie.m new file mode 100644 index 0000000..4a54ad2 --- /dev/null +++ b/ImageViewLearn/RoadBlockZombie.m @@ -0,0 +1,27 @@ +// +// RoadBlockZombie.m +// PlantsVsZombies +// +// Created by Ron on 13-9-3. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "RoadBlockZombie.h" +#import "ViewController.h" +@implementation RoadBlockZombie + + +-(id)initWithZombieVC:(ViewController*)vc{ + + if(self=[super initWithZombieVC:vc]){ + self.liftCount=10; + self.zombieImages= [[ImageManager defaultManager]getZombieImagesByType:1]; + self.image = self.zombieImages[0]; + + + } + return self; +} + + +@end diff --git a/ImageViewLearn/ShadeView.h b/ImageViewLearn/ShadeView.h new file mode 100644 index 0000000..0ab788c --- /dev/null +++ b/ImageViewLearn/ShadeView.h @@ -0,0 +1,13 @@ +// +// ShadeView.h +// PlantsVsZombies +// +// Created by Ron on 13-9-14. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import + +@interface ShadeView : UIView +@property (nonatomic,assign)NSMutableArray* shadeViews; +@end diff --git a/ImageViewLearn/ShadeView.m b/ImageViewLearn/ShadeView.m new file mode 100644 index 0000000..b07c5fb --- /dev/null +++ b/ImageViewLearn/ShadeView.m @@ -0,0 +1,36 @@ +// +// ShadeView.m +// PlantsVsZombies +// +// Created by Ron on 13-9-14. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "ShadeView.h" + +@implementation ShadeView + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + self.backgroundColor=[UIColor blackColor]; + self.alpha=0.6; + } + return self; +} + +-(void)canGetPlantSeed{ + NSLog(@"----shadeViews count:%i",self.shadeViews.count); + [self removeFromSuperview]; + [self.shadeViews removeObject:self]; + [self release]; + +} + +-(void)dealloc{ + NSLog(@"shadeView dead"); + [super dealloc]; + +} +@end diff --git a/ImageViewLearn/Shooter.h b/ImageViewLearn/Shooter.h new file mode 100644 index 0000000..2cc2df0 --- /dev/null +++ b/ImageViewLearn/Shooter.h @@ -0,0 +1,13 @@ +// +// Shooter.h +// ImageViewLearn +// +// Created by Ron on 13-9-2. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import +#import "Plant.h" +@interface Shooter : Plant + +@end diff --git a/ImageViewLearn/Shooter.m b/ImageViewLearn/Shooter.m new file mode 100644 index 0000000..b23075b --- /dev/null +++ b/ImageViewLearn/Shooter.m @@ -0,0 +1,43 @@ +// +// Shooter.m +// ImageViewLearn +// +// Created by Ron on 13-9-2. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "Shooter.h" +#import "Bullet.h" + +@implementation Shooter + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + self.costShine=100; + [self setUserInteractionEnabled:YES]; + self.animationImages= [[ImageManager defaultManager]getPlantImagesByType:1]; + self.image = self.animationImages[0]; + self.lifeCount=10; + } + return self; +} + +-(void)shoot:(NSTimer*)timer{ + + Bullet* bullet= [self.vc.bulletPool getBullet]; + bullet.frame=CGRectMake(self.viewLocation.x+10, self.viewLocation.y-16, 15, 15); + bullet.lineNum=self.lineNum; + bullet.bulletState=0; + bullet.fireIndex=-1; + [bullet changePicture]; + bullet.myLineZombies=self.vc.allZombies[self.lineNum]; + bullet.myLinePlants=self.vc.allPlants[self.lineNum]; + [self.vc.allBullets addObject:bullet]; + [self.vc.view addSubview:bullet]; + + +} + +@end diff --git a/ImageViewLearn/Shovel.h b/ImageViewLearn/Shovel.h new file mode 100644 index 0000000..65f966f --- /dev/null +++ b/ImageViewLearn/Shovel.h @@ -0,0 +1,14 @@ +// +// Shovel.h +// PlantsVsZombies +// +// Created by Ron on 13-9-13. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import +@class ViewController; + +@interface Shovel : UIImageView +@property (nonatomic,assign)ViewController* vc; +@end diff --git a/ImageViewLearn/Shovel.m b/ImageViewLearn/Shovel.m new file mode 100644 index 0000000..af3dd6a --- /dev/null +++ b/ImageViewLearn/Shovel.m @@ -0,0 +1,27 @@ +// +// Shovel.m +// PlantsVsZombies +// +// Created by Ron on 13-9-13. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "Shovel.h" +#import "ViewController.h" +@implementation Shovel +static UIImage* shovelImage=nil; +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + if(shovelImage==nil) + shovelImage=[[UIImage imageNamed:@"shovel.png"]retain]; + self.image=shovelImage; + [self setUserInteractionEnabled:YES]; + } + return self; +} + + + +@end diff --git a/ImageViewLearn/SportZombie.h b/ImageViewLearn/SportZombie.h new file mode 100644 index 0000000..c336776 --- /dev/null +++ b/ImageViewLearn/SportZombie.h @@ -0,0 +1,13 @@ +// +// SportZombie.h +// PlantsVsZombies +// +// Created by Ron on 13-9-3. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import +#import "Zombie.h" +@interface SportZombie : Zombie + +@end diff --git a/ImageViewLearn/SportZombie.m b/ImageViewLearn/SportZombie.m new file mode 100644 index 0000000..815badd --- /dev/null +++ b/ImageViewLearn/SportZombie.m @@ -0,0 +1,29 @@ +// +// SportZombie.m +// PlantsVsZombies +// +// Created by Ron on 13-9-3. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "SportZombie.h" + +@implementation SportZombie + + +-(id)initWithZombieVC:(ViewController*)vc{ + + if(self=[super initWithZombieVC:vc]){ + + self.speed=1; + self.liftCount=3; + self.zombieImages= [[ImageManager defaultManager]getZombieImagesByType:3]; + self.image = self.zombieImages[0]; + + + } + return self; +} + + +@end diff --git a/ImageViewLearn/SunFlower.h b/ImageViewLearn/SunFlower.h new file mode 100644 index 0000000..7d71fee --- /dev/null +++ b/ImageViewLearn/SunFlower.h @@ -0,0 +1,13 @@ +// +// SunFlower.h +// PlantsVsZombies +// +// Created by Ron on 13-9-12. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import +#import "Plant.h" +@interface SunFlower : Plant + +@end diff --git a/ImageViewLearn/SunFlower.m b/ImageViewLearn/SunFlower.m new file mode 100644 index 0000000..9878af9 --- /dev/null +++ b/ImageViewLearn/SunFlower.m @@ -0,0 +1,48 @@ +// +// SunFlower.m +// PlantsVsZombies +// +// Created by Ron on 13-9-12. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "SunFlower.h" +#import "SunShine.h" +#import "ViewController.h" +@implementation SunFlower + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + self.costShine=50; + [self setUserInteractionEnabled:YES]; + self.animationImages= [[ImageManager defaultManager]getPlantImagesByType:0]; + self.image = self.animationImages[0]; + self.lifeCount=5; + + } + return self; +} + +-(void)comingSunshine{ + CGPoint p= [self convertPoint:self.center toView:self.vc.view]; + SunShine* current=[[SunShine alloc]initWithVC:self.vc x:p.x y:p.y]; + [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(cleanSunshine:) userInfo:current repeats:NO]; +} +-(void)cleanSunshine:(NSTimer*)timer{ + SunShine* sun=timer.userInfo; + if(sun.superview!=nil){ + [sun removeFromSuperview]; + //if([sun gestureRecognizers].count!=0) + [sun removeGestureRecognizer:[[sun gestureRecognizers]lastObject]]; + [sun release]; + + + } +} +-(void)dealloc{ + NSLog(@"Flower dead"); + [super dealloc]; +} +@end diff --git a/ImageViewLearn/SunShine.h b/ImageViewLearn/SunShine.h new file mode 100644 index 0000000..2050fcf --- /dev/null +++ b/ImageViewLearn/SunShine.h @@ -0,0 +1,14 @@ +// +// SunShine.h +// PlantsVsZombies +// +// Created by Ron on 13-9-13. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import +@class ViewController; +@interface SunShine : UIImageView +@property (nonatomic,assign)ViewController* vc; +-(id)initWithVC:(ViewController *)vc x:(int)x y:(int)y; +@end diff --git a/ImageViewLearn/SunShine.m b/ImageViewLearn/SunShine.m new file mode 100644 index 0000000..a9fbe29 --- /dev/null +++ b/ImageViewLearn/SunShine.m @@ -0,0 +1,73 @@ +// +// SunShine.m +// PlantsVsZombies +// +// Created by Ron on 13-9-13. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "SunShine.h" +#import "ViewController.h" +@implementation SunShine +{ + UITapGestureRecognizer* tap; + NSTimer* timer; +} +static UIImage* sunShineImage=nil; + + +-(id)initWithVC:(ViewController *)vc x:(int)x y:(int)y{ + if(self=[super init]){ + self.vc=vc; + if(sunShineImage==nil){ + sunShineImage=[UIImage imageNamed:@"sun.png"]; + } + if(sunShineImage==nil) + sunShineImage=[[UIImage imageNamed:@"sun.png"]retain]; + self.image=sunShineImage; + tap=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(beginAnimation)]; + [self setUserInteractionEnabled:YES]; + [self addGestureRecognizer:tap]; + [tap release]; + //timer=[NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(disappear) userInfo:nil repeats:NO]; + + self.frame=CGRectMake(x+10, y-5, 35, 35); + self.tag=1234; + self.image =sunShineImage; + [self.vc.view addSubview:self]; + + } + return self; +} +-(void)beginAnimation{ + + // NSLog(@"Tap me"); + self.vc.shineCount+=25; + self.vc.shineLabel.text=[NSString stringWithFormat:@"%i",self.vc + .shineCount]; + [UIView beginAnimations:@"getSunShine" context:nil]; + [UIView setAnimationCurve:UIViewAnimationCurveLinear]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(disappear)]; + self.center=CGPointMake(35, 15); + [UIView commitAnimations]; + + +} +-(void)disappear{ + //[timer invalidate]; + if(self.superview!=nil){ + [self removeFromSuperview]; + //if([self gestureRecognizers].count!=0) + [self removeGestureRecognizer:tap]; + [self release]; + } + + +} +-(void)dealloc{ + //NSLog(@"sunShine dead"); + [super dealloc]; +} + +@end diff --git a/ImageViewLearn/Torch.h b/ImageViewLearn/Torch.h new file mode 100644 index 0000000..93e19f2 --- /dev/null +++ b/ImageViewLearn/Torch.h @@ -0,0 +1,13 @@ +// +// Torch.h +// PlantsVsZombies +// +// Created by Ron on 13-9-16. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "Plant.h" + +@interface Torch : Plant + +@end diff --git a/ImageViewLearn/Torch.m b/ImageViewLearn/Torch.m new file mode 100644 index 0000000..66de229 --- /dev/null +++ b/ImageViewLearn/Torch.m @@ -0,0 +1,37 @@ +// +// Torch.m +// PlantsVsZombies +// +// Created by Ron on 13-9-16. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "Torch.h" + +@implementation Torch + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + self.costShine=175; + [self setUserInteractionEnabled:YES]; + self.animationImages= [[ImageManager defaultManager]getPlantImagesByType:4]; + self.image = self.animationImages[0]; + self.lifeCount=100; + self.tag=123; + } + return self; +} + + +/* +// Only override drawRect: if you perform custom drawing. +// An empty implementation adversely affects performance during animation. +- (void)drawRect:(CGRect)rect +{ + // Drawing code +} +*/ + +@end diff --git a/ImageViewLearn/ViewController.h b/ImageViewLearn/ViewController.h index 6583182..1a7c249 100644 --- a/ImageViewLearn/ViewController.h +++ b/ImageViewLearn/ViewController.h @@ -8,6 +8,31 @@ #import +#import "BulletPool.h" +#import "ZombiePool.h" +#import "Plant.h" +#import "Shovel.h" +#import "ShadeView.h" +#import "Shooter.h" @interface ViewController : UIViewController - +@property (nonatomic,assign)ShadeView* currentShadeView; +@property (nonatomic,assign)NSMutableArray* shadeViews; +@property (nonatomic,assign)unsigned int shineCount; +@property (nonatomic,assign)unsigned int failCount; +@property (nonatomic,assign)Plant * dragPlant; +@property (retain, nonatomic) IBOutlet UILabel *shineLabel; +@property (nonatomic,retain)Shovel* dragShovel; +@property (nonatomic,assign)unsigned int killCount; +@property (retain, nonatomic) IBOutlet UIImageView *shovelBK; +@property (nonatomic,retain)NSTimer* playTimer; +@property (nonatomic,retain)NSTimer* shakeTimer; +@property (nonatomic,retain)NSTimer* shootTimer; +@property (retain, nonatomic) IBOutletCollection(UIView) NSArray *plantBlocks; +@property (retain, nonatomic) IBOutletCollection(UIImageView) NSArray *plantSeeds; +@property (retain,nonatomic)BulletPool* bulletPool; +@property (retain,nonatomic)ZombiePool* zombiePool; +@property (retain,nonatomic)NSMutableArray* allZombies; +@property (retain,nonatomic)NSMutableArray* allPlants; +@property (retain,nonatomic)NSMutableArray* allBullets; +- (IBAction)planting:(UIPanGestureRecognizer *)sender; @end diff --git a/ImageViewLearn/ViewController.m b/ImageViewLearn/ViewController.m index a332257..492d036 100644 --- a/ImageViewLearn/ViewController.m +++ b/ImageViewLearn/ViewController.m @@ -5,10 +5,18 @@ // Created by Ron on 13-9-2. // Copyright (c) 2013年 Apple.org. All rights reserved. // - +//就差个对象池 #import "ViewController.h" - +#import "ZombieSimpleFactory.h" +#import "PlantSimpleFactory.h" +#import "Zombie.h" @interface ViewController () +@property (nonatomic,retain)ZombieSimpleFactory* zombieFactory; +@property (nonatomic,retain)PlantSimpleFactory* plantFactory; +//@property (nonatomic,retain)NSMutableArray* shooters; +@property (nonatomic,retain)NSTimer* allZombiesMoveTimer; +@property (nonatomic,retain)NSTimer* allBulletMoveTimer; + @end @@ -17,13 +25,264 @@ @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. + [[UIApplication sharedApplication] setStatusBarHidden:YES]; + [self initUI]; + self.shineCount=100; + self.killCount=0; + self.failCount=0; + self.shadeViews=[[NSMutableArray array]retain]; + NSMutableArray* line1Plants=[NSMutableArray array]; + NSMutableArray* line2Plants=[NSMutableArray array]; + NSMutableArray* line3Plants=[NSMutableArray array]; + NSMutableArray* line4Plants=[NSMutableArray array]; + NSMutableArray* line5Plants=[NSMutableArray array]; + self.allBullets=[NSMutableArray array]; + + self.allPlants=[NSMutableArray arrayWithObjects:line1Plants,line2Plants,line3Plants,line4Plants,line5Plants, nil]; + self.playTimer=[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(playZombie:) userInfo:nil repeats:YES]; + self.zombieFactory=[[[ZombieSimpleFactory alloc]initWithVC:self]autorelease]; + + self.plantFactory=[[[PlantSimpleFactory alloc]init]autorelease]; + + self.zombiePool=[[ZombiePool alloc]initWithFactory:self.zombieFactory]; + + self.bulletPool=[[BulletPool alloc]initWithVC:self]; + NSMutableOrderedSet* line1Zombies=[NSMutableOrderedSet orderedSet]; + NSMutableOrderedSet* line2Zombies=[NSMutableOrderedSet orderedSet]; + NSMutableOrderedSet* line3Zombies=[NSMutableOrderedSet orderedSet]; + NSMutableOrderedSet* line4Zombies=[NSMutableOrderedSet orderedSet]; + NSMutableOrderedSet* line5Zombies=[NSMutableOrderedSet orderedSet]; + self.allZombies=[NSMutableArray arrayWithObjects:line1Zombies,line2Zombies,line3Zombies,line4Zombies,line5Zombies, nil]; + + +} +-(void)viewDidAppear:(BOOL)animated{ + + + self.allBulletMoveTimer=[NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(moveAllBullets) userInfo:nil repeats:YES]; + self.allZombiesMoveTimer=[NSTimer scheduledTimerWithTimeInterval:0.08 target:self selector:@selector(moveAllZombies) userInfo:nil repeats:YES]; + +} +-(void)moveAllZombies{ + for (NSMutableArray* zombs in self.allZombies) { + + for (int i=0;i +#import "Zombies.h" +@interface Zombie : UIImageView +@property (nonatomic,retain)NSMutableArray* myLinePlants; +@end diff --git a/ImageViewLearn/Zombie.m b/ImageViewLearn/Zombie.m new file mode 100644 index 0000000..a08e45c --- /dev/null +++ b/ImageViewLearn/Zombie.m @@ -0,0 +1,127 @@ +// +// Zombie.m +// PlantsVsZombies +// +// Created by Ron on 13-9-12. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "Zombie.h" + +@implementation Zombie + +@synthesize offset=_offset; +@synthesize speed=_speed; +@synthesize vc=_vc; +@synthesize liftCount=_liftCount; +@synthesize count=_count; +@synthesize zombieImages=_zombieImages; +@synthesize deadCount=_deadCount; +//@synthesize moveTimer=_moveTimer; +@synthesize slowDownCount=_slowDownCount; +@synthesize lineNum=_lineNum; +@synthesize type=_type; +-(id)initWithZombieVC:(ViewController*)vc{ + + if(self=[super init]){ + self.slowDownCount=-1; + self.offset=3; + self.vc=vc; + self.speed=0; + //self.lineNum=arc4random()%5; + //self.myLinePlants=self.vc.allPlants[self.lineNum]; + //self.frame=CGRectMake(480,42+58*(self.lineNum)-26, 45, 88); + [self.vc.allZombies[self.lineNum] addObject:self]; + [self setContentMode:UIViewContentModeScaleAspectFill]; + + + } + return self; +} +-(void)goToHell{ + //NSLog(@"oh,god forgive me"); + //if(self.moveTimer) + //[self.moveTimer invalidate]; + self.animationImages=[[ImageManager defaultManager]getZombieDeadImagesByType:0]; + self.offset=0; + self.count=0; + + + + +} +//-(void)deadAnimation:(NSTimer*)timer{ +// +// self.image=self.animationImages[self.deadCount]; +// self.deadCount+=1; +// NSLog(@"dead Animation"); +// if(self.deadCount==self.animationImages.count){ +// [self removeFromSuperview]; +// [timer invalidate]; +// [self.vc.allZombies[self.lineNum] removeObject:self]; +// [self.vc.zombiePool addZombie:self]; +// +// +// } +//} +-(void)move{ + //NSLog(@"move..."); + if(self.count==self.animationImages.count){ + if(self.animationImages.count!=4) + self.count=0; + else{ + [self removeFromSuperview]; + [self.vc.allZombies[self.lineNum] removeObject:self]; + [self.vc.zombiePool addZombie:self]; + return; + } + + + } + self.image=self.animationImages[self.count]; + self.count+=1; + //------------------ + for(int i=0;i<_myLinePlants.count;i++){ + Plant* plant=_myLinePlants[i]; + + if(CGRectContainsPoint(self.frame, plant.viewLocation)){ + plant.lifeCount-=1; + if(plant.lifeCount==0){ + [plant goToHell]; + + } + return; + + } + + } + //------------------- + self.center = CGPointMake(self.center.x-self.offset, self.center.y); + //------------------- + if(self.slowDownCount>0) + self.slowDownCount-=1; + else if(self.slowDownCount==0){ + self.offset=3; + self.alpha=1; + } + //------------------ + if(self.center.x<=-25){ + + self.vc.failCount+=1; + [self removeFromSuperview]; + [self.vc.allZombies[self.lineNum] removeObject:self]; + [self.vc.zombiePool addZombie:self]; + // NSLog(@"go to house..."); + return; + } + + + +} +-(void)dealloc{ + NSLog(@"dead Zombie"); + //[_moveTimer release]; + [super dealloc]; +} + +@end diff --git a/ImageViewLearn/ZombiePool.h b/ImageViewLearn/ZombiePool.h new file mode 100644 index 0000000..1086a2b --- /dev/null +++ b/ImageViewLearn/ZombiePool.h @@ -0,0 +1,22 @@ +// +// ZombiePool.h +// PlantsVsZombies +// +// Created by Ron on 13-9-16. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import + + +@class Zombie; +@class ZombieSimpleFactory; +@interface ZombiePool : NSObject + + + +-(id)initWithFactory:(ZombieSimpleFactory*)factory; +-(Zombie*)getZombie; +-(void)addZombie:(Zombie*)zombie; + +@end diff --git a/ImageViewLearn/ZombiePool.m b/ImageViewLearn/ZombiePool.m new file mode 100644 index 0000000..0f80181 --- /dev/null +++ b/ImageViewLearn/ZombiePool.m @@ -0,0 +1,67 @@ +// +// ZombiePool.m +// PlantsVsZombies +// +// Created by Ron on 13-9-16. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "ZombiePool.h" +#import "ZombieSimpleFactory.h" +@interface ZombiePool() +@property (nonatomic,retain)NSMutableArray* allZombies; +@property (nonatomic,assign)ZombieSimpleFactory* zombieFactory; +@end +@implementation ZombiePool +-(id)initWithFactory:(ZombieSimpleFactory *)factory{ + if(self=[super init]){ + self.zombieFactory=factory; + self.allZombies=[NSMutableArray array]; + [self createAllZombies]; + + } + return self; +} +-(void)createAllZombies{ + + for(int i=0;i<250;i++){ + int type=arc4random()%4; + Zombie* zombie=[self.zombieFactory createZombieWithType:type]; + zombie.type=type; + [self.allZombies addObject:zombie]; + + //最后一个创建的僵尸有问题 + } +} + +-(Zombie*)getZombie{ + Zombie* zombie=[self.allZombies lastObject]; + [self.allZombies removeLastObject] ; + zombie.animationImages=[[ImageManager defaultManager]getZombieImagesByType:zombie.type]; + zombie.count=0; + zombie.lineNum=arc4random()%5; + zombie.frame=CGRectMake(480,42+58*(zombie.lineNum), 45, 78); + if (zombie.lineNum==0) { + zombie.center=CGPointMake(480, zombie.center.y-5); + } + if(zombie.lineNum!=0){ + + zombie.center=CGPointMake(480, zombie.center.y-20); + } + if(zombie.lineNum==3||zombie.lineNum==4){ + zombie.center=CGPointMake(480, zombie.center.y-15); + + + } + zombie.slowDownCount=0; + zombie.liftCount=2; + zombie.offset=3; + zombie.alpha=1; + + return zombie; +} + +-(void)addZombie:(Zombie*)zombie{ + [self.allZombies addObject:zombie]; +} +@end diff --git a/ImageViewLearn/ZombieSimpleFactory.h b/ImageViewLearn/ZombieSimpleFactory.h new file mode 100644 index 0000000..d2fcb3e --- /dev/null +++ b/ImageViewLearn/ZombieSimpleFactory.h @@ -0,0 +1,16 @@ +// +// ZombieFactory.h +// PlantsVsZombies +// +// Created by Ron on 13-9-3. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import +#import "ViewController.h" +#import "Zombie.h" +@interface ZombieSimpleFactory : NSObject +@property (nonatomic,assign)ViewController* vc; +-(id)initWithVC:(ViewController*)vc; +-(Zombie*)createZombieWithType:(int)type; +@end diff --git a/ImageViewLearn/ZombieSimpleFactory.m b/ImageViewLearn/ZombieSimpleFactory.m new file mode 100644 index 0000000..e5dae1d --- /dev/null +++ b/ImageViewLearn/ZombieSimpleFactory.m @@ -0,0 +1,40 @@ +// +// ZombieFactory.m +// PlantsVsZombies +// +// Created by Ron on 13-9-3. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import "ZombieSimpleFactory.h" + +#import "NormalZombie.h" +#import "DrumZombie.h" +#import "RoadBlockZombie.h" +#import "SportZombie.h" +@interface ZombieSimpleFactory() + +@property (nonatomic,retain)NSMutableArray* zombieClasses; +@end + +@implementation ZombieSimpleFactory + +-(id)initWithVC:(ViewController *)vc{ + if(self=[super init]){ + self.zombieClasses=[[[NSMutableArray alloc]initWithObjects:[NormalZombie class],[DrumZombie class],[RoadBlockZombie class],[SportZombie class], nil]autorelease]; + + _vc=vc; + } + return self; +} +-(id)createZombieWithType:(int)type{ + + return [[self.zombieClasses[type] alloc]initWithZombieVC:_vc]; + +} +-(void)dealloc{ + self.zombieClasses=nil; + [super dealloc]; + +} +@end diff --git a/ImageViewLearn/Zombies.h b/ImageViewLearn/Zombies.h new file mode 100644 index 0000000..d9b26ba --- /dev/null +++ b/ImageViewLearn/Zombies.h @@ -0,0 +1,31 @@ +// +// Zombie.h +// PlantsVsZombies +// +// Created by Ron on 13-9-3. +// Copyright (c) 2013年 Apple.org. All rights reserved. +// + +#import +#import "ViewController.h" +#import "ImageManager.h" +@protocol Zombies +@property (nonatomic,assign)int type; +@property (nonatomic,assign)int slowDownCount;//slowDownCount +@property (nonatomic,assign)double offset;//step +@property (nonatomic ,assign)double speed;//timer +@property(nonatomic,assign)unsigned int count;//animation +@property(nonatomic,assign)unsigned int deadCount;//dead animation +@property (nonatomic,assign)ViewController* vc;//delegate +@property (nonatomic,assign)NSMutableArray* zombieImages;//animation images +//@property (nonatomic,assign)NSTimer* moveTimer;//move timer +@property (nonatomic,assign)unsigned int lineNum; +-(void)move;// move +-(void)goToHell;// death +@property (nonatomic,assign)int liftCount;// hp + + +@optional +-(id)initWithZombieVC:(ViewController*)vc; + +@end diff --git a/ImageViewLearn/bk1.png b/ImageViewLearn/bk1.png new file mode 100755 index 0000000..b742b49 Binary files /dev/null and b/ImageViewLearn/bk1.png differ diff --git a/ImageViewLearn/bullet_0.png b/ImageViewLearn/bullet_0.png new file mode 100755 index 0000000..8726a90 Binary files /dev/null and b/ImageViewLearn/bullet_0.png differ diff --git a/ImageViewLearn/bullet_1.png b/ImageViewLearn/bullet_1.png new file mode 100755 index 0000000..611d3d0 Binary files /dev/null and b/ImageViewLearn/bullet_1.png differ diff --git a/ImageViewLearn/bullet_2.png b/ImageViewLearn/bullet_2.png new file mode 100755 index 0000000..d75cd61 Binary files /dev/null and b/ImageViewLearn/bullet_2.png differ diff --git a/ImageViewLearn/en.lproj/ViewController.xib b/ImageViewLearn/en.lproj/ViewController.xib index 18825b5..bfc463e 100644 --- a/ImageViewLearn/en.lproj/ViewController.xib +++ b/ImageViewLearn/en.lproj/ViewController.xib @@ -1,17 +1,20 @@ - 1536 - 12A269 - 2835 - 1187 - 624.00 + 1552 + 12D78 + 3084 + 1187.37 + 626.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1919 + 2083 IBProxyObject + IBUIImageView + IBUILabel + IBUIPanGestureRecognizer IBUIView @@ -33,19 +36,656 @@ 274 - {{0, 20}, {320, 548}} + + + + 256 + {{0, -59}, {677, 460}} + + + + NO + YES + 4 + NO + IBCocoaTouchFramework + + NSImage + bk1.png + + + + + 292 + {{18, 1}, {55, 49}} + + + + _NS:9 + NO + IBCocoaTouchFramework + + NSImage + sunbank.png + + + + + 292 + {{72, 1}, {254, 49}} + + + + _NS:9 + NO + IBCocoaTouchFramework + + NSImage + seedbank.png + + + + + 292 + {{327, 1}, {52, 49}} + + + + _NS:9 + + IBCocoaTouchFramework + + NSImage + shovel_bk.png + + + + + 292 + {{116, 0}, {41, 49}} + + + + _NS:9 + 1 + + IBCocoaTouchFramework + + + + 292 + {{160, 0}, {41, 49}} + + + + _NS:9 + 2 + + IBCocoaTouchFramework + + + + 292 + {{72, 0}, {41, 49}} + + + + _NS:9 + + IBCocoaTouchFramework + + + + 292 + {{204, 0}, {41, 49}} + + + + _NS:9 + 3 + + IBCocoaTouchFramework + + + + 292 + {{248, 0}, {41, 49}} + + + + _NS:9 + 4 + + IBCocoaTouchFramework + + + + 292 + {{20, 31}, {50, 21}} + + + + _NS:9 + NO + YES + 2 + NO + IBCocoaTouchFramework + 10000 + + 1 + MCAwIDAAA + darkTextColor + + + 0 + 1 + + Helvetica + Helvetica + 0 + 16 + + + Helvetica + 16 + 16 + + NO + + + + 292 + {{58, 50}, {41, 58}} + + + + _NS:9 + + 3 + MCAwAA + + IBCocoaTouchFramework + + + + 292 + {{58, 100}, {41, 58}} + + + + _NS:9 + + 1 + IBCocoaTouchFramework + + + + 292 + + {{58, 155}, {41, 58}} + + + + _NS:9 + + 2 + IBCocoaTouchFramework + + + + 292 + {{58, 207}, {41, 58}} + + + + _NS:9 + + 3 + IBCocoaTouchFramework + + + + 292 + {{58, 259}, {41, 58}} + + + + _NS:9 + + 4 + IBCocoaTouchFramework + + + + 292 + + {{102, 50}, {41, 58}} + + + + _NS:9 + + IBCocoaTouchFramework + + + + 292 + {{102, 100}, {41, 58}} + + + + _NS:9 + + 1 + IBCocoaTouchFramework + + + + 292 + {{102, 155}, {41, 58}} + + + + _NS:9 + + 2 + IBCocoaTouchFramework + + + + 292 + {{102, 207}, {41, 58}} + + + + _NS:9 + + 3 + IBCocoaTouchFramework + + + + 292 + {{102, 259}, {41, 58}} + + + + _NS:9 + + 4 + IBCocoaTouchFramework + + + + 292 + {{146, 50}, {41, 58}} + + + + _NS:9 + + IBCocoaTouchFramework + + + + 292 + {{146, 100}, {41, 58}} + + + + _NS:9 + + 1 + IBCocoaTouchFramework + + + + 292 + {{146, 155}, {41, 58}} + + + + _NS:9 + + 2 + IBCocoaTouchFramework + + + + 292 + {{146, 207}, {41, 58}} + + + + _NS:9 + + 3 + IBCocoaTouchFramework + + + + 292 + {{146, 259}, {41, 58}} + + + + _NS:9 + + 4 + IBCocoaTouchFramework + + + + 292 + {{190, 50}, {41, 58}} + + + + _NS:9 + + IBCocoaTouchFramework + + + + 292 + {{190, 100}, {41, 58}} + + + + _NS:9 + + 1 + IBCocoaTouchFramework + + + + 292 + {{190, 155}, {41, 58}} + + + + _NS:9 + + 2 + IBCocoaTouchFramework + + + + 292 + {{190, 207}, {41, 58}} + + + + _NS:9 + + 3 + IBCocoaTouchFramework + + + + 292 + {{190, 259}, {41, 58}} + + + + _NS:9 + + 4 + IBCocoaTouchFramework + + + + 292 + {{234, 50}, {41, 58}} + + + + _NS:9 + + IBCocoaTouchFramework + + + + 292 + {{234, 100}, {41, 58}} + + + + _NS:9 + + 1 + IBCocoaTouchFramework + + + + 292 + {{234, 155}, {41, 58}} + + + + _NS:9 + + 2 + IBCocoaTouchFramework + + + + 292 + {{234, 207}, {41, 58}} + + + + _NS:9 + + 3 + IBCocoaTouchFramework + + + + 292 + {{234, 259}, {41, 58}} + + + + _NS:9 + + 4 + IBCocoaTouchFramework + + + + 292 + + {{278, 50}, {41, 58}} + + + + _NS:9 + + IBCocoaTouchFramework + + + + 292 + {{278, 100}, {41, 58}} + + + + _NS:9 + + 1 + IBCocoaTouchFramework + + + + 292 + {{278, 155}, {41, 58}} + + + + _NS:9 + + 2 + IBCocoaTouchFramework + + + + 292 + {{278, 207}, {41, 58}} + + + + _NS:9 + + 3 + IBCocoaTouchFramework + + + + 292 + {{278, 259}, {41, 58}} + + + + _NS:9 + + 4 + IBCocoaTouchFramework + + + + 292 + {{322, 50}, {41, 58}} + + + + _NS:9 + + IBCocoaTouchFramework + + + + 292 + {{322, 100}, {41, 58}} + + + + _NS:9 + + 1 + IBCocoaTouchFramework + + + + 292 + {{322, 155}, {41, 58}} + + + + _NS:9 + + 2 + IBCocoaTouchFramework + + + + 292 + {{322, 207}, {41, 58}} + + + + _NS:9 + + 3 + IBCocoaTouchFramework + + + + 292 + {{322, 259}, {41, 58}} + + + + _NS:9 + + 4 + IBCocoaTouchFramework + + + + 292 + {{365, 50}, {41, 58}} + + + + _NS:9 + + IBCocoaTouchFramework + + + + 292 + + {{365, 100}, {41, 58}} + + + + _NS:9 + + 1 + IBCocoaTouchFramework + + + + 292 + {{365, 155}, {41, 58}} + + + + _NS:9 + + 2 + IBCocoaTouchFramework + + + + 292 + {{365, 207}, {41, 58}} + + + + _NS:9 + + 3 + IBCocoaTouchFramework + + + + 292 + {{365, 259}, {41, 58}} + + + _NS:9 + + 4 + IBCocoaTouchFramework + + + {480, 320} - + - 3 - MC43NQA - - 2 - + 1 + MC4zMzY2MjY3ODUgMC42MDYxMjY4NjUzIDAuNzUAA NO - + 2 + + 3 + 3 + IBUIScreenMetrics @@ -55,16 +695,34 @@ - {320, 568} - {568, 320} + {320, 480} + {480, 320} IBCocoaTouchFramework - Retina 4 Full Screen - 2 + Retina 3.5 Full Screen + 0 IBCocoaTouchFramework + + + + + + + + + + + + + + + + + + @@ -76,12 +734,536 @@ 7 + + + plantBlocks + + + NSArray + NO + + 669 + + + + plantBlocks + + + NSArray + NO + + 670 + + + + plantBlocks + + + NSArray + NO + + 671 + + + + plantBlocks + + + NSArray + NO + + 672 + + + + plantBlocks + + + NSArray + NO + + 673 + + + + plantBlocks + + + NSArray + NO + + 674 + + + + plantBlocks + + + NSArray + NO + + 675 + + + + plantBlocks + + + NSArray + NO + + 676 + + + + plantBlocks + + + NSArray + NO + + 677 + + + + plantBlocks + + + NSArray + NO + + 678 + + + + plantBlocks + + + NSArray + NO + + 679 + + + + plantBlocks + + + NSArray + NO + + 680 + + + + plantBlocks + + + NSArray + NO + + 681 + + + + plantBlocks + + + NSArray + NO + + 682 + + + + plantBlocks + + + NSArray + NO + + 683 + + + + plantBlocks + + + NSArray + NO + + 684 + + + + plantBlocks + + + NSArray + NO + + 685 + + + + plantBlocks + + + NSArray + NO + + 686 + + + + plantBlocks + + + NSArray + NO + + 687 + + + + plantBlocks + + + NSArray + NO + + 688 + + + + plantBlocks + + + NSArray + NO + + 689 + + + + plantBlocks + + + NSArray + NO + + 690 + + + + plantBlocks + + + NSArray + NO + + 691 + + + + plantBlocks + + + NSArray + NO + + 692 + + + + plantBlocks + + + NSArray + NO + + 693 + + + + plantBlocks + + + NSArray + NO + + 694 + + + + plantBlocks + + + NSArray + NO + + 695 + + + + plantBlocks + + + NSArray + NO + + 696 + + + + plantBlocks + + + NSArray + NO + + 697 + + + + plantBlocks + + + NSArray + NO + + 698 + + + + plantBlocks + + + NSArray + NO + + 699 + + + + plantBlocks + + + NSArray + NO + + 700 + + + + plantBlocks + + + NSArray + NO + + 701 + + + + plantBlocks + + + NSArray + NO + + 702 + + + + plantBlocks + + + NSArray + NO + + 703 + + + + plantSeeds + + + NSArray + NO + + 704 + + + + plantSeeds + + + NSArray + NO + + 705 + + + + plantSeeds + + + NSArray + NO + + 706 + + + + plantSeeds + + + NSArray + NO + + 707 + + + + shovelBK + + + + 2013 + + + + shineLabel + + + + 2021 + + + + plantSeeds + + + NSArray + NO + + 2033 + + + + gestureRecognizers + + + NSArray + YES + + 2053 + + + + gestureRecognizers + + + NSArray + YES + + 2037 + + + + gestureRecognizers + + + NSArray + YES + + 2039 + + + + gestureRecognizers + + + NSArray + YES + + 2035 + + + + gestureRecognizers + + + NSArray + YES + + 2041 + + + + gestureRecognizers + + + NSArray + YES + + 2043 + + + + planting: + + + + 2044 + + + + planting: + + + + 2045 + + + + planting: + + + + 2046 + + + + planting: + + + + 2047 + + + + planting: + + + + 2048 + + + + planting: + + + + 2054 + 0 - + @@ -99,6 +1281,351 @@ 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 89 + + + + + + 100 + + + + + + 157 + + + + + + 194 + + + + + + 250 + + + + + + 262 + + + + + + 296 + + + + + + 302 + + + + + + 306 + + + + + 389 + + + + + 394 + + + + + + 399 + + + + + 404 + + + + + 493 + + + + + + 494 + + + + + 495 + + + + + 496 + + + + + 497 + + + + + 518 + + + + + 519 + + + + + 520 + + + + + 521 + + + + + 522 + + + + + 543 + + + + + 544 + + + + + 545 + + + + + 546 + + + + + 547 + + + + + 568 + + + + + 569 + + + + + 570 + + + + + 571 + + + + + 572 + + + + + 593 + + + + + + 594 + + + + + 595 + + + + + 596 + + + + + 597 + + + + + 618 + + + + + 619 + + + + + 620 + + + + + 621 + + + + + 622 + + + + + 644 + + + + + + 645 + + + + + 646 + + + + + 647 + + + + + 2027 + + + + + + 2034 + + + + + 2036 + + + + + 2038 + + + + + 2040 + + + + + 2042 + + + + + 13 + + + + + 643 + + + + + 2052 + @@ -108,19 +1635,112 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin UIResponder com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 7 + 2054 ViewController UIViewController + + planting: + UIPanGestureRecognizer + + + planting: + + planting: + UIPanGestureRecognizer + + + + UILabel + UIImageView + + + + shineLabel + UILabel + + + shovelBK + UIImageView + + + + + plantBlocks + UIView + NSArray + + + plantSeeds + UIImageView + NSArray + + IBProjectSource ./Classes/ViewController.h @@ -132,7 +1752,12 @@ IBCocoaTouchFramework YES 3 - YES - 1919 + + {677, 320} + {375, 87} + {70, 72} + {78, 87} + + 2083 diff --git a/ImageViewLearn/plant_0.png b/ImageViewLearn/plant_0.png new file mode 100755 index 0000000..cc26785 Binary files /dev/null and b/ImageViewLearn/plant_0.png differ diff --git a/ImageViewLearn/plant_1.png b/ImageViewLearn/plant_1.png new file mode 100755 index 0000000..05607f1 Binary files /dev/null and b/ImageViewLearn/plant_1.png differ diff --git a/ImageViewLearn/plant_2.png b/ImageViewLearn/plant_2.png new file mode 100755 index 0000000..eb5253c Binary files /dev/null and b/ImageViewLearn/plant_2.png differ diff --git a/ImageViewLearn/plant_3.png b/ImageViewLearn/plant_3.png new file mode 100755 index 0000000..57d15b5 Binary files /dev/null and b/ImageViewLearn/plant_3.png differ diff --git a/ImageViewLearn/plant_4.png b/ImageViewLearn/plant_4.png new file mode 100755 index 0000000..5522f7a Binary files /dev/null and b/ImageViewLearn/plant_4.png differ diff --git a/ImageViewLearn/seedbank.png b/ImageViewLearn/seedbank.png new file mode 100755 index 0000000..a08daeb Binary files /dev/null and b/ImageViewLearn/seedbank.png differ diff --git a/ImageViewLearn/seedpackets.png b/ImageViewLearn/seedpackets.png new file mode 100755 index 0000000..11e11fa Binary files /dev/null and b/ImageViewLearn/seedpackets.png differ diff --git a/ImageViewLearn/shovel.png b/ImageViewLearn/shovel.png new file mode 100755 index 0000000..84a5c84 Binary files /dev/null and b/ImageViewLearn/shovel.png differ diff --git a/ImageViewLearn/shovel_bk.png b/ImageViewLearn/shovel_bk.png new file mode 100755 index 0000000..1a690ae Binary files /dev/null and b/ImageViewLearn/shovel_bk.png differ diff --git a/ImageViewLearn/sun.png b/ImageViewLearn/sun.png new file mode 100755 index 0000000..cd58ee8 Binary files /dev/null and b/ImageViewLearn/sun.png differ diff --git a/ImageViewLearn/sunbank.png b/ImageViewLearn/sunbank.png new file mode 100755 index 0000000..5a844c4 Binary files /dev/null and b/ImageViewLearn/sunbank.png differ diff --git a/ImageViewLearn/zomb_0.png b/ImageViewLearn/zomb_0.png new file mode 100755 index 0000000..d28579d Binary files /dev/null and b/ImageViewLearn/zomb_0.png differ diff --git a/ImageViewLearn/zomb_1.png b/ImageViewLearn/zomb_1.png new file mode 100755 index 0000000..a499123 Binary files /dev/null and b/ImageViewLearn/zomb_1.png differ diff --git a/ImageViewLearn/zomb_2.png b/ImageViewLearn/zomb_2.png new file mode 100755 index 0000000..9158a8d Binary files /dev/null and b/ImageViewLearn/zomb_2.png differ diff --git a/ImageViewLearn/zomb_3.png b/ImageViewLearn/zomb_3.png new file mode 100755 index 0000000..c0f4469 Binary files /dev/null and b/ImageViewLearn/zomb_3.png differ diff --git a/ImageViewLearn/zomb_d_0.png b/ImageViewLearn/zomb_d_0.png new file mode 100755 index 0000000..8bac5ce Binary files /dev/null and b/ImageViewLearn/zomb_d_0.png differ diff --git a/PlantsVsZombies.xcodeproj/project.pbxproj b/PlantsVsZombies.xcodeproj/project.pbxproj new file mode 100644 index 0000000..c7f2d96 --- /dev/null +++ b/PlantsVsZombies.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1894DD7817D42DB0009C56CD /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1894DD7717D42DB0009C56CD /* UIKit.framework */; }; + 1894DD7A17D42DB0009C56CD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1894DD7917D42DB0009C56CD /* Foundation.framework */; }; + 1894DD7C17D42DB0009C56CD /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1894DD7B17D42DB0009C56CD /* CoreGraphics.framework */; }; + 1894DD8217D42DB0009C56CD /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1894DD8017D42DB0009C56CD /* InfoPlist.strings */; }; + 1894DD8417D42DB0009C56CD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1894DD8317D42DB0009C56CD /* main.m */; }; + 1894DD8817D42DB0009C56CD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1894DD8717D42DB0009C56CD /* AppDelegate.m */; }; + 1894DD8A17D42DB0009C56CD /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 1894DD8917D42DB0009C56CD /* Default.png */; }; + 1894DD8C17D42DB0009C56CD /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1894DD8B17D42DB0009C56CD /* Default@2x.png */; }; + 1894DD8E17D42DB0009C56CD /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1894DD8D17D42DB0009C56CD /* Default-568h@2x.png */; }; + 1894DD9117D42DB0009C56CD /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1894DD9017D42DB0009C56CD /* ViewController.m */; }; + 1894DD9417D42DB0009C56CD /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1894DD9217D42DB0009C56CD /* ViewController.xib */; }; + 1894DDA317D43C34009C56CD /* zomb_0.png in Resources */ = {isa = PBXBuildFile; fileRef = 1894DDA217D43C34009C56CD /* zomb_0.png */; }; + 1894DDA617D43C7E009C56CD /* bk1.png in Resources */ = {isa = PBXBuildFile; fileRef = 1894DDA517D43C7E009C56CD /* bk1.png */; }; + 1894DDAD17D43D99009C56CD /* NormalZombie.m in Sources */ = {isa = PBXBuildFile; fileRef = 1894DDAC17D43D99009C56CD /* NormalZombie.m */; }; + 1894DDAF17D455C8009C56CD /* zomb_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 1894DDAE17D455C8009C56CD /* zomb_1.png */; }; + 1894DDB117D455D9009C56CD /* zomb_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 1894DDB017D455D9009C56CD /* zomb_2.png */; }; + 1894DDB517D45823009C56CD /* bullet_0.png in Resources */ = {isa = PBXBuildFile; fileRef = 1894DDB417D45823009C56CD /* bullet_0.png */; }; + 1894DDB817D4584B009C56CD /* Shooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1894DDB717D4584B009C56CD /* Shooter.m */; }; + 1894DDBB17D45C0B009C56CD /* Bullet.m in Sources */ = {isa = PBXBuildFile; fileRef = 1894DDBA17D45C0B009C56CD /* Bullet.m */; }; + 1895216617E172CE00749F17 /* ImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1895216517E172CE00749F17 /* ImageManager.m */; }; + 1895216B17E1999D00749F17 /* Zombie.m in Sources */ = {isa = PBXBuildFile; fileRef = 1895216A17E1999D00749F17 /* Zombie.m */; }; + 1895216D17E19FDE00749F17 /* plant_0.png in Resources */ = {isa = PBXBuildFile; fileRef = 1895216C17E19FDE00749F17 /* plant_0.png */; }; + 1895216F17E19FE600749F17 /* plant_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 1895216E17E19FE600749F17 /* plant_1.png */; }; + 1895217117E19FFE00749F17 /* plant_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 1895217017E19FFE00749F17 /* plant_2.png */; }; + 1895217317E1A00900749F17 /* plant_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 1895217217E1A00900749F17 /* plant_3.png */; }; + 1895217617E1A20900749F17 /* Plant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1895217517E1A20900749F17 /* Plant.m */; }; + 1895217D17E1A8DF00749F17 /* sunbank.png in Resources */ = {isa = PBXBuildFile; fileRef = 1895217C17E1A8DF00749F17 /* sunbank.png */; }; + 1895217F17E1A8F400749F17 /* seedpackets.png in Resources */ = {isa = PBXBuildFile; fileRef = 1895217E17E1A8F400749F17 /* seedpackets.png */; }; + 1895218117E1A97C00749F17 /* shovel.png in Resources */ = {isa = PBXBuildFile; fileRef = 1895218017E1A97C00749F17 /* shovel.png */; }; + 1895218317E1A9AB00749F17 /* shovel_bk.png in Resources */ = {isa = PBXBuildFile; fileRef = 1895218217E1A9AB00749F17 /* shovel_bk.png */; }; + 1895218517E1A9CD00749F17 /* seedbank.png in Resources */ = {isa = PBXBuildFile; fileRef = 1895218417E1A9CD00749F17 /* seedbank.png */; }; + 1895218C17E1B91800749F17 /* SunFlower.m in Sources */ = {isa = PBXBuildFile; fileRef = 1895218B17E1B91800749F17 /* SunFlower.m */; }; + 1895218F17E1BE4900749F17 /* PlantSimpleFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 1895218E17E1BE4900749F17 /* PlantSimpleFactory.m */; }; + 1895219217E1C0D000749F17 /* IceShooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1895219117E1C0D000749F17 /* IceShooter.m */; }; + 1895219517E1C14800749F17 /* BigNut.m in Sources */ = {isa = PBXBuildFile; fileRef = 1895219417E1C14800749F17 /* BigNut.m */; }; + 18965D1A17E4482E0086B80F /* ShadeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 18965D1917E4482E0086B80F /* ShadeView.m */; }; + 18989E1018063D3F00351DBF /* bullet_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 18989E0F18063D3F00351DBF /* bullet_2.png */; }; + 18989E1218063DA700351DBF /* plant_4.png in Resources */ = {isa = PBXBuildFile; fileRef = 18989E1118063DA700351DBF /* plant_4.png */; }; + 1899EED517E298BA0066A1EC /* zomb_d_0.png in Resources */ = {isa = PBXBuildFile; fileRef = 1899EED417E298BA0066A1EC /* zomb_d_0.png */; }; + 1899EED917E2BC760066A1EC /* IceBullet.m in Sources */ = {isa = PBXBuildFile; fileRef = 1899EED817E2BC760066A1EC /* IceBullet.m */; }; + 1899EEDB17E2BFC90066A1EC /* bullet_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 1899EEDA17E2BFC90066A1EC /* bullet_1.png */; }; + 1899EEDF17E2D4D80066A1EC /* Shovel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1899EEDE17E2D4D80066A1EC /* Shovel.m */; }; + 1899EEE117E2EA280066A1EC /* sun.png in Resources */ = {isa = PBXBuildFile; fileRef = 1899EEE017E2EA280066A1EC /* sun.png */; }; + 1899EEE417E2EA370066A1EC /* SunShine.m in Sources */ = {isa = PBXBuildFile; fileRef = 1899EEE317E2EA370066A1EC /* SunShine.m */; }; + 189C1D8917D5655E004DCEC9 /* RoadBlockZombie.m in Sources */ = {isa = PBXBuildFile; fileRef = 189C1D8817D5655E004DCEC9 /* RoadBlockZombie.m */; }; + 189C1D8C17D56720004DCEC9 /* DrumZombie.m in Sources */ = {isa = PBXBuildFile; fileRef = 189C1D8B17D56720004DCEC9 /* DrumZombie.m */; }; + 189C1D8F17D567DA004DCEC9 /* ZombieSimpleFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 189C1D8E17D567DA004DCEC9 /* ZombieSimpleFactory.m */; }; + 189C1D9117D5701E004DCEC9 /* zomb_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 189C1D9017D5701E004DCEC9 /* zomb_3.png */; }; + 189C1D9417D57044004DCEC9 /* SportZombie.m in Sources */ = {isa = PBXBuildFile; fileRef = 189C1D9317D57044004DCEC9 /* SportZombie.m */; }; + 18B318B117E6954800E7E970 /* Torch.m in Sources */ = {isa = PBXBuildFile; fileRef = 18B318B017E6954800E7E970 /* Torch.m */; }; + 18B318F017E6E5FC00E7E970 /* ZombiePool.m in Sources */ = {isa = PBXBuildFile; fileRef = 18B318EF17E6E5FC00E7E970 /* ZombiePool.m */; }; + 18BF094417E9A33A00605A67 /* BulletPool.m in Sources */ = {isa = PBXBuildFile; fileRef = 18BF094317E9A33A00605A67 /* BulletPool.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1894DD7317D42DB0009C56CD /* PlantsVsZombies.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PlantsVsZombies.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1894DD7717D42DB0009C56CD /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 1894DD7917D42DB0009C56CD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1894DD7B17D42DB0009C56CD /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 1894DD7F17D42DB0009C56CD /* PlantsVsZombies-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PlantsVsZombies-Info.plist"; sourceTree = ""; }; + 1894DD8117D42DB0009C56CD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 1894DD8317D42DB0009C56CD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 1894DD8517D42DB0009C56CD /* PlantsVsZombies-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PlantsVsZombies-Prefix.pch"; sourceTree = ""; }; + 1894DD8617D42DB0009C56CD /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 1894DD8717D42DB0009C56CD /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 1894DD8917D42DB0009C56CD /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + 1894DD8B17D42DB0009C56CD /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + 1894DD8D17D42DB0009C56CD /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 1894DD8F17D42DB0009C56CD /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 1894DD9017D42DB0009C56CD /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 1894DD9317D42DB0009C56CD /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController.xib; sourceTree = ""; }; + 1894DDA217D43C34009C56CD /* zomb_0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zomb_0.png; sourceTree = ""; }; + 1894DDA517D43C7E009C56CD /* bk1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bk1.png; sourceTree = ""; }; + 1894DDAB17D43D99009C56CD /* NormalZombie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NormalZombie.h; sourceTree = ""; }; + 1894DDAC17D43D99009C56CD /* NormalZombie.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NormalZombie.m; sourceTree = ""; }; + 1894DDAE17D455C8009C56CD /* zomb_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zomb_1.png; sourceTree = ""; }; + 1894DDB017D455D9009C56CD /* zomb_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zomb_2.png; sourceTree = ""; }; + 1894DDB417D45823009C56CD /* bullet_0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bullet_0.png; sourceTree = ""; }; + 1894DDB617D4584B009C56CD /* Shooter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shooter.h; sourceTree = ""; }; + 1894DDB717D4584B009C56CD /* Shooter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Shooter.m; sourceTree = ""; }; + 1894DDB917D45C0B009C56CD /* Bullet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bullet.h; sourceTree = ""; }; + 1894DDBA17D45C0B009C56CD /* Bullet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Bullet.m; sourceTree = ""; }; + 1895216417E172CE00749F17 /* ImageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageManager.h; sourceTree = ""; }; + 1895216517E172CE00749F17 /* ImageManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageManager.m; sourceTree = ""; }; + 1895216917E1999D00749F17 /* Zombie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Zombie.h; sourceTree = ""; }; + 1895216A17E1999D00749F17 /* Zombie.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Zombie.m; sourceTree = ""; }; + 1895216C17E19FDE00749F17 /* plant_0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = plant_0.png; sourceTree = ""; }; + 1895216E17E19FE600749F17 /* plant_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = plant_1.png; sourceTree = ""; }; + 1895217017E19FFE00749F17 /* plant_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = plant_2.png; sourceTree = ""; }; + 1895217217E1A00900749F17 /* plant_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = plant_3.png; sourceTree = ""; }; + 1895217417E1A20900749F17 /* Plant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Plant.h; sourceTree = ""; }; + 1895217517E1A20900749F17 /* Plant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Plant.m; sourceTree = ""; }; + 1895217717E1A35400749F17 /* Plants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Plants.h; sourceTree = ""; }; + 1895217C17E1A8DF00749F17 /* sunbank.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sunbank.png; sourceTree = ""; }; + 1895217E17E1A8F400749F17 /* seedpackets.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = seedpackets.png; sourceTree = ""; }; + 1895218017E1A97C00749F17 /* shovel.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = shovel.png; sourceTree = ""; }; + 1895218217E1A9AB00749F17 /* shovel_bk.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = shovel_bk.png; sourceTree = ""; }; + 1895218417E1A9CD00749F17 /* seedbank.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = seedbank.png; sourceTree = ""; }; + 1895218A17E1B91800749F17 /* SunFlower.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SunFlower.h; sourceTree = ""; }; + 1895218B17E1B91800749F17 /* SunFlower.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SunFlower.m; sourceTree = ""; }; + 1895218D17E1BE4900749F17 /* PlantSimpleFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlantSimpleFactory.h; sourceTree = ""; }; + 1895218E17E1BE4900749F17 /* PlantSimpleFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlantSimpleFactory.m; sourceTree = ""; }; + 1895219017E1C0D000749F17 /* IceShooter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IceShooter.h; sourceTree = ""; }; + 1895219117E1C0D000749F17 /* IceShooter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IceShooter.m; sourceTree = ""; }; + 1895219317E1C14800749F17 /* BigNut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BigNut.h; sourceTree = ""; }; + 1895219417E1C14800749F17 /* BigNut.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BigNut.m; sourceTree = ""; }; + 18965D1817E4482E0086B80F /* ShadeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShadeView.h; sourceTree = ""; }; + 18965D1917E4482E0086B80F /* ShadeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShadeView.m; sourceTree = ""; }; + 18989E0F18063D3F00351DBF /* bullet_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bullet_2.png; sourceTree = ""; }; + 18989E1118063DA700351DBF /* plant_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = plant_4.png; sourceTree = ""; }; + 1899EED417E298BA0066A1EC /* zomb_d_0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zomb_d_0.png; sourceTree = ""; }; + 1899EED717E2BC760066A1EC /* IceBullet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IceBullet.h; sourceTree = ""; }; + 1899EED817E2BC760066A1EC /* IceBullet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IceBullet.m; sourceTree = ""; }; + 1899EEDA17E2BFC90066A1EC /* bullet_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bullet_1.png; sourceTree = ""; }; + 1899EEDD17E2D4D80066A1EC /* Shovel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shovel.h; sourceTree = ""; }; + 1899EEDE17E2D4D80066A1EC /* Shovel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Shovel.m; sourceTree = ""; }; + 1899EEE017E2EA280066A1EC /* sun.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sun.png; sourceTree = ""; }; + 1899EEE217E2EA370066A1EC /* SunShine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SunShine.h; sourceTree = ""; }; + 1899EEE317E2EA370066A1EC /* SunShine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SunShine.m; sourceTree = ""; }; + 189C1D8617D5644F004DCEC9 /* Zombies.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Zombies.h; sourceTree = ""; }; + 189C1D8717D5655E004DCEC9 /* RoadBlockZombie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoadBlockZombie.h; sourceTree = ""; }; + 189C1D8817D5655E004DCEC9 /* RoadBlockZombie.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoadBlockZombie.m; sourceTree = ""; }; + 189C1D8A17D56720004DCEC9 /* DrumZombie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrumZombie.h; sourceTree = ""; }; + 189C1D8B17D56720004DCEC9 /* DrumZombie.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DrumZombie.m; sourceTree = ""; }; + 189C1D8D17D567DA004DCEC9 /* ZombieSimpleFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZombieSimpleFactory.h; sourceTree = ""; }; + 189C1D8E17D567DA004DCEC9 /* ZombieSimpleFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZombieSimpleFactory.m; sourceTree = ""; }; + 189C1D9017D5701E004DCEC9 /* zomb_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zomb_3.png; sourceTree = ""; }; + 189C1D9217D57044004DCEC9 /* SportZombie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SportZombie.h; sourceTree = ""; }; + 189C1D9317D57044004DCEC9 /* SportZombie.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SportZombie.m; sourceTree = ""; }; + 18B318AF17E6954800E7E970 /* Torch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Torch.h; sourceTree = ""; }; + 18B318B017E6954800E7E970 /* Torch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Torch.m; sourceTree = ""; }; + 18B318EE17E6E5FC00E7E970 /* ZombiePool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZombiePool.h; sourceTree = ""; }; + 18B318EF17E6E5FC00E7E970 /* ZombiePool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZombiePool.m; sourceTree = ""; }; + 18BF094217E9A33A00605A67 /* BulletPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BulletPool.h; sourceTree = ""; }; + 18BF094317E9A33A00605A67 /* BulletPool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BulletPool.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1894DD7017D42DB0009C56CD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1894DD7817D42DB0009C56CD /* UIKit.framework in Frameworks */, + 1894DD7A17D42DB0009C56CD /* Foundation.framework in Frameworks */, + 1894DD7C17D42DB0009C56CD /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1894DD6817D42DB0009C56CD = { + isa = PBXGroup; + children = ( + 1894DD7D17D42DB0009C56CD /* PlantsVsZombies */, + 1894DD7617D42DB0009C56CD /* Frameworks */, + 1894DD7417D42DB0009C56CD /* Products */, + ); + sourceTree = ""; + }; + 1894DD7417D42DB0009C56CD /* Products */ = { + isa = PBXGroup; + children = ( + 1894DD7317D42DB0009C56CD /* PlantsVsZombies.app */, + ); + name = Products; + sourceTree = ""; + }; + 1894DD7617D42DB0009C56CD /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1894DD7717D42DB0009C56CD /* UIKit.framework */, + 1894DD7917D42DB0009C56CD /* Foundation.framework */, + 1894DD7B17D42DB0009C56CD /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 1894DD7D17D42DB0009C56CD /* PlantsVsZombies */ = { + isa = PBXGroup; + children = ( + 1899EEDC17E2D4AC0066A1EC /* Tools */, + 1895216217E172B100749F17 /* utils */, + 189C1D9917D574D8004DCEC9 /* viewController */, + 189C1D9817D574B0004DCEC9 /* Pictures */, + 189C1D9717D5749A004DCEC9 /* Bullets */, + 189C1D9617D5746F004DCEC9 /* Plants */, + 189C1D9517D5743E004DCEC9 /* Zombies */, + 1894DD7E17D42DB0009C56CD /* Supporting Files */, + ); + name = PlantsVsZombies; + path = ImageViewLearn; + sourceTree = ""; + }; + 1894DD7E17D42DB0009C56CD /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 1894DD8617D42DB0009C56CD /* AppDelegate.h */, + 1894DD8717D42DB0009C56CD /* AppDelegate.m */, + 1894DD7F17D42DB0009C56CD /* PlantsVsZombies-Info.plist */, + 1894DD8017D42DB0009C56CD /* InfoPlist.strings */, + 1894DD8317D42DB0009C56CD /* main.m */, + 1894DD8517D42DB0009C56CD /* PlantsVsZombies-Prefix.pch */, + 1894DD8917D42DB0009C56CD /* Default.png */, + 1894DD8B17D42DB0009C56CD /* Default@2x.png */, + 1894DD8D17D42DB0009C56CD /* Default-568h@2x.png */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 1895216217E172B100749F17 /* utils */ = { + isa = PBXGroup; + children = ( + 1895216417E172CE00749F17 /* ImageManager.h */, + 1895216517E172CE00749F17 /* ImageManager.m */, + ); + name = utils; + sourceTree = ""; + }; + 1899EEDC17E2D4AC0066A1EC /* Tools */ = { + isa = PBXGroup; + children = ( + 1899EEDD17E2D4D80066A1EC /* Shovel.h */, + 1899EEDE17E2D4D80066A1EC /* Shovel.m */, + 1899EEE217E2EA370066A1EC /* SunShine.h */, + 1899EEE317E2EA370066A1EC /* SunShine.m */, + 18965D1817E4482E0086B80F /* ShadeView.h */, + 18965D1917E4482E0086B80F /* ShadeView.m */, + 18B318EE17E6E5FC00E7E970 /* ZombiePool.h */, + 18B318EF17E6E5FC00E7E970 /* ZombiePool.m */, + 18BF094217E9A33A00605A67 /* BulletPool.h */, + 18BF094317E9A33A00605A67 /* BulletPool.m */, + ); + name = Tools; + sourceTree = ""; + }; + 189C1D9517D5743E004DCEC9 /* Zombies */ = { + isa = PBXGroup; + children = ( + 189C1D8E17D567DA004DCEC9 /* ZombieSimpleFactory.m */, + 189C1D8D17D567DA004DCEC9 /* ZombieSimpleFactory.h */, + 189C1D8617D5644F004DCEC9 /* Zombies.h */, + 189C1D8B17D56720004DCEC9 /* DrumZombie.m */, + 189C1D8A17D56720004DCEC9 /* DrumZombie.h */, + 189C1D8817D5655E004DCEC9 /* RoadBlockZombie.m */, + 189C1D8717D5655E004DCEC9 /* RoadBlockZombie.h */, + 1894DDAC17D43D99009C56CD /* NormalZombie.m */, + 1894DDAB17D43D99009C56CD /* NormalZombie.h */, + 189C1D9317D57044004DCEC9 /* SportZombie.m */, + 189C1D9217D57044004DCEC9 /* SportZombie.h */, + 1895216917E1999D00749F17 /* Zombie.h */, + 1895216A17E1999D00749F17 /* Zombie.m */, + ); + name = Zombies; + sourceTree = ""; + }; + 189C1D9617D5746F004DCEC9 /* Plants */ = { + isa = PBXGroup; + children = ( + 1894DDB717D4584B009C56CD /* Shooter.m */, + 1894DDB617D4584B009C56CD /* Shooter.h */, + 1895217417E1A20900749F17 /* Plant.h */, + 1895217517E1A20900749F17 /* Plant.m */, + 1895217717E1A35400749F17 /* Plants.h */, + 1895218A17E1B91800749F17 /* SunFlower.h */, + 1895218B17E1B91800749F17 /* SunFlower.m */, + 1895218D17E1BE4900749F17 /* PlantSimpleFactory.h */, + 1895218E17E1BE4900749F17 /* PlantSimpleFactory.m */, + 1895219017E1C0D000749F17 /* IceShooter.h */, + 1895219117E1C0D000749F17 /* IceShooter.m */, + 1895219317E1C14800749F17 /* BigNut.h */, + 1895219417E1C14800749F17 /* BigNut.m */, + 18B318AF17E6954800E7E970 /* Torch.h */, + 18B318B017E6954800E7E970 /* Torch.m */, + ); + name = Plants; + sourceTree = ""; + }; + 189C1D9717D5749A004DCEC9 /* Bullets */ = { + isa = PBXGroup; + children = ( + 1894DDBA17D45C0B009C56CD /* Bullet.m */, + 1894DDB917D45C0B009C56CD /* Bullet.h */, + 1899EED717E2BC760066A1EC /* IceBullet.h */, + 1899EED817E2BC760066A1EC /* IceBullet.m */, + ); + name = Bullets; + sourceTree = ""; + }; + 189C1D9817D574B0004DCEC9 /* Pictures */ = { + isa = PBXGroup; + children = ( + 18989E1118063DA700351DBF /* plant_4.png */, + 18989E0F18063D3F00351DBF /* bullet_2.png */, + 1899EEE017E2EA280066A1EC /* sun.png */, + 1899EEDA17E2BFC90066A1EC /* bullet_1.png */, + 1899EED417E298BA0066A1EC /* zomb_d_0.png */, + 1895218417E1A9CD00749F17 /* seedbank.png */, + 1895218217E1A9AB00749F17 /* shovel_bk.png */, + 1895218017E1A97C00749F17 /* shovel.png */, + 1895217E17E1A8F400749F17 /* seedpackets.png */, + 1895217C17E1A8DF00749F17 /* sunbank.png */, + 1895216C17E19FDE00749F17 /* plant_0.png */, + 1895216E17E19FE600749F17 /* plant_1.png */, + 1895217017E19FFE00749F17 /* plant_2.png */, + 1895217217E1A00900749F17 /* plant_3.png */, + 1894DDA217D43C34009C56CD /* zomb_0.png */, + 1894DDAE17D455C8009C56CD /* zomb_1.png */, + 1894DDB017D455D9009C56CD /* zomb_2.png */, + 189C1D9017D5701E004DCEC9 /* zomb_3.png */, + 1894DDA517D43C7E009C56CD /* bk1.png */, + 1894DDB417D45823009C56CD /* bullet_0.png */, + ); + name = Pictures; + sourceTree = ""; + }; + 189C1D9917D574D8004DCEC9 /* viewController */ = { + isa = PBXGroup; + children = ( + 1894DD9217D42DB0009C56CD /* ViewController.xib */, + 1894DD9017D42DB0009C56CD /* ViewController.m */, + 1894DD8F17D42DB0009C56CD /* ViewController.h */, + ); + name = viewController; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1894DD7217D42DB0009C56CD /* PlantsVsZombies */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1894DD9717D42DB0009C56CD /* Build configuration list for PBXNativeTarget "PlantsVsZombies" */; + buildPhases = ( + 1894DD6F17D42DB0009C56CD /* Sources */, + 1894DD7017D42DB0009C56CD /* Frameworks */, + 1894DD7117D42DB0009C56CD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PlantsVsZombies; + productName = ImageViewLearn; + productReference = 1894DD7317D42DB0009C56CD /* PlantsVsZombies.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 1894DD6A17D42DB0009C56CD /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0450; + ORGANIZATIONNAME = Apple.org; + }; + buildConfigurationList = 1894DD6D17D42DB0009C56CD /* Build configuration list for PBXProject "PlantsVsZombies" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 1894DD6817D42DB0009C56CD; + productRefGroup = 1894DD7417D42DB0009C56CD /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1894DD7217D42DB0009C56CD /* PlantsVsZombies */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1894DD7117D42DB0009C56CD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1894DD8217D42DB0009C56CD /* InfoPlist.strings in Resources */, + 1894DD8A17D42DB0009C56CD /* Default.png in Resources */, + 1894DD8C17D42DB0009C56CD /* Default@2x.png in Resources */, + 1894DD8E17D42DB0009C56CD /* Default-568h@2x.png in Resources */, + 1894DD9417D42DB0009C56CD /* ViewController.xib in Resources */, + 1894DDA317D43C34009C56CD /* zomb_0.png in Resources */, + 1894DDA617D43C7E009C56CD /* bk1.png in Resources */, + 1894DDAF17D455C8009C56CD /* zomb_1.png in Resources */, + 1894DDB117D455D9009C56CD /* zomb_2.png in Resources */, + 1894DDB517D45823009C56CD /* bullet_0.png in Resources */, + 189C1D9117D5701E004DCEC9 /* zomb_3.png in Resources */, + 1895216D17E19FDE00749F17 /* plant_0.png in Resources */, + 1895216F17E19FE600749F17 /* plant_1.png in Resources */, + 1895217117E19FFE00749F17 /* plant_2.png in Resources */, + 1895217317E1A00900749F17 /* plant_3.png in Resources */, + 1895217D17E1A8DF00749F17 /* sunbank.png in Resources */, + 1895217F17E1A8F400749F17 /* seedpackets.png in Resources */, + 1895218117E1A97C00749F17 /* shovel.png in Resources */, + 1895218317E1A9AB00749F17 /* shovel_bk.png in Resources */, + 1895218517E1A9CD00749F17 /* seedbank.png in Resources */, + 1899EED517E298BA0066A1EC /* zomb_d_0.png in Resources */, + 1899EEDB17E2BFC90066A1EC /* bullet_1.png in Resources */, + 1899EEE117E2EA280066A1EC /* sun.png in Resources */, + 18989E1018063D3F00351DBF /* bullet_2.png in Resources */, + 18989E1218063DA700351DBF /* plant_4.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1894DD6F17D42DB0009C56CD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1894DD8417D42DB0009C56CD /* main.m in Sources */, + 1894DD8817D42DB0009C56CD /* AppDelegate.m in Sources */, + 1894DD9117D42DB0009C56CD /* ViewController.m in Sources */, + 1894DDAD17D43D99009C56CD /* NormalZombie.m in Sources */, + 1894DDB817D4584B009C56CD /* Shooter.m in Sources */, + 1894DDBB17D45C0B009C56CD /* Bullet.m in Sources */, + 189C1D8917D5655E004DCEC9 /* RoadBlockZombie.m in Sources */, + 189C1D8C17D56720004DCEC9 /* DrumZombie.m in Sources */, + 189C1D8F17D567DA004DCEC9 /* ZombieSimpleFactory.m in Sources */, + 189C1D9417D57044004DCEC9 /* SportZombie.m in Sources */, + 1895216617E172CE00749F17 /* ImageManager.m in Sources */, + 1895216B17E1999D00749F17 /* Zombie.m in Sources */, + 1895217617E1A20900749F17 /* Plant.m in Sources */, + 1895218C17E1B91800749F17 /* SunFlower.m in Sources */, + 1895218F17E1BE4900749F17 /* PlantSimpleFactory.m in Sources */, + 1895219217E1C0D000749F17 /* IceShooter.m in Sources */, + 1895219517E1C14800749F17 /* BigNut.m in Sources */, + 1899EED917E2BC760066A1EC /* IceBullet.m in Sources */, + 1899EEDF17E2D4D80066A1EC /* Shovel.m in Sources */, + 1899EEE417E2EA370066A1EC /* SunShine.m in Sources */, + 18965D1A17E4482E0086B80F /* ShadeView.m in Sources */, + 18B318B117E6954800E7E970 /* Torch.m in Sources */, + 18B318F017E6E5FC00E7E970 /* ZombiePool.m in Sources */, + 18BF094417E9A33A00605A67 /* BulletPool.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 1894DD8017D42DB0009C56CD /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 1894DD8117D42DB0009C56CD /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 1894DD9217D42DB0009C56CD /* ViewController.xib */ = { + isa = PBXVariantGroup; + children = ( + 1894DD9317D42DB0009C56CD /* en */, + ); + name = ViewController.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 1894DD9517D42DB0009C56CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 1894DD9617D42DB0009C56CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 1894DD9817D42DB0009C56CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "ImageViewLearn/PlantsVsZombies-Prefix.pch"; + INFOPLIST_FILE = "ImageViewLearn/PlantsVsZombies-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 6.1; + PRODUCT_NAME = PlantsVsZombies; + TARGETED_DEVICE_FAMILY = 1; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 1894DD9917D42DB0009C56CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "ImageViewLearn/PlantsVsZombies-Prefix.pch"; + INFOPLIST_FILE = "ImageViewLearn/PlantsVsZombies-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 6.1; + PRODUCT_NAME = PlantsVsZombies; + TARGETED_DEVICE_FAMILY = 1; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1894DD6D17D42DB0009C56CD /* Build configuration list for PBXProject "PlantsVsZombies" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1894DD9517D42DB0009C56CD /* Debug */, + 1894DD9617D42DB0009C56CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1894DD9717D42DB0009C56CD /* Build configuration list for PBXNativeTarget "PlantsVsZombies" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1894DD9817D42DB0009C56CD /* Debug */, + 1894DD9917D42DB0009C56CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 1894DD6A17D42DB0009C56CD /* Project object */; +} diff --git a/PlantsVsZombies.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/PlantsVsZombies.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..3c60d71 --- /dev/null +++ b/PlantsVsZombies.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/PlantsVsZombies.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate b/PlantsVsZombies.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..8bfbf3b Binary files /dev/null and b/PlantsVsZombies.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/PlantsVsZombies.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/WorkspaceSettings.xcsettings b/PlantsVsZombies.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..659c876 --- /dev/null +++ b/PlantsVsZombies.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/WorkspaceSettings.xcsettings @@ -0,0 +1,10 @@ + + + + + HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges + + SnapshotAutomaticallyBeforeSignificantChanges + + + diff --git a/PlantsVsZombies.xcodeproj/xcuserdata/apple.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/PlantsVsZombies.xcodeproj/xcuserdata/apple.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist new file mode 100644 index 0000000..05301bc --- /dev/null +++ b/PlantsVsZombies.xcodeproj/xcuserdata/apple.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/PlantsVsZombies.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/PlantVsZombie.xcscheme b/PlantsVsZombies.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/PlantVsZombie.xcscheme new file mode 100644 index 0000000..4d84dd8 --- /dev/null +++ b/PlantsVsZombies.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/PlantVsZombie.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PlantsVsZombies.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist b/PlantsVsZombies.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..bbaa3ba --- /dev/null +++ b/PlantsVsZombies.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + PlantVsZombie.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 1894DD7217D42DB0009C56CD + + primary + + + + +