2012-03-26 16:46:23 +08:00
|
|
|
/****************************************************************************
|
2012-09-24 21:22:20 +08:00
|
|
|
Copyright (c) 2010-2012 cocos2d-x.org
|
2012-03-26 16:46:23 +08:00
|
|
|
Copyright (c) 2009 Lam Pham
|
|
|
|
Copyright (c) 2012 Ricardo Quesada
|
|
|
|
|
|
|
|
http://www.cocos2d-x.org
|
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
|
|
in the Software without restriction, including without limitation the rights
|
|
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
THE SOFTWARE.
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __CCTRANSITIONPROGRESS_H__
|
|
|
|
#define __CCTRANSITIONPROGRESS_H__
|
|
|
|
|
|
|
|
#include "CCTransition.h"
|
|
|
|
|
|
|
|
NS_CC_BEGIN
|
|
|
|
|
|
|
|
class CCProgressTimer;
|
|
|
|
class CCRenderTexture;
|
|
|
|
|
2012-06-20 18:09:11 +08:00
|
|
|
/**
|
|
|
|
* @addtogroup transition
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
2012-03-26 16:46:23 +08:00
|
|
|
class CC_DLL CCTransitionProgress : public CCTransitionScene
|
|
|
|
{
|
|
|
|
public:
|
2012-11-01 22:12:13 +08:00
|
|
|
static CCTransitionProgress* create(float t, CCScene* scene);
|
2012-03-26 16:46:23 +08:00
|
|
|
|
|
|
|
CCTransitionProgress();
|
|
|
|
virtual void onEnter();
|
|
|
|
virtual void onExit();
|
|
|
|
protected:
|
|
|
|
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
|
|
|
|
virtual void setupTransition();
|
|
|
|
virtual void sceneOrder();
|
2013-06-15 14:03:30 +08:00
|
|
|
float _to;
|
|
|
|
float _from;
|
|
|
|
CCScene* _sceneToBeModified;
|
2012-03-26 16:46:23 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** CCTransitionRadialCCW transition.
|
2012-09-17 15:02:24 +08:00
|
|
|
A counter clock-wise radial transition to the next scene
|
2012-03-26 16:46:23 +08:00
|
|
|
*/
|
|
|
|
class CC_DLL CCTransitionProgressRadialCCW : public CCTransitionProgress
|
|
|
|
{
|
|
|
|
public:
|
2012-11-01 22:12:13 +08:00
|
|
|
static CCTransitionProgressRadialCCW* create(float t, CCScene* scene);
|
2012-03-26 16:46:23 +08:00
|
|
|
protected:
|
|
|
|
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** CCTransitionRadialCW transition.
|
2012-09-17 15:02:24 +08:00
|
|
|
A counter clock-wise radial transition to the next scene
|
2012-03-26 16:46:23 +08:00
|
|
|
*/
|
|
|
|
class CC_DLL CCTransitionProgressRadialCW : public CCTransitionProgress
|
|
|
|
{
|
|
|
|
public:
|
2012-11-01 22:12:13 +08:00
|
|
|
static CCTransitionProgressRadialCW* create(float t, CCScene* scene);
|
2012-03-26 16:46:23 +08:00
|
|
|
protected:
|
|
|
|
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/** CCTransitionProgressHorizontal transition.
|
2012-09-17 15:02:24 +08:00
|
|
|
A clock-wise radial transition to the next scene
|
2012-03-26 16:46:23 +08:00
|
|
|
*/
|
|
|
|
class CC_DLL CCTransitionProgressHorizontal : public CCTransitionProgress
|
|
|
|
{
|
|
|
|
public:
|
2012-12-06 18:51:33 +08:00
|
|
|
|
2012-11-01 22:12:13 +08:00
|
|
|
static CCTransitionProgressHorizontal* create(float t, CCScene* scene);
|
2012-03-26 16:46:23 +08:00
|
|
|
protected:
|
|
|
|
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
class CC_DLL CCTransitionProgressVertical : public CCTransitionProgress
|
|
|
|
{
|
|
|
|
public:
|
2012-12-06 18:51:33 +08:00
|
|
|
|
2012-11-01 22:12:13 +08:00
|
|
|
static CCTransitionProgressVertical* create(float t, CCScene* scene);
|
2012-03-26 16:46:23 +08:00
|
|
|
protected:
|
|
|
|
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
class CC_DLL CCTransitionProgressInOut : public CCTransitionProgress
|
|
|
|
{
|
|
|
|
public:
|
2012-12-06 18:51:33 +08:00
|
|
|
|
2012-11-01 22:12:13 +08:00
|
|
|
static CCTransitionProgressInOut* create(float t, CCScene* scene);
|
2012-03-26 16:46:23 +08:00
|
|
|
protected:
|
|
|
|
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
|
|
|
|
virtual void sceneOrder();
|
|
|
|
virtual void setupTransition();
|
|
|
|
};
|
|
|
|
|
|
|
|
class CC_DLL CCTransitionProgressOutIn : public CCTransitionProgress
|
|
|
|
{
|
|
|
|
public:
|
2012-12-06 18:51:33 +08:00
|
|
|
|
2012-11-01 22:12:13 +08:00
|
|
|
static CCTransitionProgressOutIn* create(float t, CCScene* scene);
|
2012-03-26 16:46:23 +08:00
|
|
|
protected:
|
|
|
|
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2012-06-20 18:09:11 +08:00
|
|
|
// end of transition group
|
|
|
|
/// @}
|
|
|
|
|
2012-03-26 16:46:23 +08:00
|
|
|
NS_CC_END
|
|
|
|
|
|
|
|
#endif /* __CCTRANSITIONPROGRESS_H__ */
|
|
|
|
|