• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
linux_ios
博客园    首页    新随笔    联系   管理    订阅  订阅
2013年4月13日
cocos2dx 音乐与音效
摘要: //根据不同的平台使用的预编译索引不同音频文件#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_ 阅读全文
posted @ 2013-04-13 19:49 linux_ios 阅读(3093) 评论(0) 推荐(0)
cocos2dx 圆形碰撞
摘要: 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::... 阅读全文
posted @ 2013-04-13 18:05 linux_ios 阅读(871) 评论(0) 推荐(0)
cocos2dx 矩形碰撞
摘要: 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... 阅读全文
posted @ 2013-04-13 18:03 linux_ios 阅读(1888) 评论(0) 推荐(0)
cocos2dx 多点触屏事件
摘要: 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;}/... 阅读全文
posted @ 2013-04-13 18:02 linux_ios 阅读(1244) 评论(0) 推荐(0)
cocos2dx 触屏事件
摘要: // 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... 阅读全文
posted @ 2013-04-13 18:01 linux_ios 阅读(453) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3