Cocos2dUtilities
Utilities developed by HurleyProg for use with Cocos2d
 All Classes Functions Variables Properties Pages
CCButton.h
1 //
2 // CCButton.h
3 // Empous
4 //
5 // Created by Ryan Hurley on 3/26/13.
6 // Copyright (c) 2013 HurleyProg. All rights reserved.
7 //
8 
9 #import "CCSprite.h"
10 #import "cocos2d.h"
11 
15 @interface CCButton : CCSprite <CCTargetedTouchDelegate>
16 {
20  SEL _selector;
21 
25  id<NSObject> _target;
26 
27 }
28 
32 @property (nonatomic, assign) id<NSObject> target;
36 @property (nonatomic, assign) SEL selector;
37 
46 +(id)spriteWithFile:(NSString *)filename withPressedFile:(NSString*)pressedFilename target:(id)object function:(SEL)callback;
47 
57 +(id)spriteWithFile:(NSString *)filename withPressedFile:(NSString*)pressedFilename touchAreaScale:(float)scale target:(id)object function:(SEL)callback;
58 
69 +(id)spriteWithFile:(NSString *)filename withPressedFile:(NSString*)pressedFilename touchAreaScale:(float)scale priority:(int)priority target:(id)object function:(SEL)callback;
70 
73 -(void)disable;
74 
78 -(void)enable;
79 
80 @end