문제

I want to create a menu in cocos3d. I failed to find correct solution for this. I tried to create one using the cocos2d concept.

    CCMenuItemImage *item1=[CCMenuItemImage itemFromNormalImage:@"up.png" selectedImage:@"images.jpeg" target:self selector:@selector(up:)];
    CCMenu *mnu1=[CCMenu menuWithItems:item1, nil];
    mnu1.position=ccp(320, 480);
    [self addChild:mnu1];

But there comes an issue,

Incompatible pointer types sending 'CCMenu *' to parameter of type 'CC3Node *'

도움이 되었습니까?

해결책

I found the answer. I had created CCMenu in CCScene. Actually we have to create CCMenu in CCLayer. Now it works !

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top