当前位置: 首页>>代码示例>>C++>>正文


C++ Tools::checkEncryptionAll方法代码示例

本文整理汇总了C++中Tools::checkEncryptionAll方法的典型用法代码示例。如果您正苦于以下问题:C++ Tools::checkEncryptionAll方法的具体用法?C++ Tools::checkEncryptionAll怎么用?C++ Tools::checkEncryptionAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tools的用法示例。


在下文中一共展示了Tools::checkEncryptionAll方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: init

// on "init" you need to initialize your instance
bool LayerLoading::init()
{
    bool bRet = false;
    do 
    {
		CCEGLView::sharedOpenGLView()->setDesignResolutionSize(1024, 576, kResolutionShowAll);

		m_nNumberOfLoadedSprites=0;

        //////////////////////////////////////////////////////////////////////////
        // super init first
        //////////////////////////////////////////////////////////////////////////
        CC_BREAK_IF(! CCLayer::init());

		CCSize s = CCDirector::sharedDirector()->getWinSize();

        // Add a label
		pLabel = CCLabelTTF::create("Loading...", "Arial", 24);
        CC_BREAK_IF(! pLabel);
        pLabel->setPosition(ccp(s.width / 2, s.height * 0.15f));
        this->addChild(pLabel, 1);

        // 3. Add add a splash screen, show the cocos2d splash image.
        CCSprite* pSprite = CCSprite::create("scene_loading_bg.png");
        CC_BREAK_IF(! pSprite);
        pSprite->setPosition(ccp(s.width/2, s.height/2));
        this->addChild(pSprite, 0);
		pSprite->setScaleX(s.width / pSprite->getContentSize().width);
		pSprite->setScaleY(s.height/ pSprite->getContentSize().height);

        
		char temp[32]; //注意不要越界
		for(int i =1;i<14;i++){
			sprintf(temp,"card_clubs_%d.png",i);
			CCTextureCache::sharedTextureCache()->addImageAsync(temp, this, callfuncO_selector(LayerLoading::loadingCallBack));
		}
		for(int i =1;i<14;i++){
			sprintf(temp,"card_diamonds_%d.png",i);
			CCTextureCache::sharedTextureCache()->addImageAsync(temp, this, callfuncO_selector(LayerLoading::loadingCallBack));
		}
		for(int i =1;i<14;i++){
			sprintf(temp,"card_hearts_%d.png",i);
			CCTextureCache::sharedTextureCache()->addImageAsync(temp, this, callfuncO_selector(LayerLoading::loadingCallBack));
		}
		for(int i =1;i<14;i++){
			sprintf(temp,"card_spades_%d.png",i);
			CCTextureCache::sharedTextureCache()->addImageAsync(temp, this, callfuncO_selector(LayerLoading::loadingCallBack));
		}
		
        CCTextureCache::sharedTextureCache()->addImageAsync("scene_game_bg_desk.png", this, callfuncO_selector(LayerLoading::loadingCallBack));
        CCTextureCache::sharedTextureCache()->addImageAsync("scene_welcome_logo.png", this, callfuncO_selector(LayerLoading::loadingCallBack));
        CCTextureCache::sharedTextureCache()->addImageAsync("scene_welcome_info_bg.png", this, callfuncO_selector(LayerLoading::loadingCallBack));
        CCTextureCache::sharedTextureCache()->addImageAsync("scene_welcome_bg.png", this, callfuncO_selector(LayerLoading::loadingCallBack));
        
		CCSprite *m_loading_0 =CCSprite::create("scene_loading_0.png");
		addChild(m_loading_0);
		m_loading_0->setAnchorPoint(ccp(0.5f,0.5f));
		m_loading_0->setPosition(ccp(s.width/2, s.height/2));

		m_loading_bar = CCProgressTimer::create(CCSprite::create("scene_loading_100.png"));
		m_loading_bar->setType(kCCProgressTimerTypeBar);
		m_loading_bar->setMidpoint(ccp(0,0));
		m_loading_bar->setBarChangeRate(ccp(0, 1));
		addChild(m_loading_bar);
		m_loading_bar->setAnchorPoint(ccp(0.5f,0.5f));
		m_loading_bar->setPosition(ccp(s.width/2, s.height/2));

//        CCProgressTo *to = CCProgressTo::create(2,100);
//        CCFiniteTimeAction* fn = CCCallFunc::create(this,callfunc_selector(LayerLoading::enterSceneWelcome));
//        CCActionInterval* seq =  CCSequence::create(to,fn,NULL);
//        
//        m_loading_bar->runAction(seq);
        
		//合法性检查,注意调用顺序
		Tools* tools =Tools::sharedTools();	
		tools->updateRooted();
		tools->checkEncryptionAll(this);

       bRet = true;
    } while (0);

    return bRet;
}
开发者ID:mrktj,项目名称:OX-poker-good-cocos2dx2.2.5,代码行数:84,代码来源:SceneLoading.cpp


注:本文中的Tools::checkEncryptionAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。