int main()
{
	initMac();
	
	createWindow();

	doEventLoop();
        
        return 0;
}
int main(void)
{
	initMac();
	
	createWindow();
	createOffscreen();
	
	doEventLoop();
    
    return 0;
}
Beispiel #3
0
void main()
{
	initMac();
	
	createOffscreen( 1 );
	createWindow();

	resetItems();
	defineItems();

	eventLoop();
}
Beispiel #4
0
int main()
{
	initMac();
	
	setUp();
	
	createWindow();				/* Create a window to display the final image. */
	
	initPixmap();				/* Initialize offscreen pixmap. */
	createImage();				/* Copy the main screen's pixmap into the offscreen's. */
	drawImage();				/* Copy the offscreen's pixmap onto the window. */

	doEventLoop();				/* Handle any events. */
	
	DisposeWindow( gWindow );
    
    return 0;
}
Beispiel #5
0
void PushBallScene::initUI()
{
    m_pBG = Sprite::create("images/select/bg_choose.jpg");
    kAdapterScreen->setExactPosition(m_pBG, 320, 480);
    this->addToBGLayer(m_pBG);
    
    auto borderUpper = PhysicsBody::createEdgeChain(bgLine,2,PHYSICSBODY_MATERIAL_DEFAULT,10);
    m_pBG->setPhysicsBody(borderUpper);
    
    ui_button = cocostudio::GUIReader::getInstance()->widgetFromJsonFile("cocos_studio/choose_flavors.json");
    this->addToUILayer(ui_button,10);
    
    
    
    ui_next = ui::Helper::seekWidgetByName(ui_button, "btn_next");
    ui_next->setTag(100);
    ui_next->setVisible(false);
    ui_next ->addTouchEventListener(CC_CALLBACK_2(PushBallScene::touchEvent, this));

    ui_coin = ui::Helper::seekWidgetByName(ui_button, "btn_coin");
    ui_coin->setTag(200);
    ui_coin->setOpacity(0);
//    ui_coin->setVisible(false);
    ui_coin ->addTouchEventListener(CC_CALLBACK_2(PushBallScene::touchEvent, this));
    
    
    //根据选择界面,获取需要的水果,赋值到数组
//    m_iFriutNum = (int)g_vChooseTaste.size();
    
    for (int i = 0; i<g_vChooseTaste.size(); i++) {
        
        ballStr[i] = g_vChooseTaste.at(i);
    
    }
    initMac();
    initBall();
    
    pushBall();
}