1
我想在我的程序中使用cocos2d在android.But中創建一個搖動效果,當我應用抖動效果,方向改變,黑色屏幕將顯示。這段代碼有什麼問題?Cocos2d CCshaky3d在android
float width=s.getWidth()/2;
float height=s.getHeight()/2;
firstfireImage = CCSprite.node();
Bitmap bm = BitmapFactory.decodeResource(mContext.getResources(),R.drawable.image_01);
firstfireImage=CCSprite.sprite(bm);
firstfireImage.setPosition(240,160);
CCShaky3D shaky=CCShaky3D.action(10,true,ccGridSize.ccg(20,30),1.0f);
CCRotateTo rotate=CCRotateTo.action(1,190);
//CCWaves wave=CCWaves.action(1,1.0f,true,true, ccGridSize.ccg(20,30),1);
runAction(CCRepeatForever.action(CCSequence.actions(shaky)));
addChild(firstfireImage,1);
如果你運行這個成功則讓我知道... –