本文主要是介绍CCTransitionProgress(场景切换特效 以下子类:CCTransitionProgressRadialCW、Horizontal 、Vertical 、InOut、 OutIn),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
(12)CCTransitionProgressRadialCCW
描述:新场景沿着径向逆时针显示。该效果还有一个变化是CCTransitionProgress RadialCW,让新的场景沿着径向顺时针显示。
(13)CCTransitionProgressHorizontal
描述:新场景沿着横向逐渐显示。该效果还有一个变化是CCTransitionProgressVertical,让新场景沿着纵向逐渐显示。该效果是Cocos2D v2.0新增场景过渡效果。
(14)CCTransitionProgressInOut
描述:新场景由内到外逐渐显示。该效果还有一个变化是CCTransitionProgressOutIn,让新场景由外到内逐渐显示。
#ifndef __CCTRANSITIONPROGRESS_H__
#define __CCTRANSITIONPROGRESS_H__
#include "CCTransition.h"
NS_CC_BEGIN
class CCProgressTimer;
class CCRenderTexture;
/**
* @addtogroup transition
* @{
*/
class CC_DLL CCTransitionProgress : public CCTransitionScene
{
public:
static CCTransitionProgress* create(float t, CCScene* scene);
CCTransitionProgress();
virtual void onEnter();
virtual void onExit();
protected:
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
virtual void setupTransition();
virtual void sceneOrder();
float m_fTo;
float m_fFrom;
CCScene* m_pSceneToBeModified;
};
/** CCTransitionRadialCCW transition.
A counter clock-wise radial transition to the next scene
*/
class CC_DLL CCTransitionProgressRadialCCW : public CCTransitionProgress
{
public:
static CCTransitionProgressRadialCCW* create(float t, CCScene* scene);
protected:
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
};
/** CCTransitionRadialCW transition.
A counter clock-wise radial transition to the next scene
*/
class CC_DLL CCTransitionProgressRadialCW : public CCTransitionProgress
{
public:
static CCTransitionProgressRadialCW* create(float t, CCScene* scene);
protected:
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
};
/** CCTransitionProgressHorizontal transition.
A clock-wise radial transition to the next scene
*/
class CC_DLL CCTransitionProgressHorizontal : public CCTransitionProgress
{
public:
static CCTransitionProgressHorizontal* create(float t, CCScene* scene);
protected:
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
};
class CC_DLL CCTransitionProgressVertical : public CCTransitionProgress
{
public:
static CCTransitionProgressVertical* create(float t, CCScene* scene);
protected:
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
};
class CC_DLL CCTransitionProgressInOut : public CCTransitionProgress
{
public:
static CCTransitionProgressInOut* create(float t, CCScene* scene);
protected:
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
virtual void sceneOrder();
virtual void setupTransition();
};
class CC_DLL CCTransitionProgressOutIn : public CCTransitionProgress
{
public:
static CCTransitionProgressOutIn* create(float t, CCScene* scene);
protected:
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
};
// end of transition group
/// @}
NS_CC_END
#endif /* __CCTRANSITIONPROGRESS_H__ */
这篇关于CCTransitionProgress(场景切换特效 以下子类:CCTransitionProgressRadialCW、Horizontal 、Vertical 、InOut、 OutIn)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!