mirror of https://github.com/axmolengine/axmol.git
Merge branch 'gles20' of https://github.com/dumganhar/cocos2d-x into gles20
This commit is contained in:
commit
c3fce65f7f
|
@ -123,22 +123,40 @@ std::string Effect3::title()
|
||||||
// Effect4
|
// Effect4
|
||||||
//
|
//
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
||||||
|
class Lens3DTarget : public CCNode
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void setPosition(const CCPoint& var)
|
||||||
|
{
|
||||||
|
m_pLens3D->setPosition(var);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Lens3DTarget* create(CCLens3D* pAction)
|
||||||
|
{
|
||||||
|
Lens3DTarget* pRet = new Lens3DTarget();
|
||||||
|
pRet->m_pLens3D = pAction;
|
||||||
|
pRet->autorelease();
|
||||||
|
return pRet;
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
CCLens3D* m_pLens3D;
|
||||||
|
};
|
||||||
|
|
||||||
void Effect4::onEnter()
|
void Effect4::onEnter()
|
||||||
{
|
{
|
||||||
EffectAdvanceTextLayer::onEnter();
|
EffectAdvanceTextLayer::onEnter();
|
||||||
|
|
||||||
CCActionInterval* lens = CCLens3D::create(ccp(100,180), 150, ccg(32,24), 10);
|
CCLens3D* lens = CCLens3D::create(ccp(100,180), 150, ccg(32,24), 10);
|
||||||
//id move = [MoveBy::create:5 position:ccp(400,0)];
|
CCActionInterval* move = CCJumpBy::create(5, ccp(380,0), 100, 4);
|
||||||
|
CCActionInterval* move_back = move->reverse();
|
||||||
|
CCActionInterval* seq = (CCActionInterval *)(CCSequence::create( move, move_back, NULL));
|
||||||
|
|
||||||
/**
|
CCDirector* director = CCDirector::sharedDirector();
|
||||||
@todo we only support CCNode run actions now.
|
CCNode* pTarget = Lens3DTarget::create(lens);
|
||||||
*/
|
director->getActionManager()->addAction(seq, pTarget, false);
|
||||||
// CCActionInterval* move = CCJumpBy::create(5, ccp(380,0), 100, 4);
|
addChild(pTarget);
|
||||||
// CCActionInterval* move_back = move->reverse();
|
this->runAction( lens );
|
||||||
// CCActionInterval* seq = (CCActionInterval *)(CCSequence::create( move, move_back, NULL));
|
|
||||||
// CCActionManager::sharedManager()->addAction(seq, lens, false);
|
|
||||||
|
|
||||||
runAction( lens );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Effect4::title()
|
std::string Effect4::title()
|
||||||
|
|
Loading…
Reference in New Issue