zoukankan      html  css  js  c++  java
  • 临时文件

    bool HelloWorld::init()
    {
         CCSize     size = CCDirector::sharedDirector()->getWinSize();
    
         // 创建一个无形节点
         CCNode*     pNode = CCNode::create();
         this->addChild(pNode, 0);
    
         // 添加菜单项、菜单
         CCMenuItemImage*     pCloseItem = CCMenuItemImage::create("CloseNormal.png", "CloseSelected.png", this,
                                                                               menu_selector(HelloWorld::menuCloseCallback));
         pCloseItem->setPosition(ccp(size.width - 20, 20));
        
         CCMenu*     pMenu = CCMenu::create(pCloseItem, NULL);
         pMenu->setPosition(CCPointZero);
         pNode->addChild(pMenu, 1);
    
         // 添加显示文本
         CCLabelTTF*     pLabel     = CCLabelTTF::create("Hello World", "Thonburi", 34);
         pLabel->setPosition(ccp(size.width / 2, size.height - 20));
         pNode->addChild(pLabel, 1);
    
         // 添加精灵
         CCSprite*     pSprite     = CCSprite::create("HelloWorld.png");
         pSprite->setPosition(ccp(size.width / 2, size.height / 2));
         pNode->addChild(pSprite, 0);
        
         pNode->setScale(0.5f);                                             // 整体缩放
         pNode->setPosition(size.width / 2, size.height / 2);     // 整体移动
         pNode->setRotation(90.0);                                        // 整体旋转
    
         return true;
    }
    
  • 相关阅读:
    水杯倒水问题
    判断算24
    困难串
    Hadoop环境搭建
    GWT+Hadoop+Hbase搭建(转)
    Vector与ArrayList的区别
    Java+Eclipse 环境配置
    关于颜色的宏定义.
    xnatouch for iphone!!
    What's new iphone 3GS
  • 原文地址:https://www.cnblogs.com/sura/p/3522956.html
Copyright © 2011-2022 走看看