CCTransitionPageTurn



#ifndef __CCPAGE_TURN_TRANSITION_H__

#define __CCPAGE_TURN_TRANSITION_H__


#include "CCTransition.h"


NS_CC_BEGIN


/**

 * @addtogroup transition

 * @{

 */


/**

@brief A transition which peels back the bottom right hand corner of a scene

to transition to the scene beneath it simulating a page turn.


This uses a 3DAction so it's strongly recommended that depth buffering

is turned on in CCDirector using:


 CCDirector::sharedDirector()->setDepthBufferFormat(kDepthBuffer16);


 @since v0.8.2

*/

class CC_DLL CCTransitionPageTurn : public CCTransitionScene

{

protected:

    bool    m_bBack;

    

public:

    CCTransitionPageTurn();

    virtual ~CCTransitionPageTurn();


    /**

    * Creates a base transition with duration and incoming scene.

    * If back is true then the effect is reversed to appear as if the incoming 

    * scene is being turned from left over the outgoing scene.

    */

    static CCTransitionPageTurn* create(float t,CCScene* scene,bool backwards);


    /**

    * Creates a base transition with duration and incoming scene.

    * If back is true then the effect is reversed to appear as if the incoming 

    * scene is being turned from left over the outgoing scene.

    */

    virtual bool initWithDuration(float t,CCScene* scene,bool backwards);


    CCActionInterval* actionWithSize(const CCSize& vector);


    virtual void onEnter();


protected:

    virtual void sceneOrder();

};


// end of transition group

/// @}


NS_CC_END


#endif // __CCPAGE_TURN_TRANSITION_H__


posted @ 2014-05-21 19:12  sssssnian  阅读(117)  评论(0)    收藏  举报