1. Fast texture
Gameplay: If 10 botnets are killed, go through the next close. When you click to enter the next close, the speed of the botnets increases.
If there are 15 botnets in the house, they will lose.
Play audio when you click to kill a zombie, and play audio or background music when you win or lose.
Ii. business logic and knowledge points
1. There are two main classes: Class 1: homepage display class rootviewcontroller: uiimageview; Class 2: zombie class: zombieview: uiimageview.
2. play audio: # import <avfoundation/avaudioplayer. h>, which must be added,
Nsstring * deadpath = [[nsbundle mainbundle] pathforresource: @ "lose" oftype: @ "MP3"]; nsurl * deadurl = [nsurl fileurlwithpath: deadpath]; deadplayer = [[avaudioplayer alloc] initwithcontentsofurl: deadurl error: Nil]; [deadplayer preparetoplay];
3. Reminder box:
Uialertview * Alert = [[uialertview alloc] initwithtitle: @ "! ! "Message: @" You lost! "Delegate: Nil cancelbuttontitle: @" OK! "Otherbuttontitles: Nil]; [alert show];
[Alert release];
4. Import the package, which is generally placed in the. M file to prevent cross-compilation.
5. Timer,
Timer = [nstimer scheduledtimerwithtimeinterval: time target: Self
Selector: @ selector (MOVE) userinfo: Nil repeats: Yes];
[Timer invalidate]; // stop the timer
6. ry transform (matrix transformation)
// Change the zombie size
-(Void) changesize {// difficult, ry transform (matrix transformation) cgaffinetransform T = cgaffinetransformmakescale (2.0, 2.0); // scale the image and increase the animation [uiview animatewithduration: 0.35 animations: ^ {self. transform = T;} completion: ^ (bool finished) {// zoom out the animation [uiview animatewithduration: 0.35 animations: ^ {cgaffinetransform T1 = cgaffinetransformscale (self. transform, 0.5, 0.5); self. transform = T1;} completion: ^ (bool finished) {[self removefromsuperview] ;}];}