2013-12-24 18:33:19 +08:00
|
|
|
/****************************************************************************
|
2014-01-07 11:47:11 +08:00
|
|
|
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
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 __ActionEaseEx_H__
|
|
|
|
#define __ActionEaseEx_H__
|
|
|
|
|
2013-12-26 17:37:02 +08:00
|
|
|
#include "cocostudio/CocoStudio.h"
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
namespace cocostudio {
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Bezier
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 21:23:24 +08:00
|
|
|
class EaseBezierAction : public cocos2d::ActionEase
|
2013-12-24 18:33:19 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseBezierAction* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseBezierAction* clone() const override;
|
|
|
|
virtual EaseBezierAction* reverse() const override;
|
|
|
|
|
|
|
|
virtual void setBezierParamer( float p0, float p1, float p2, float p3);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseBezierAction() {}
|
|
|
|
virtual ~EaseBezierAction() {}
|
|
|
|
|
|
|
|
float _p0;
|
|
|
|
float _p1;
|
|
|
|
float _p2;
|
|
|
|
float _p3;
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseBezierAction);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Quadratic In
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 18:33:19 +08:00
|
|
|
class EaseQuadraticActionIn:public cocos2d::ActionEase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseQuadraticActionIn* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuadraticActionIn* clone() const override;
|
|
|
|
virtual EaseQuadraticActionIn* reverse() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseQuadraticActionIn() {}
|
|
|
|
virtual ~EaseQuadraticActionIn() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuadraticActionIn);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Quadratic Out
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 18:33:19 +08:00
|
|
|
class EaseQuadraticActionOut:public cocos2d::ActionEase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseQuadraticActionOut* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuadraticActionOut* clone() const override;
|
|
|
|
virtual EaseQuadraticActionOut* reverse() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseQuadraticActionOut() {}
|
|
|
|
virtual ~EaseQuadraticActionOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuadraticActionOut);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Quadratic InOut
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 18:33:19 +08:00
|
|
|
class EaseQuadraticActionInOut:public cocos2d::ActionEase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseQuadraticActionInOut* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuadraticActionInOut* clone() const override;
|
|
|
|
virtual EaseQuadraticActionInOut* reverse() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseQuadraticActionInOut() {}
|
|
|
|
virtual ~EaseQuadraticActionInOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuadraticActionInOut);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Quartic In
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 18:33:19 +08:00
|
|
|
class EaseQuarticActionIn:public cocos2d::ActionEase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseQuarticActionIn* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuarticActionIn* clone() const override;
|
|
|
|
virtual EaseQuarticActionIn* reverse() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseQuarticActionIn() {}
|
|
|
|
virtual ~EaseQuarticActionIn() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuarticActionIn);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Quartic Out
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 18:33:19 +08:00
|
|
|
class EaseQuarticActionOut:public cocos2d::ActionEase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseQuarticActionOut* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuarticActionOut* clone() const override;
|
|
|
|
virtual EaseQuarticActionOut* reverse() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseQuarticActionOut() {}
|
|
|
|
virtual ~EaseQuarticActionOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuarticActionOut);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Quartic InOut
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 18:33:19 +08:00
|
|
|
class EaseQuarticActionInOut:public cocos2d::ActionEase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseQuarticActionInOut* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuarticActionInOut* clone() const override;
|
|
|
|
virtual EaseQuarticActionInOut* reverse() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseQuarticActionInOut() {}
|
|
|
|
virtual ~EaseQuarticActionInOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuarticActionInOut);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Quintic In
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 18:33:19 +08:00
|
|
|
class EaseQuinticActionIn:public cocos2d::ActionEase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseQuinticActionIn* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuinticActionIn* clone() const override;
|
|
|
|
virtual EaseQuinticActionIn* reverse() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseQuinticActionIn() {}
|
|
|
|
virtual ~EaseQuinticActionIn() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuinticActionIn);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Quintic Out
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 18:33:19 +08:00
|
|
|
class EaseQuinticActionOut:public cocos2d::ActionEase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseQuinticActionOut* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuinticActionOut* clone() const override;
|
|
|
|
virtual EaseQuinticActionOut* reverse() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseQuinticActionOut() {}
|
|
|
|
virtual ~EaseQuinticActionOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuinticActionOut);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Quintic InOut
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 18:33:19 +08:00
|
|
|
class EaseQuinticActionInOut:public cocos2d::ActionEase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseQuinticActionInOut* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuinticActionInOut* clone() const override;
|
|
|
|
virtual EaseQuinticActionInOut* reverse() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseQuinticActionInOut() {}
|
|
|
|
virtual ~EaseQuinticActionInOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuinticActionInOut);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Circle In
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 18:33:19 +08:00
|
|
|
class EaseCircleActionIn:public cocos2d::ActionEase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseCircleActionIn* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseCircleActionIn* clone() const override;
|
|
|
|
virtual EaseCircleActionIn* reverse() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseCircleActionIn() {}
|
|
|
|
virtual ~EaseCircleActionIn() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseCircleActionIn);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Circle Out
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 18:33:19 +08:00
|
|
|
class EaseCircleActionOut:public cocos2d::ActionEase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseCircleActionOut* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseCircleActionOut* clone() const override;
|
|
|
|
virtual EaseCircleActionOut* reverse() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseCircleActionOut() {}
|
|
|
|
virtual ~EaseCircleActionOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseCircleActionOut);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Circle InOut
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 18:33:19 +08:00
|
|
|
class EaseCircleActionInOut:public cocos2d::ActionEase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseCircleActionInOut* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseCircleActionInOut* clone() const override;
|
|
|
|
virtual EaseCircleActionInOut* reverse() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseCircleActionInOut() {}
|
|
|
|
virtual ~EaseCircleActionInOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseCircleActionInOut);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Cubic In
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 18:33:19 +08:00
|
|
|
class EaseCubicActionIn:public cocos2d::ActionEase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseCubicActionIn* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseCubicActionIn* clone() const override;
|
|
|
|
virtual EaseCubicActionIn* reverse() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseCubicActionIn() {}
|
|
|
|
virtual ~EaseCubicActionIn() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseCubicActionIn);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Cubic Out
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 18:33:19 +08:00
|
|
|
class EaseCubicActionOut:public cocos2d::ActionEase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseCubicActionOut* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseCubicActionOut* clone() const override;
|
|
|
|
virtual EaseCubicActionOut* reverse() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseCubicActionOut() {}
|
|
|
|
virtual ~EaseCubicActionOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseCubicActionOut);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2013-12-26 16:29:59 +08:00
|
|
|
@brief Ease Cubic InOut
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2013-12-24 18:33:19 +08:00
|
|
|
class EaseCubicActionInOut:public cocos2d::ActionEase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action */
|
2013-12-26 16:29:59 +08:00
|
|
|
static EaseCubicActionInOut* create(cocos2d::ActionInterval* action);
|
2013-12-24 18:33:19 +08:00
|
|
|
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseCubicActionInOut* clone() const override;
|
|
|
|
virtual EaseCubicActionInOut* reverse() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
EaseCubicActionInOut() {}
|
|
|
|
virtual ~EaseCubicActionInOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseCubicActionInOut);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|