DebugWin32ReleaseWin32Debugx64Releasex64{98bc35b9-ee1a-4d77-85f2-adaa72db16f7}Win32Proj10.0.17134.0Applicationv141Unicode{ced79182-f36b-4d07-ad0e-249c15bfad73}Usepch.hDisabledWIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)trueEnableFastChecksMultiThreadedDebugDLLLevel3trueConsoleUsepch.hDisabledX64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)trueEnableFastChecksMultiThreadedDebugDLLLevel3trueConsoleUsepch.hWIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)MultiThreadedDLLLevel3ProgramDatabasetrueConsoletruetrueNotUsingpch.hX64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)MultiThreadedDLLLevel3ProgramDatabase4996trueConsoletruetrueThis project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.n92' href='#n92'>92
93949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
/* * cocos2d for iPhone: http://www.cocos2d-iphone.org * * Copyright (c) 2008-2010 Ricardo Quesada * Copyright (c) 2011 Zynga Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * */#import "ccMacros.h"#import "CCAnimation.h"#import "CCSpriteFrame.h"#import "CCTexture2D.h"#import "CCTextureCache.h"@implementationCCAnimation@synthesizename=name_,delay=delay_,frames=frames_;+(id)animation{return[[[selfalloc]init]autorelease];}+(id)animationWithFrames:(NSArray*)frames{return[[[selfalloc]initWithFrames:frames]autorelease];}+(id)animationWithFrames:(NSArray*)framesdelay:(float)delay{return[[[selfalloc]initWithFrames:framesdelay:delay]autorelease];}+(id)animationWithName:(NSString*)name{return[[[selfalloc]initWithName:name]autorelease];}+(id)animationWithName:(NSString*)nameframes:(NSArray*)frames{return[[[selfalloc]initWithName:nameframes:frames]autorelease];}+(id)animationWithName:(NSString*)anamedelay:(float)dframes:(NSArray*)array{return[[[selfalloc]initWithName:anamedelay:dframes:array]autorelease];}+(id)animationWithName:(NSString*)anamedelay:(float)d{return[[[selfalloc]initWithName:anamedelay:d]autorelease];}-(id)init{return[selfinitWithFrames:nildelay:0];}-(id)initWithFrames:(NSArray*)frames{return[selfinitWithFrames:framesdelay:0];}-(id)initWithFrames:(NSArray*)arraydelay:(float)delay{if((self=[superinit])){delay_=delay;self.frames=[NSMutableArrayarrayWithArray:array];}returnself;}-(id)initWithName:(NSString*)name{return[selfinitWithName:namedelay:0frames:nil];}-(id)initWithName:(NSString*)nameframes:(NSArray*)frames{return[selfinitWithName:namedelay:0frames:frames];}-(id)initWithName:(NSString*)tdelay:(float)d{return[selfinitWithName:tdelay:dframes:nil];}-(id)initWithName:(NSString*)namedelay:(float)delayframes:(NSArray*)array{if((self=[superinit])){delay_=delay;self.name=name;self.frames=[NSMutableArrayarrayWithArray:array];}returnself;}-(NSString*)description{return[NSStringstringWithFormat:@"<%@ = %08X | frames=%d, delay:%f>",[selfclass],self,[frames_count],delay_];}-(void)dealloc{CCLOGINFO(@"cocos2d: deallocing %@",self);[name_release];[frames_release];[superdealloc];}-(void)addFrame:(CCSpriteFrame*)frame{[frames_addObject:frame];}-(void)addFrameWithFilename:(NSString*)filename{CCTexture2D*texture=[[CCTextureCachesharedTextureCache]addImage:filename];CGRectrect=CGRectZero;rect.size=texture.contentSize;CCSpriteFrame*frame=[CCSpriteFrameframeWithTexture:texturerect:rect];[frames_addObject:frame];}-(void)addFrameWithTexture:(CCTexture2D*)texturerect:(CGRect)rect{CCSpriteFrame*frame=[CCSpriteFrameframeWithTexture:texturerect:rect];[frames_addObject:frame];}@end