We should all know the talking Tom Cat game, but no touch screen smartphone can not play the talking Tom Cat how to do? Talking Tom Cat Computer Edition allows you to also play around with this little 2B of silly
Needs: 1. Click on the button to play the corresponding animation 2. Click on the body part of Tom Cat (head, Feet, tail) show animation 3. The animation currently playing cannot trigger other animations 4. Optimize cache, memory management A. Sequence Frame Animation # #. PNG-formatted files can be accessed without the extension, and can be previewed in the "Images.scassets" group, JPG can only be placed i
Use Uiimageview, UIButton to achieve a comprehensive small case---tom CatMemories: Uiimageview from Uiview,uiview from Uiresponder,uibutton from Uicontrol,uicontrol from UIViewSee the implementation alone, code implementation is actually relatively simple, but the creative is very rare, the art requirements are very high! It's a great game!
Functional analysis(1) After clicking on the corresponding button, let
mjviewcontroller.m//03-tom////Created by Apple on 13-11-24.//Copyright (c) 2013 itcast. All rights reserved.//#import "MJViewController.h" @interface Mjviewcontroller () {nsdictionary *_dict;//Save the number of all pictures}@e Nd@implementation mjviewcontroller-(void) viewdidload {[Super viewdidload]; 1. Obtain the full path of the tom.plist nsbundle *bundle = [NSBundle mainbundle]; NSString *path = [Bundle pathforresource:@ "
Unity Tom Cat automatically detects recordings, does not speak auto-playUsing system.collections.generic;using system.linq;using unityengine; [Requirecomponent (typeof (Audiosource))]public class microphoneinput:monobehaviour{//per second produces 0.4M data volume private Linkedli stProject Resource Address:http://download.csdn.net/detail/chh19941125/8744043Unity Tom
*) ImageName {//ThroughThe key in the dictionary obtains value, which is the number of the corresponding image nsstring *countstring = [Self.imagecountdict objectforkey:imagename]; Convert to Nsinteger nsinteger count = countstring.integervalue; Determines whether the frame animation is being executed, and if it is executing, return, that is, the subsequent code will no longer execute the IF (self.imageView.isAnimating) {return; }//1. An array is required to perform the frame animation
the order, because some of the control location calculation needs to consider the previous control position, the object created by the successive dependencies of each other, reducing the coupling between the code).
9, Strong Weak
10, Tom Cat optimization
Note: When adding an animated frame sequence, be aware of freeing up memory!!! In this case, you need t
Unity Tom Cat automatically detects recordings, does not speak auto-playScriptUsing system.collections.generic;using system.linq;using unityengine; [Requirecomponent (typeof (Audiosource))]public class microphoneinput:monobehaviour{//per second produces 0.4M data volume private Linkedli stfull Project Address:http://download.csdn.net/detail/chh19941125/8744043Unity T
#import "ViewController.h"@interface Viewcontroller ()@property (Weak, nonatomic) Iboutlet Uiimageview *tomimageview;@end@implementation ViewcontrollerKnock on Tom's cat's head. Premise: A series of animations have been imported.(ibaction) btnknockoutonclicked: (UIButton *) sender{[Self tomimatewith:@ "KnockOut" imagecount:81];}Tom plays birds. Premise: The animation about the bird has been imported.(ibaction) Eatonclick: (UIButton *) sender{[self.tom
objects the [arr addobject:img]; About } the//Assigning a temporary mutable array to an array of UIImage objects for animation the //all of them are prepared for this step. theSelf.imgView.animationImages =arr; + -//set and start animation the[Self.imgview Setanimationrepeatcount:1];Bayi[Self.imgview SetAnimationDuration:arr.count *0.08]; the [Self.imgview startanimating]; the //Iv. releasing memory at the end of the animation - //self.imgView.animationImages = nil;//Error! The program loop
Eventually:BeyondViewController.h beyondviewcontroller.h// 05_tomcat//// Created by Beyond on 14-7-23.// Copyright (c) 2014 Com.beyond. All rights reserved.//#import Beyondviewcontroller.mbeyondviewcontroller.m//05_tomcat////Created by Beyond on 14-7-23.//Copyright (c) 2014 Com.beyond. All rights reserved.//#import "BeyondViewController.h" @interface Beyondviewcontroller () {nsdictionary *_dict;} @end @implementation beyondviewcontroller-(void) viewdidload{[Super Viewdidload]; Sg_bundl
Simply add the script to the camera.Here is the script I wrote, there is a problem because it is automatic call detection call recording Unity call delay will appear some delay small problem, you can refer to my code change to do a button click on the recording end play recording or can be achievedUsing system.collections.generic;using unityengine;using system.collections;public class tom2:monobehaviour{//publi c float Power = 1; public float min = 0; Public AudioClip audioclip = null;//au
iOS development, a simple tom cat developed, is as Follows:1.1 had always felt this small game is good, very fun, now learning iOS only to find that the program is really simple, in fact, this is not a complete, there is no sound, and then to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.