摘要:
//根据不同的平台使用的预编译索引不同音频文件#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)#define EFFECT_FILE "effect2.ogg"#elif (CC_TARCET_PLATFORM == CC_PLATFORM_MARMALADE)#define EFFECT_FILE "effect1.raw"#else#define EFFECT_FILE "effect1.wav"#endif#if (CC_TARGET_PLATEFOM == CC_PLATFORM_ 阅读全文
摘要:
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... 阅读全文