Skip to content

Commit

Permalink
植物大战僵尸iOS版(简单仿写)
Browse files Browse the repository at this point in the history
  • Loading branch information
RonTang committed Oct 19, 2013
1 parent cf5bf1f commit cee3435
Show file tree
Hide file tree
Showing 78 changed files with 4,274 additions and 334 deletions.
297 changes: 0 additions & 297 deletions ImageViewLearn.xcodeproj/project.pbxproj

This file was deleted.

14 changes: 6 additions & 8 deletions ImageViewLearn/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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
13 changes: 13 additions & 0 deletions ImageViewLearn/BigNut.h
Original file line number Diff line number Diff line change
@@ -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
32 changes: 32 additions & 0 deletions ImageViewLearn/BigNut.m
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit cee3435

Please sign in to comment.