我正在尝试使用Cocos2d构建iPhone应用程序。但是我已经使用了以下四种类型的类:
@interface MenuScene : Scene {}
@end
@interface FlipView : UIImageView
{
CGPoint startTouchPosition;
NSString *dirString;
UIImageView *firstPieceView;
UIImageView *secondPieceView;
}
@end
@interface HelloController : UIViewController
@end
@interface MenuLayer: Layer{
Todo *todo;
Menu * menu;
sqlite3 *database;
NSMutableArray *todos;
NSString *dirString;
CGPoint startTouchPosition;
}
@property (nonatomic, retain) NSMutableArray *todos;
-(void) button1: (id)sender;
-(void) button2: (id)sender;
-(void) black_jack: (id)sender;
@end
但是我怎么能通过MenuLayer类展示FlipView和HelloController类呢?
[[[CCDirector sharedDirector] view] addSubview:myView];
。 - Nik