Skip to content

Instantly share code, notes, and snippets.

@sdabet
Created December 19, 2012 08:00
Show Gist options
  • Save sdabet/4335168 to your computer and use it in GitHub Desktop.
Save sdabet/4335168 to your computer and use it in GitHub Desktop.
Item.h
@interface Item : NSObject
+(id) itemWithNode:(CCNode*)node;
-(id) initWithNode:(CCNode*)node;
// The view
@property (nonatomic, retain) CCNode *node;
// "Forwarding" stuff
@property (nonatomic,readwrite,assign) CGPoint position;
-(CCAction*) runAction:(CCAction*) action;
-(void) stopAllActions;
// Scheduled update
-(void) update:(ccTime)dt;
// Custom logic
...
@end
@interface SpriteItem : Item
+(id) itemWithFrameName:(NSString*)name;
-(id) initWithFrameName:(NSString*)name;
-(void) setOpacity:(int)opacity;
-(void) setFlipX:(bool)flip;
-(void) setDisplayFrame:(CCSpriteFrame*)frame;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment