0

私のレイヤーでは、1 つの画像ビューを追加してから、画像ビューの上に CCMenuItem 画像を追加したいと考えています。Cocos2dでこれを行うにはどうすればよいですか

提案があれば教えてください

edit : コードをコメントから移動

img = [[UIImageView alloc]initWithFrame:CGRectMake(0, 35, 320, 480)]; 
img.backgroundColor=[UIColor clearColor];
[[[CCDirector sharedDirector] openGLView] addSubview: img];
CCMenuItemImage *topBarBtn1 = [CCMenuItemImage itemFromNormalImage:@"TapButtonR.png" 
                                                     selectedImage:@"TapButtonR.png"             
                                                            target:self 
                                                          selector:@selector(gamePlay:)]; 
CCMenu *tapScreen = [CCMenu menuWithItems:topBarBtn1, nil]; 
tapScreen.position = ccp(160, 70); 
[self addChild:tapScreen z:2 ];
4

0 に答える 0