Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted by makzan ( 17 years ago )
// code snippets for movieclip-like wrapper in cocos2d-iphone

// code snippets of a class extending the movieclip wrapper

  [self addLayerWithFile:@"doll_n.pvr" andWidth:60 andHeight:60];
  
  // set animations set    
  [self setAnimationWithName:@"walk" beginWith:1 endWith:16];
  [self setAnimationWithName:@"attack1" beginWith:17 endWith:24];
  [self setAnimationWithName:@"attack2" beginWith:25 endWith:32];
  [self setAnimationWithName:@"attack3" beginWith:33 endWith:40];
  [self setAnimationWithName:@"die" beginWith:44 endWith:44+9];

// code snippets of the movieclip header
-(void) addLayerWithFile: (NSString*) png_file andWidth: (int)rectW andHeight: (int)rectH;
-(void) setAnimationWithName: (NSString*) anim_name beginWith: (int)startFrame endWith: (int)endFrame;
-(void) gotoAndStop: (int) frameNum;
-(void) gotoAndPlay: (int) startFrame andEnd: (int) endFrame;
-(void) gotoAndPlay: (int) startFrame andEnd: (int) endFrame withLoop: (Boolean) isLoop;
-(void) gotoAndPlay: (NSString*) anim_name;
-(void) gotoAndPlay: (NSString*) anim_name withLoop:(Boolean)isLoop;
-(void) play;
-(void) playWithLoop;
-(void) stop;

 

Revise this Paste

Children: 11779
Your Name: Code Language: