摘要:
bool HelloWorld::init(){ ////////////////////////////// // 1. super init first if ( !CCLayer::init() ) { return false; } CCLayerColor* colorLayer = CCLayerColor::create(ccc4(0, 0, 255, 0),480 ,320); addChild(colorLayer); CCLabelTTF * pLabel = CCLabelTTF::... 阅读全文
摘要:
bool HelloWorld::init(){ ////////////////////////////// // 1. super init first if ( !CCLayer::init() ) { return false; } CCLayerColor* colorLayer = CCLayerColor::create(ccc4(255, 0, 255, 0),480 ,320); addChild(colorLayer); CCLabelTTF * pLabel = CCLabelTTF::creat... 阅读全文
摘要:
CCScene* HelloWorld::scene(){ // 'scene' is an autorelease object CCScene *scene = CCScene::create(); // 'layer' is an autorelease object HelloWorld *layer = HelloWorld::create(); // add layer as a child to scene scene->addChild(layer); // return the scene return scene;}/... 阅读全文
摘要:
// on "init" you need to initialize your instancebool HelloWorld::init(){ ////////////////////////////// // 1. super init first if ( !CCLayer::init() ) { return false; } CCSprite * spr = CCSprite::create("Icon.png"); spr->setPosition(ccp(150, 200)); addChild(spr, 0... 阅读全文