コード例 #1
0
void ShopDialogEntry::onEnter()
{
	cocos2d::Node::onEnter();

	CCBAnimationManager *animationManager = dynamic_cast<CCBAnimationManager*>(this->getUserObject());
	animationManager->setDelegate(this);
}
コード例 #2
0
ファイル: SinglePlayerScene.cpp プロジェクト: eiji11/takyan
void SinglePlayerScene::onEnter()
{
    cocos2d::Node::onEnter();

    CCBAnimationManager *animationManager = dynamic_cast<CCBAnimationManager*>(this->getUserObject());
    animationManager->setDelegate(this);

    setKeyboardEnabled(true);

    if (!m_enterred)
    {
        _playerSprite->setSpriteFrame(StringUtils::format("%ssteady.png", m_framePrefix.c_str()));
        auto bg = Director::getInstance()->getTextureCache()->addImage(m_game->getBackground());
        _background->setTexture(bg);

        this->setupPhysics();

        this->setupListeners();

        if (!m_game->isPracticeMode())
        {
            m_game->getPlayer()->addPlays(1);
        }
    }

    m_enterred = true;
}
コード例 #3
0
void Explosion::onNodeLoaded(cocos2d::CCNode * pNode, cocos2d::extension::CCNodeLoader * pNodeLoader)
{
  CCBAnimationManager* animationManager = dynamic_cast<CCBAnimationManager*>(this->getUserObject());
  if (animationManager) {
    animationManager->setDelegate(this);
  }
}
コード例 #4
0
void HowToPlayScene::onExit()
{
	cocos2d::Node::onExit();

	CCBAnimationManager *animationManager = dynamic_cast<CCBAnimationManager*>(this->getUserObject());
	animationManager->setDelegate(NULL);

}
コード例 #5
0
ファイル: ComicsScene.cpp プロジェクト: eiji11/clear-graffiti
void ComicsScene::onExit()
{
	cocos2d::Layer::onExit();

	CCBAnimationManager *animationManager = dynamic_cast<CCBAnimationManager*>(this->getUserObject());
	animationManager->setDelegate(NULL);

}
コード例 #6
0
ファイル: AboutMenu.cpp プロジェクト: eiji11/clear-graffiti
void AboutMenu::onExit()
{
	cocos2d::Node::onExit();

	CCBAnimationManager *animationManager = dynamic_cast<CCBAnimationManager*>(this->getUserObject());
	animationManager->setDelegate(NULL);

    UI_LOCK_MANAGER_DECREASE();
}
コード例 #7
0
ファイル: SinglePlayerScene.cpp プロジェクト: eiji11/takyan
void SinglePlayerScene::onExit()
{
    cocos2d::Node::onExit();

    CCBAnimationManager *animationManager = dynamic_cast<CCBAnimationManager*>(this->getUserObject());
    animationManager->setDelegate(NULL);

    UNOBSERVE(this);
}
コード例 #8
0
void SettingsDialog::onEnter()
{
	cocos2d::Node::onEnter();

	CCBAnimationManager *animationManager = dynamic_cast<CCBAnimationManager*>(this->getUserObject());
	animationManager->setDelegate(this);

	this->setKeyboardEnabled(true);
    
    UI_LOCK_MANAGER_INCREASE();
}
コード例 #9
0
ファイル: BasicPanel.cpp プロジェクト: StevenFm/bbt
int BasicPanel::LuaRemoveAnimationDelegate(lua_State *L)
{
    CCBAnimationManager* pManager = NULL;
    
    XYLOG_FAILED_JUMP(lua_gettop(L) == 0);
    
    pManager = dynamic_cast<CCBAnimationManager*>(this->getUserObject());
    pManager->setDelegate(NULL);
Exit0:
    return 0;
}
コード例 #10
0
void HowToPlayScene::onEnter()
{
	cocos2d::Node::onEnter();

	CCBAnimationManager *animationManager = dynamic_cast<CCBAnimationManager*>(this->getUserObject());
	animationManager->setDelegate(this);

	this->setKeyboardEnabled(true);
    
    m_currentPage = 0;
    
    this->fixArrows();
}
コード例 #11
0
ファイル: ComicsScene.cpp プロジェクト: eiji11/clear-graffiti
void ComicsScene::onEnter()
{
	cocos2d::Layer::onEnter();

	CCBAnimationManager *animationManager = dynamic_cast<CCBAnimationManager*>(this->getUserObject());
	animationManager->setDelegate(this);

	this->setKeyboardEnabled(true);

    if (IS_SOUND_ENABLED)
    {
    	PLAY_SOUND("pageflip.mp3");
    }
}
コード例 #12
0
FMUIWorldMap::FMUIWorldMap() :
    m_parentNode(NULL),
//    m_rewardParent(NULL),
    m_giftButton(NULL),
    m_facebookButton(NULL),
    m_rewardAnim(NULL),
    m_isShown(false),
    m_isExpand(false),
    m_isBonusExpand(false),
    m_wxNode(NULL),
    m_dailyAnim(NULL),
    m_friendsAnim(NULL),
    m_inviteAnim(NULL),
    m_hasNewQuest(false),
    m_bookBtn(NULL),
    m_spinTimesLabel(NULL),
    m_spinButton(NULL),
    m_unlimitLifeAnim(NULL),
    m_iapGoldBonusAni(NULL),
    m_starRewardAni(NULL),
    m_bonusNode(NULL)
{
    m_ccbNode = FMDataManager::sharedManager()->createNode("UI/FMUIWorldMap.ccbi", this);
    addChild(m_ccbNode);
    
    CCBAnimationManager * manager = (CCBAnimationManager *)m_ccbNode->getUserObject();
    manager->setDelegate(this);
    
//    NEAnimNode * facebook = NEAnimNode::createNodeFromFile("FMUIButtonList.ani");
//    m_rewardParent->addChild(facebook, 1, 1);
    
    //init button list

#ifdef BRANCH_CN
//    CCControlButton * arrowButton = CCControlButton::create(CCScale9Sprite::create("transparent.png"));
//    arrowButton->setPreferredSize(CCSize(40, 21));
//    arrowButton->setAnchorPoint(CCPointZero);
//    arrowButton->addTargetWithActionForControlEvents(this, cccontrol_selector(FMUIWorldMap::clickMenuButton), CCControlEventTouchUpInside);
//    
//    p = facebook->getNodeByName("ButtonArrow");
//    p->addChild(arrowButton, 0, 1);
//    
//    CCControlButton * button1 = CCControlButton::create(CCScale9Sprite::create("transparent.png"));
//    button1->setPreferredSize(CCSize(37, 37));
//    button1->setAnchorPoint(CCPointZero);
//    button1->addTargetWithActionForControlEvents(this, cccontrol_selector(FMUIWorldMap::clickMenuButton), CCControlEventTouchDown);
//    
//    p = facebook->getNodeByName("Button1");
//    p->addChild(button1, 0, 3);
//    
//    CCControlButton * button2 = CCControlButton::create(CCScale9Sprite::create("transparent.png"));
//    button2->setPreferredSize(CCSize(37, 37));
//    button2->setAnchorPoint(CCPointZero);
//    button2->addTargetWithActionForControlEvents(this, cccontrol_selector(FMUIWorldMap::clickMenuButton), CCControlEventTouchDown);
//    
//    p = facebook->getNodeByName("Button2");
//    p->addChild(button2, 0, 4);
    CCLabelBMFont* label = (CCLabelBMFont*)m_friendsAnim->getNodeByName("Label");
    label->setWidth(m_widthForThreeCN);
    label->setAlignment(kCCTextAlignmentCenter);
    label->setLineBreakWithoutSpace(FMDataManager::sharedManager()->isCharacterType());
    
    label = (CCLabelBMFont*)m_rewardAnim->getNodeByName("Label");
    label->setWidth(m_widthForTwoCN);
    label->setAlignment(kCCTextAlignmentCenter);
    label->setLineBreakWithoutSpace(FMDataManager::sharedManager()->isCharacterType());
#ifdef BRANCH_CN
    m_rewardAnim->setVisible(!FMDataManager::sharedManager()->hasPurchasedUnlimitLife());
#endif

    
    
    label = (CCLabelBMFont*)m_dailyAnim->getNodeByName("Label");
    label->setWidth(m_widthForTwoCN);
    label->setAlignment(kCCTextAlignmentCenter);
    label->setLineBreakWithoutSpace(FMDataManager::sharedManager()->isCharacterType());
    
    label = (CCLabelBMFont*)m_inviteAnim->getNodeByName("Label");
    label->setWidth(m_widthForTwoCN);
    label->setAlignment(kCCTextAlignmentCenter);
    label->setLineBreakWithoutSpace(FMDataManager::sharedManager()->isCharacterType());
#endif

    CCSprite * tbg = CCSprite::createWithSpriteFrameName("UnreadMessage.png");
    tbg->setAnchorPoint(ccp(1, 1));
    tbg->setPosition(ccp(m_spinButton->getContentSize().width, m_spinButton->getContentSize().height));
    tbg->setScale(1.2f);
    m_spinButton->addChild(tbg);
    
    m_spinTimesLabel = CCLabelBMFont::create("", "font_7.fnt", 50, kCCTextAlignmentCenter);
    tbg->addChild(m_spinTimesLabel);
    m_spinTimesLabel->setPosition(ccp(tbg->getContentSize().width/2 - 0.5f , tbg->getContentSize().height/2 - 0.5f ));

    scheduleUpdate();
}
コード例 #13
0
ファイル: BasicPanel.cpp プロジェクト: StevenFm/bbt
void BasicPanel::SetAnimationDelegate()
{
	CCBAnimationManager* pManager	= dynamic_cast<CCBAnimationManager*>(this->getUserObject());
	pManager->setDelegate(this);
}