2011-03-19 10:59:01 +08:00
|
|
|
/****************************************************************************
|
|
|
|
Copyright (c) 2008-2009 Jason Booth
|
2014-01-07 11:25:07 +08:00
|
|
|
Copyright (c) 2010-2012 cocos2d-x.org
|
2016-04-08 13:40:36 +08:00
|
|
|
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
2011-03-19 10:59:01 +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 __ACTION_CCEASE_ACTION_H__
|
|
|
|
#define __ACTION_CCEASE_ACTION_H__
|
|
|
|
|
2014-04-27 01:11:22 +08:00
|
|
|
#include "2d/CCActionInterval.h"
|
2011-03-19 10:59:01 +08:00
|
|
|
|
2012-04-18 18:43:45 +08:00
|
|
|
NS_CC_BEGIN
|
2011-03-19 10:59:01 +08:00
|
|
|
|
2012-06-20 18:09:11 +08:00
|
|
|
/**
|
|
|
|
* @addtogroup actions
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class ActionEase
|
|
|
|
@brief Base class for Easing actions.
|
2015-03-19 15:59:58 +08:00
|
|
|
@details Ease actions are created from other interval actions.
|
2015-03-18 18:15:34 +08:00
|
|
|
The ease action will change the timeline of the inner action.
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL ActionEase : public ActionInterval
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Get the pointer of the inner action.
|
|
|
|
@return The pointer of the inner action.
|
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
virtual ActionInterval* getInnerAction();
|
2010-08-10 14:02:13 +08:00
|
|
|
|
2013-07-16 03:43:22 +08:00
|
|
|
//
|
|
|
|
// Overrides
|
|
|
|
//
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual ActionEase* clone() const override
|
2014-07-11 10:19:49 +08:00
|
|
|
{
|
|
|
|
CC_ASSERT(0);
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual ActionEase* reverse() const override
|
|
|
|
{
|
|
|
|
CC_ASSERT(0);
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2013-07-18 07:56:19 +08:00
|
|
|
virtual void startWithTarget(Node *target) override;
|
2013-11-16 21:08:00 +08:00
|
|
|
virtual void stop() override;
|
2013-07-16 03:43:22 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2016-04-08 13:40:36 +08:00
|
|
|
ActionEase()
|
|
|
|
: _inner(nullptr)
|
|
|
|
{}
|
|
|
|
|
2013-11-22 09:06:06 +08:00
|
|
|
virtual ~ActionEase();
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Initializes the action.
|
|
|
|
@return Return true when the initialization success, otherwise return false.
|
|
|
|
*/
|
2013-11-22 09:06:06 +08:00
|
|
|
bool initWithAction(ActionInterval *action);
|
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
protected:
|
2012-12-26 18:59:31 +08:00
|
|
|
/** The inner action */
|
2013-06-20 14:13:12 +08:00
|
|
|
ActionInterval *_inner;
|
2013-11-22 09:06:06 +08:00
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(ActionEase);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseRateAction
|
|
|
|
@brief Base class for Easing actions with rate parameters.
|
2015-03-19 15:59:58 +08:00
|
|
|
@details Ease the inner action with specified rate.
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseRateAction : public ActionEase
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-04-24 18:31:44 +08:00
|
|
|
/**
|
|
|
|
@brief Creates the action with the inner action and the rate parameter.
|
|
|
|
@param action A given ActionInterval
|
|
|
|
@param rate A given rate
|
|
|
|
@return An autoreleased EaseRateAction object.
|
|
|
|
**/
|
|
|
|
static EaseRateAction* create(ActionInterval* action, float rate);
|
|
|
|
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Set the rate value for the ease rate action.
|
|
|
|
@param rate The value will be set.
|
|
|
|
*/
|
2013-06-15 14:03:30 +08:00
|
|
|
inline void setRate(float rate) { _rate = rate; }
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Get the rate value of the ease rate action.
|
|
|
|
@return Return the rate value of the ease rate action.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
inline float getRate() const { return _rate; }
|
2010-09-28 16:18:05 +08:00
|
|
|
|
2013-07-16 03:43:22 +08:00
|
|
|
//
|
|
|
|
// Overrides
|
|
|
|
//
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseRateAction* clone() const override
|
2014-07-11 10:19:49 +08:00
|
|
|
{
|
|
|
|
CC_ASSERT(0);
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
virtual EaseRateAction* reverse() const override
|
|
|
|
{
|
|
|
|
CC_ASSERT(0);
|
|
|
|
return nullptr;
|
|
|
|
}
|
2010-08-10 14:02:13 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseRateAction() {}
|
|
|
|
virtual ~EaseRateAction();
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Initializes the action with the inner action and the rate parameter.
|
|
|
|
@param pAction The pointer of the inner action.
|
|
|
|
@param fRate The value of the rate parameter.
|
|
|
|
@return Return true when the initialization success, otherwise return false.
|
|
|
|
*/
|
2013-11-22 09:06:06 +08:00
|
|
|
bool initWithAction(ActionInterval *pAction, float fRate);
|
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
protected:
|
2013-06-15 14:03:30 +08:00
|
|
|
float _rate;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseRateAction);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseIn
|
|
|
|
@brief EaseIn action with a rate.
|
2015-03-19 15:59:58 +08:00
|
|
|
@details The timeline of inner action will be changed by:
|
2015-03-18 20:56:17 +08:00
|
|
|
\f${ time }^{ rate }\f$.
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseIn : public EaseRateAction
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action and the rate parameter.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@param rate The value of the rate parameter.
|
|
|
|
@return A pointer of EaseIn action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseIn* create(ActionInterval* action, float rate);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseIn* clone() const override;
|
|
|
|
virtual EaseIn* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseIn() {}
|
|
|
|
virtual ~EaseIn() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseIn);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseOut
|
|
|
|
@brief EaseOut action with a rate.
|
2015-03-19 15:59:58 +08:00
|
|
|
@details The timeline of inner action will be changed by:
|
2015-03-18 20:56:17 +08:00
|
|
|
\f${ time }^ { (1/rate) }\f$.
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseOut : public EaseRateAction
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action and the rate parameter.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@param rate The value of the rate parameter.
|
|
|
|
@return A pointer of EaseOut action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseOut* create(ActionInterval* action, float rate);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseOut* clone() const override;
|
|
|
|
virtual EaseOut* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseOut() {}
|
|
|
|
virtual ~EaseOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseOut);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseInOut
|
2013-06-20 14:13:12 +08:00
|
|
|
@brief EaseInOut action with a rate
|
2015-03-19 15:59:58 +08:00
|
|
|
@details If time * 2 < 1, the timeline of inner action will be changed by:
|
2015-03-18 20:56:17 +08:00
|
|
|
\f$0.5*{ time }^{ rate }\f$.
|
2015-03-18 18:15:34 +08:00
|
|
|
Else, the timeline of inner action will be changed by:
|
2015-03-18 20:56:17 +08:00
|
|
|
\f$1.0-0.5*{ 2-time }^{ rate }\f$.
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseInOut : public EaseRateAction
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action and the rate parameter.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@param rate The value of the rate parameter.
|
|
|
|
@return A pointer of EaseInOut action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseInOut* create(ActionInterval* action, float rate);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseInOut* clone() const override;
|
|
|
|
virtual EaseInOut* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseInOut() {}
|
|
|
|
virtual ~EaseInOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseInOut);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseExponentialIn
|
|
|
|
@brief Ease Exponential In action.
|
2015-03-19 15:59:58 +08:00
|
|
|
@details The timeline of inner action will be changed by:
|
2015-03-18 20:56:17 +08:00
|
|
|
\f${ 2 }^{ 10*(time-1) }-1*0.001\f$.
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseExponentialIn : public ActionEase
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
2011-03-19 10:59:01 +08:00
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseExponentialIn action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseExponentialIn* create(ActionInterval* action);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseExponentialIn* clone() const override;
|
|
|
|
virtual ActionEase* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseExponentialIn() {}
|
|
|
|
virtual ~EaseExponentialIn() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseExponentialIn);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseExponentialOut
|
2010-09-28 18:27:33 +08:00
|
|
|
@brief Ease Exponential Out
|
2015-03-19 15:59:58 +08:00
|
|
|
@details The timeline of inner action will be changed by:
|
2015-03-18 20:56:17 +08:00
|
|
|
\f$1-{ 2 }^{ -10*(time-1) }\f$.
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseExponentialOut : public ActionEase
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
2011-03-19 10:59:01 +08:00
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseExponentialOut action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseExponentialOut* create(ActionInterval* action);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseExponentialOut* clone() const override;
|
|
|
|
virtual ActionEase* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseExponentialOut() {}
|
|
|
|
virtual ~EaseExponentialOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseExponentialOut);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseExponentialInOut
|
2010-09-28 18:27:33 +08:00
|
|
|
@brief Ease Exponential InOut
|
2015-03-19 15:59:58 +08:00
|
|
|
@details If time * 2 < 1, the timeline of inner action will be changed by:
|
2015-03-18 20:56:17 +08:00
|
|
|
\f$0.5*{ 2 }^{ 10*(time-1) }\f$.
|
2015-03-18 18:15:34 +08:00
|
|
|
else, the timeline of inner action will be changed by:
|
2015-03-18 20:56:17 +08:00
|
|
|
\f$0.5*(2-{ 2 }^{ -10*(time-1) })\f$.
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseExponentialInOut : public ActionEase
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseExponentialInOut action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseExponentialInOut* create(ActionInterval* action);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseExponentialInOut* clone() const override;
|
|
|
|
virtual EaseExponentialInOut* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseExponentialInOut() {}
|
|
|
|
virtual ~EaseExponentialInOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseExponentialInOut);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseSineIn
|
2010-09-28 18:27:33 +08:00
|
|
|
@brief Ease Sine In
|
2015-03-19 15:59:58 +08:00
|
|
|
@details The timeline of inner action will be changed by:
|
2015-03-18 20:56:17 +08:00
|
|
|
\f$1-cos(time*\frac { \pi }{ 2 } )\f$.
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseSineIn : public ActionEase
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
2011-03-19 10:59:01 +08:00
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseSineIn action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseSineIn* create(ActionInterval* action);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseSineIn* clone() const override;
|
|
|
|
virtual ActionEase* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseSineIn() {}
|
|
|
|
virtual ~EaseSineIn() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseSineIn);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseSineOut
|
2010-09-28 18:27:33 +08:00
|
|
|
@brief Ease Sine Out
|
2015-03-19 15:59:58 +08:00
|
|
|
@details The timeline of inner action will be changed by:
|
2015-03-18 20:56:17 +08:00
|
|
|
\f$sin(time*\frac { \pi }{ 2 } )\f$.
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseSineOut : public ActionEase
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseSineOut action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseSineOut* create(ActionInterval* action);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseSineOut* clone() const override;
|
|
|
|
virtual ActionEase* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseSineOut() {}
|
|
|
|
virtual ~EaseSineOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseSineOut);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseSineInOut
|
2010-09-28 18:27:33 +08:00
|
|
|
@brief Ease Sine InOut
|
2015-03-19 15:59:58 +08:00
|
|
|
@details The timeline of inner action will be changed by:
|
2015-03-18 20:56:17 +08:00
|
|
|
\f$-0.5*(cos(\pi *time)-1)\f$.
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseSineInOut : public ActionEase
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseSineInOut action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseSineInOut* create(ActionInterval* action);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseSineInOut* clone() const override;
|
|
|
|
virtual EaseSineInOut* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseSineInOut() {}
|
|
|
|
virtual ~EaseSineInOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseSineInOut);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseElastic
|
2010-09-28 18:27:33 +08:00
|
|
|
@brief Ease Elastic abstract class
|
2010-08-10 14:02:13 +08:00
|
|
|
@since v0.8.2
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseElastic : public ActionEase
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-07-16 03:43:22 +08:00
|
|
|
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Get period of the wave in radians. Default value is 0.3.
|
|
|
|
@return Return the period of the wave in radians.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
inline float getPeriod() const { return _period; }
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Set period of the wave in radians.
|
|
|
|
@param fPeriod The value will be set.
|
|
|
|
*/
|
2013-06-15 14:03:30 +08:00
|
|
|
inline void setPeriod(float fPeriod) { _period = fPeriod; }
|
2010-08-10 14:02:13 +08:00
|
|
|
|
2013-07-16 03:43:22 +08:00
|
|
|
//
|
|
|
|
// Overrides
|
|
|
|
//
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseElastic* clone() const override
|
2014-07-11 10:19:49 +08:00
|
|
|
{
|
|
|
|
CC_ASSERT(0);
|
|
|
|
return nullptr;
|
|
|
|
}
|
2014-07-18 14:53:00 +08:00
|
|
|
|
2014-07-11 10:19:49 +08:00
|
|
|
virtual EaseElastic* reverse() const override
|
|
|
|
{
|
|
|
|
CC_ASSERT(0);
|
|
|
|
return nullptr;
|
|
|
|
}
|
2012-12-06 18:51:33 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseElastic() {}
|
|
|
|
virtual ~EaseElastic() {}
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Initializes the action with the inner action and the period in radians.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@param period Period of the wave in radians. Default is 0.3.
|
|
|
|
@return Return true when the initialization success, otherwise return false.
|
|
|
|
*/
|
2013-11-22 09:06:06 +08:00
|
|
|
bool initWithAction(ActionInterval *action, float period = 0.3f);
|
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
protected:
|
2013-06-15 14:03:30 +08:00
|
|
|
float _period;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseElastic);
|
|
|
|
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseElasticIn
|
2010-09-28 18:27:33 +08:00
|
|
|
@brief Ease Elastic In action.
|
2015-03-19 15:59:58 +08:00
|
|
|
@details If time == 0 or time == 1, the timeline of inner action will not be changed.
|
2015-03-18 18:15:34 +08:00
|
|
|
Else, the timeline of inner action will be changed by:
|
2015-03-18 20:56:17 +08:00
|
|
|
\f$-{ 2 }^{ 10*(time-1) }*sin((time-1-\frac { period }{ 4 } )*\pi *2/period)\f$.
|
2015-03-18 18:15:34 +08:00
|
|
|
|
|
|
|
@warning This action doesn't use a bijective function.
|
|
|
|
Actions like Sequence might have an unexpected result when used with this action.
|
2010-08-10 14:02:13 +08:00
|
|
|
@since v0.8.2
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseElasticIn : public EaseElastic
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the EaseElasticIn action with the inner action and the period in radians.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@param period Period of the wave in radians.
|
|
|
|
@return A pointer of EaseElasticIn action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseElasticIn* create(ActionInterval *action, float period);
|
2015-03-18 18:15:34 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Create the EaseElasticIn action with the inner action and period value is 0.3.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseElasticIn action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseElasticIn* create(ActionInterval *action);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseElasticIn* clone() const override;
|
|
|
|
virtual EaseElastic* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseElasticIn() {}
|
|
|
|
virtual ~EaseElasticIn() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseElasticIn);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseElasticOut
|
2010-09-28 18:27:33 +08:00
|
|
|
@brief Ease Elastic Out action.
|
2015-03-19 15:59:58 +08:00
|
|
|
@details If time == 0 or time == 1, the timeline of inner action will not be changed.
|
2015-03-18 18:15:34 +08:00
|
|
|
Else, the timeline of inner action will be changed by:
|
2015-03-18 20:56:17 +08:00
|
|
|
\f${ 2 }^{ -10*time }*sin((time-\frac { period }{ 4 } )*\pi *2/period)+1\f$.
|
2015-03-18 18:15:34 +08:00
|
|
|
@warning This action doesn't use a bijective function.
|
|
|
|
Actions like Sequence might have an unexpected result when used with this action.
|
2010-08-10 14:02:13 +08:00
|
|
|
@since v0.8.2
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseElasticOut : public EaseElastic
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the EaseElasticOut action with the inner action and the period in radians.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@param period Period of the wave in radians.
|
|
|
|
@return A pointer of EaseElasticOut action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseElasticOut* create(ActionInterval *action, float period);
|
2015-03-18 18:15:34 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Create the EaseElasticOut action with the inner action and period value is 0.3.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseElasticOut action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseElasticOut* create(ActionInterval *action);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseElasticOut* clone() const override;
|
|
|
|
virtual EaseElastic* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseElasticOut() {}
|
|
|
|
virtual ~EaseElasticOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseElasticOut);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseElasticInOut
|
2010-09-28 18:27:33 +08:00
|
|
|
@brief Ease Elastic InOut action.
|
2015-03-18 18:15:34 +08:00
|
|
|
@warning This action doesn't use a bijective function.
|
|
|
|
Actions like Sequence might have an unexpected result when used with this action.
|
2010-08-10 14:02:13 +08:00
|
|
|
@since v0.8.2
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseElasticInOut : public EaseElastic
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the EaseElasticInOut action with the inner action and the period in radians.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@param period Period of the wave in radians.
|
|
|
|
@return A pointer of EaseElasticInOut action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseElasticInOut* create(ActionInterval *action, float period);
|
2015-03-18 18:15:34 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Create the EaseElasticInOut action with the inner action and period value is 0.3.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseElasticInOut action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseElasticInOut* create(ActionInterval *action);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseElasticInOut* clone() const override;
|
|
|
|
virtual EaseElasticInOut* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseElasticInOut() {}
|
|
|
|
virtual ~EaseElasticInOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseElasticInOut);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseBounce
|
2013-06-20 14:13:12 +08:00
|
|
|
@brief EaseBounce abstract class.
|
2010-08-10 14:02:13 +08:00
|
|
|
@since v0.8.2
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseBounce : public ActionEase
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2010-08-25 18:31:55 +08:00
|
|
|
|
2013-07-16 03:43:22 +08:00
|
|
|
// Overrides
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseBounce* clone() const override
|
2014-07-11 10:19:49 +08:00
|
|
|
{
|
|
|
|
CC_ASSERT(0);
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseBounce* reverse() const override
|
2014-07-11 10:19:49 +08:00
|
|
|
{
|
|
|
|
CC_ASSERT(0);
|
|
|
|
return nullptr;
|
|
|
|
}
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseBounce() {}
|
|
|
|
virtual ~EaseBounce() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseBounce);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseBounceIn
|
2013-06-20 14:13:12 +08:00
|
|
|
@brief EaseBounceIn action.
|
2015-03-18 18:15:34 +08:00
|
|
|
@warning This action doesn't use a bijective function.
|
|
|
|
Actions like Sequence might have an unexpected result when used with this action.
|
2010-08-10 14:02:13 +08:00
|
|
|
@since v0.8.2
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseBounceIn : public EaseBounce
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseBounceIn action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseBounceIn* create(ActionInterval* action);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseBounceIn* clone() const override;
|
|
|
|
virtual EaseBounce* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseBounceIn() {}
|
|
|
|
virtual ~EaseBounceIn() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseBounceIn);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseBounceOut
|
2010-09-28 18:27:33 +08:00
|
|
|
@brief EaseBounceOut action.
|
2015-03-18 18:15:34 +08:00
|
|
|
@warning This action doesn't use a bijective function.
|
|
|
|
Actions like Sequence might have an unexpected result when used with this action.
|
2010-08-10 14:02:13 +08:00
|
|
|
@since v0.8.2
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseBounceOut : public EaseBounce
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseBounceOut action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseBounceOut* create(ActionInterval* action);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseBounceOut* clone() const override;
|
|
|
|
virtual EaseBounce* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseBounceOut() {}
|
|
|
|
virtual ~EaseBounceOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseBounceOut);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseBounceInOut
|
2013-06-20 14:13:12 +08:00
|
|
|
@brief EaseBounceInOut action.
|
2015-03-18 18:15:34 +08:00
|
|
|
@warning This action doesn't use a bijective function.
|
|
|
|
Actions like Sequence might have an unexpected result when used with this action.
|
2010-08-10 14:02:13 +08:00
|
|
|
@since v0.8.2
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseBounceInOut : public EaseBounce
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseBounceInOut action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseBounceInOut* create(ActionInterval* action);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseBounceInOut* clone() const override;
|
|
|
|
virtual EaseBounceInOut* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseBounceInOut() {}
|
|
|
|
virtual ~EaseBounceInOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseBounceInOut);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseBackIn
|
2013-06-20 14:13:12 +08:00
|
|
|
@brief EaseBackIn action.
|
2015-03-18 18:15:34 +08:00
|
|
|
@warning This action doesn't use a bijective function.
|
|
|
|
Actions like Sequence might have an unexpected result when used with this action.
|
2010-08-10 14:02:13 +08:00
|
|
|
@since v0.8.2
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseBackIn : public ActionEase
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseBackIn action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseBackIn* create(ActionInterval* action);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseBackIn* clone() const override;
|
|
|
|
virtual ActionEase* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseBackIn() {}
|
|
|
|
virtual ~EaseBackIn() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseBackIn);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseBackOut
|
2013-06-20 14:13:12 +08:00
|
|
|
@brief EaseBackOut action.
|
2015-03-18 18:15:34 +08:00
|
|
|
@warning This action doesn't use a bijective function.
|
|
|
|
Actions like Sequence might have an unexpected result when used with this action.
|
2010-08-10 14:02:13 +08:00
|
|
|
@since v0.8.2
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseBackOut : public ActionEase
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseBackOut action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseBackOut* create(ActionInterval* action);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseBackOut* clone() const override;
|
|
|
|
virtual ActionEase* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseBackOut() {}
|
|
|
|
virtual ~EaseBackOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseBackOut);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2010-09-28 18:27:33 +08:00
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseBackInOut
|
2013-06-20 14:13:12 +08:00
|
|
|
@brief EaseBackInOut action.
|
2015-03-18 18:15:34 +08:00
|
|
|
@warning This action doesn't use a bijective function.
|
|
|
|
Actions like Sequence might have an unexpected result when used with this action.
|
2010-08-10 14:02:13 +08:00
|
|
|
@since v0.8.2
|
2012-06-20 18:09:11 +08:00
|
|
|
@ingroup Actions
|
2010-08-10 14:02:13 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL EaseBackInOut : public ActionEase
|
2010-08-10 14:02:13 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseBackInOut action. If creation failed, return nil.
|
|
|
|
*/
|
2013-11-16 21:08:00 +08:00
|
|
|
static EaseBackInOut* create(ActionInterval* action);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
// Overrides
|
|
|
|
virtual void update(float time) override;
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual EaseBackInOut* clone() const override;
|
|
|
|
virtual EaseBackInOut* reverse() const override;
|
2013-11-22 09:06:06 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2013-11-22 09:06:06 +08:00
|
|
|
EaseBackInOut() {}
|
|
|
|
virtual ~EaseBackInOut() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseBackInOut);
|
2010-08-10 14:02:13 +08:00
|
|
|
};
|
|
|
|
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseBezierAction
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Bezier
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseBezierAction : public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseBezierAction action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseBezierAction* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseBezierAction* clone() const override;
|
|
|
|
virtual EaseBezierAction* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Set the bezier parameters.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void setBezierParamer( float p0, float p1, float p2, float p3);
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseBezierAction() {}
|
|
|
|
virtual ~EaseBezierAction() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
protected:
|
2014-07-18 14:53:00 +08:00
|
|
|
float _p0;
|
|
|
|
float _p1;
|
|
|
|
float _p2;
|
|
|
|
float _p3;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseBezierAction);
|
2014-02-17 11:20:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseQuadraticActionIn
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Quadratic In
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseQuadraticActionIn : public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseQuadraticActionIn action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseQuadraticActionIn* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuadraticActionIn* clone() const override;
|
|
|
|
virtual EaseQuadraticActionIn* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseQuadraticActionIn() {}
|
|
|
|
virtual ~EaseQuadraticActionIn() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuadraticActionIn);
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseQuadraticActionOut
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Quadratic Out
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseQuadraticActionOut : public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseQuadraticActionOut action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseQuadraticActionOut* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuadraticActionOut* clone() const override;
|
|
|
|
virtual EaseQuadraticActionOut* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseQuadraticActionOut() {}
|
|
|
|
virtual ~EaseQuadraticActionOut() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuadraticActionOut);
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseQuadraticActionInOut
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Quadratic InOut
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseQuadraticActionInOut : public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseQuadraticActionInOut action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseQuadraticActionInOut* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuadraticActionInOut* clone() const override;
|
|
|
|
virtual EaseQuadraticActionInOut* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseQuadraticActionInOut() {}
|
|
|
|
virtual ~EaseQuadraticActionInOut() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuadraticActionInOut);
|
2014-02-17 11:20:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseQuarticActionIn
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Quartic In
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseQuarticActionIn : public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseQuarticActionIn action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseQuarticActionIn* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuarticActionIn* clone() const override;
|
|
|
|
virtual EaseQuarticActionIn* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseQuarticActionIn() {}
|
|
|
|
virtual ~EaseQuarticActionIn() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuarticActionIn);
|
2014-02-17 11:20:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseQuarticActionOut
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Quartic Out
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseQuarticActionOut : public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseQuarticActionOut action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseQuarticActionOut* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuarticActionOut* clone() const override;
|
|
|
|
virtual EaseQuarticActionOut* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseQuarticActionOut() {}
|
|
|
|
virtual ~EaseQuarticActionOut() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuarticActionOut);
|
2014-02-17 11:20:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseQuarticActionInOut
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Quartic InOut
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseQuarticActionInOut : public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseQuarticActionInOut action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseQuarticActionInOut* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuarticActionInOut* clone() const override;
|
|
|
|
virtual EaseQuarticActionInOut* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseQuarticActionInOut() {}
|
|
|
|
virtual ~EaseQuarticActionInOut() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuarticActionInOut);
|
2014-02-17 11:20:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseQuinticActionIn
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Quintic In
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseQuinticActionIn : public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseQuinticActionIn action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseQuinticActionIn* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuinticActionIn* clone() const override;
|
|
|
|
virtual EaseQuinticActionIn* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseQuinticActionIn() {}
|
|
|
|
virtual ~EaseQuinticActionIn() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuinticActionIn);
|
2014-02-17 11:20:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseQuinticActionOut
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Quintic Out
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseQuinticActionOut : public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseQuinticActionOut action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseQuinticActionOut* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuinticActionOut* clone() const override;
|
|
|
|
virtual EaseQuinticActionOut* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseQuinticActionOut() {}
|
|
|
|
virtual ~EaseQuinticActionOut() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuinticActionOut);
|
2014-02-17 11:20:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseQuinticActionInOut
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Quintic InOut
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseQuinticActionInOut : public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseQuinticActionInOut action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseQuinticActionInOut* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseQuinticActionInOut* clone() const override;
|
|
|
|
virtual EaseQuinticActionInOut* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseQuinticActionInOut() {}
|
|
|
|
virtual ~EaseQuinticActionInOut() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseQuinticActionInOut);
|
2014-02-17 11:20:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseCircleActionIn
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Circle In
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseCircleActionIn : public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseCircleActionIn action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseCircleActionIn* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseCircleActionIn* clone() const override;
|
|
|
|
virtual EaseCircleActionIn* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseCircleActionIn() {}
|
|
|
|
virtual ~EaseCircleActionIn() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseCircleActionIn);
|
2014-02-17 11:20:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseCircleActionOut
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Circle Out
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseCircleActionOut : public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseCircleActionOut action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseCircleActionOut* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseCircleActionOut* clone() const override;
|
|
|
|
virtual EaseCircleActionOut* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseCircleActionOut() {}
|
|
|
|
virtual ~EaseCircleActionOut() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseCircleActionOut);
|
2014-02-17 11:20:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseCircleActionInOut
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Circle InOut
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseCircleActionInOut:public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseCircleActionInOut action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseCircleActionInOut* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseCircleActionInOut* clone() const override;
|
|
|
|
virtual EaseCircleActionInOut* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseCircleActionInOut() {}
|
|
|
|
virtual ~EaseCircleActionInOut() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseCircleActionInOut);
|
2014-02-17 11:20:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseCubicActionIn
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Cubic In
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseCubicActionIn:public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseCubicActionIn action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseCubicActionIn* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseCubicActionIn* clone() const override;
|
|
|
|
virtual EaseCubicActionIn* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseCubicActionIn() {}
|
|
|
|
virtual ~EaseCubicActionIn() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseCubicActionIn);
|
2014-02-17 11:20:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseCubicActionOut
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Cubic Out
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseCubicActionOut : public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseCubicActionOut action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseCubicActionOut* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseCubicActionOut* clone() const override;
|
|
|
|
virtual EaseCubicActionOut* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseCubicActionOut() {}
|
|
|
|
virtual ~EaseCubicActionOut() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseCubicActionOut);
|
2014-02-17 11:20:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2015-03-18 18:15:34 +08:00
|
|
|
@class EaseCubicActionInOut
|
2014-02-17 11:20:01 +08:00
|
|
|
@brief Ease Cubic InOut
|
|
|
|
@ingroup Actions
|
|
|
|
*/
|
2014-07-14 22:42:44 +08:00
|
|
|
class CC_DLL EaseCubicActionInOut : public ActionEase
|
2014-02-17 11:20:01 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-03-18 18:15:34 +08:00
|
|
|
/**
|
|
|
|
@brief Create the action with the inner action.
|
|
|
|
@param action The pointer of the inner action.
|
|
|
|
@return A pointer of EaseCubicActionInOut action. If creation failed, return nil.
|
|
|
|
*/
|
2014-07-18 14:53:00 +08:00
|
|
|
static EaseCubicActionInOut* create(ActionInterval* action);
|
2015-01-20 15:41:59 +08:00
|
|
|
|
2014-07-18 14:53:00 +08:00
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual EaseCubicActionInOut* clone() const override;
|
|
|
|
virtual EaseCubicActionInOut* reverse() const override;
|
2014-02-17 11:20:01 +08:00
|
|
|
|
2014-03-28 17:45:06 +08:00
|
|
|
CC_CONSTRUCTOR_ACCESS:
|
2014-07-18 14:53:00 +08:00
|
|
|
EaseCubicActionInOut() {}
|
|
|
|
virtual ~EaseCubicActionInOut() {}
|
2014-02-17 11:20:01 +08:00
|
|
|
|
|
|
|
private:
|
2014-07-18 14:53:00 +08:00
|
|
|
CC_DISALLOW_COPY_AND_ASSIGN(EaseCubicActionInOut);
|
2014-02-17 11:20:01 +08:00
|
|
|
};
|
|
|
|
|
2012-06-20 18:09:11 +08:00
|
|
|
// end of actions group
|
|
|
|
/// @}
|
|
|
|
|
2012-04-18 18:43:45 +08:00
|
|
|
NS_CC_END
|
2012-01-12 17:06:46 +08:00
|
|
|
|
|
|
|
#endif // __ACTION_CCEASE_ACTION_H__
|