2010-11-12 17:26:01 +08:00
|
|
|
/****************************************************************************
|
2012-06-14 17:18:05 +08:00
|
|
|
Copyright (c) 2010-2012 cocos2d-x.org
|
2011-03-19 10:59:01 +08:00
|
|
|
Copyright (c) 2008-2010 Ricardo Quesada
|
2011-07-01 15:08:23 +08:00
|
|
|
Copyright (c) 2011 Zynga Inc.
|
2010-11-12 17:26: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 __CCINSTANT_ACTION_H__
|
|
|
|
#define __CCINSTANT_ACTION_H__
|
|
|
|
|
2011-06-21 10:18:43 +08:00
|
|
|
#include <string>
|
2013-06-04 03:13:24 +08:00
|
|
|
#include <functional>
|
|
|
|
|
2013-06-07 19:14:43 +08:00
|
|
|
#include "CCStdC.h"
|
2010-11-12 17:26:01 +08:00
|
|
|
#include "CCAction.h"
|
|
|
|
|
2012-04-18 18:43:45 +08:00
|
|
|
NS_CC_BEGIN
|
|
|
|
|
2012-06-20 18:09:11 +08:00
|
|
|
/**
|
|
|
|
* @addtogroup actions
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
2012-04-18 18:43:45 +08:00
|
|
|
/**
|
|
|
|
@brief Instant actions are immediate actions. They don't have a duration like
|
2013-06-20 14:13:12 +08:00
|
|
|
the IntervalAction actions.
|
2012-04-18 18:43:45 +08:00
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL ActionInstant : public FiniteTimeAction //<NSCopying>
|
2012-04-18 18:43:45 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-07-16 03:43:22 +08:00
|
|
|
//
|
|
|
|
// Overrides
|
|
|
|
//
|
|
|
|
virtual ActionInstant* clone() const override = 0;
|
|
|
|
virtual ActionInstant * reverse(void) const override = 0;
|
|
|
|
virtual bool isDone(void) const override;
|
|
|
|
virtual void step(float dt) override;
|
|
|
|
virtual void update(float time) override;
|
2012-04-18 18:43:45 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/** @brief Show the node
|
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL Show : public ActionInstant
|
2012-04-18 18:43:45 +08:00
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
/** Allocates and initializes the action */
|
2013-06-20 14:13:12 +08:00
|
|
|
static Show * create();
|
2012-04-18 18:43:45 +08:00
|
|
|
|
2013-07-16 03:43:22 +08:00
|
|
|
Show(){}
|
2012-04-18 18:43:45 +08:00
|
|
|
|
2013-07-16 03:43:22 +08:00
|
|
|
//
|
|
|
|
// Overrides
|
|
|
|
//
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual ActionInstant* reverse(void) const override;
|
|
|
|
virtual Show* clone() const override;
|
|
|
|
};
|
2012-04-18 18:43:45 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Hide the node
|
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL Hide : public ActionInstant
|
2012-04-18 18:43:45 +08:00
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
/** Allocates and initializes the action */
|
2013-06-20 14:13:12 +08:00
|
|
|
static Hide * create();
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
Hide(){}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Overrides
|
|
|
|
//
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual ActionInstant* reverse() const override;
|
|
|
|
virtual Hide* clone() const override;
|
2012-04-18 18:43:45 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/** @brief Toggles the visibility of a node
|
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL ToggleVisibility : public ActionInstant
|
2012-04-18 18:43:45 +08:00
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
/** Allocates and initializes the action */
|
2013-06-20 14:13:12 +08:00
|
|
|
static ToggleVisibility * create();
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
ToggleVisibility(){}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Overrides
|
|
|
|
//
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual ToggleVisibility* reverse() const override;
|
|
|
|
virtual ToggleVisibility* clone() const override;
|
2012-04-18 18:43:45 +08:00
|
|
|
};
|
|
|
|
|
2013-03-25 11:10:51 +08:00
|
|
|
/**
|
|
|
|
@brief Remove the node
|
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL RemoveSelf : public ActionInstant
|
2013-03-25 11:10:51 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-03-25 18:18:38 +08:00
|
|
|
/** create the action */
|
2013-06-20 14:13:12 +08:00
|
|
|
static RemoveSelf * create(bool isNeedCleanUp = true);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
RemoveSelf():_isNeedCleanUp(true)
|
|
|
|
{}
|
|
|
|
|
2013-03-25 18:18:38 +08:00
|
|
|
/** init the action */
|
|
|
|
bool init(bool isNeedCleanUp);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
//
|
|
|
|
// Override
|
|
|
|
//
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual RemoveSelf* clone() const override;
|
|
|
|
virtual RemoveSelf* reverse() const override;
|
|
|
|
|
2013-03-25 18:18:38 +08:00
|
|
|
protected:
|
2013-06-15 14:03:30 +08:00
|
|
|
bool _isNeedCleanUp;
|
2013-03-25 11:10:51 +08:00
|
|
|
};
|
|
|
|
|
2012-04-18 18:43:45 +08:00
|
|
|
/**
|
|
|
|
@brief Flips the sprite horizontally
|
|
|
|
@since v0.99.0
|
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL FlipX : public ActionInstant
|
2012-04-18 18:43:45 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-07-16 03:43:22 +08:00
|
|
|
/** create the action */
|
|
|
|
static FlipX * create(bool x);
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
FlipX()
|
2013-06-15 14:03:30 +08:00
|
|
|
:_flipX(false)
|
2012-04-19 14:35:52 +08:00
|
|
|
{}
|
2012-06-14 15:13:16 +08:00
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
/** init the action */
|
|
|
|
bool initWithFlipX(bool x);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
//
|
|
|
|
// Overrides
|
|
|
|
//
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual FlipX* reverse() const override;
|
|
|
|
virtual FlipX* clone() const override;
|
2012-04-18 18:43:45 +08:00
|
|
|
|
|
|
|
protected:
|
2013-06-15 14:03:30 +08:00
|
|
|
bool _flipX;
|
2012-04-18 18:43:45 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Flips the sprite vertically
|
|
|
|
@since v0.99.0
|
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL FlipY : public ActionInstant
|
2012-04-18 18:43:45 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-07-16 03:43:22 +08:00
|
|
|
/** create the action */
|
|
|
|
static FlipY * create(bool y);
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
FlipY()
|
2013-06-15 14:03:30 +08:00
|
|
|
:_flipY(false)
|
2012-04-19 14:35:52 +08:00
|
|
|
{}
|
2012-06-14 15:13:16 +08:00
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
/** init the action */
|
|
|
|
bool initWithFlipY(bool y);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
//
|
|
|
|
// Overrides
|
|
|
|
//
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual FlipY* reverse() const override;
|
|
|
|
virtual FlipY* clone() const override;
|
2012-04-18 18:43:45 +08:00
|
|
|
|
|
|
|
protected:
|
2013-06-15 14:03:30 +08:00
|
|
|
bool _flipY;
|
2012-04-18 18:43:45 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/** @brief Places the node in a certain position
|
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL Place : public ActionInstant //<NSCopying>
|
2012-04-18 18:43:45 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-06-20 14:13:12 +08:00
|
|
|
Place(){}
|
2012-12-06 18:51:33 +08:00
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
/** creates a Place action with a position */
|
2013-06-20 14:13:12 +08:00
|
|
|
static Place * create(const Point& pos);
|
2012-04-19 14:35:52 +08:00
|
|
|
/** Initializes a Place action with a position */
|
2013-06-20 14:13:12 +08:00
|
|
|
bool initWithPosition(const Point& pos);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
//
|
|
|
|
// Overrides
|
|
|
|
//
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual Place* reverse() const override;
|
|
|
|
virtual Place* clone() const override;
|
2013-07-08 23:05:47 +08:00
|
|
|
|
2012-04-18 18:43:45 +08:00
|
|
|
protected:
|
2013-06-20 14:13:12 +08:00
|
|
|
Point _position;
|
2012-04-18 18:43:45 +08:00
|
|
|
};
|
|
|
|
|
2013-06-04 03:13:24 +08:00
|
|
|
|
2012-04-18 18:43:45 +08:00
|
|
|
/** @brief Calls a 'callback'
|
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL CallFunc : public ActionInstant //<NSCopying>
|
2012-04-18 18:43:45 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-06-04 03:13:24 +08:00
|
|
|
/** creates the action with the callback of type std::function<void()>.
|
|
|
|
This is the preferred way to create the callback.
|
|
|
|
*/
|
2013-06-20 14:13:12 +08:00
|
|
|
static CallFunc * create(const std::function<void()>& func);
|
2013-06-04 03:13:24 +08:00
|
|
|
|
2013-07-16 03:43:22 +08:00
|
|
|
/** creates the action with the callback
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-07-16 03:43:22 +08:00
|
|
|
typedef void (Object::*SEL_CallFunc)();
|
2013-06-04 03:13:24 +08:00
|
|
|
@deprecated Use the std::function API instead.
|
2013-07-16 03:43:22 +08:00
|
|
|
*/
|
|
|
|
CC_DEPRECATED_ATTRIBUTE static CallFunc * create(Object* pSelectorTarget, SEL_CallFunc selector);
|
2012-06-14 15:13:16 +08:00
|
|
|
|
2013-07-16 03:43:22 +08:00
|
|
|
public:
|
|
|
|
CallFunc()
|
|
|
|
: _selectorTarget(NULL)
|
|
|
|
, _callFunc(NULL)
|
|
|
|
, _function(nullptr)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
virtual ~CallFunc();
|
|
|
|
|
2012-08-21 18:42:35 +08:00
|
|
|
/** initializes the action with the callback
|
2013-06-20 14:13:12 +08:00
|
|
|
typedef void (Object::*SEL_CallFunc)();
|
2013-07-17 16:25:13 +08:00
|
|
|
@deprecated Use the std::function API instead.
|
2012-04-19 14:35:52 +08:00
|
|
|
*/
|
2013-07-17 16:25:13 +08:00
|
|
|
CC_DEPRECATED_ATTRIBUTE bool initWithTarget(Object* pSelectorTarget);
|
2013-06-04 03:13:24 +08:00
|
|
|
|
|
|
|
/** initializes the action with the std::function<void()>
|
|
|
|
*/
|
2013-07-17 16:25:13 +08:00
|
|
|
bool initWithFunction(const std::function<void()>& func);
|
2013-06-04 03:13:24 +08:00
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
/** executes the callback */
|
|
|
|
virtual void execute();
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
inline Object* getTargetCallback()
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
return _selectorTarget;
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
inline void setTargetCallback(Object* pSel)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
if (pSel != _selectorTarget)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2012-06-15 15:10:40 +08:00
|
|
|
CC_SAFE_RETAIN(pSel);
|
2013-06-15 14:03:30 +08:00
|
|
|
CC_SAFE_RELEASE(_selectorTarget);
|
|
|
|
_selectorTarget = pSel;
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
}
|
2013-07-16 03:43:22 +08:00
|
|
|
//
|
|
|
|
// Overrides
|
|
|
|
//
|
|
|
|
virtual void update(float time) override;
|
|
|
|
virtual CallFunc* reverse() const override;
|
|
|
|
virtual CallFunc* clone() const override;
|
|
|
|
|
2012-04-18 18:43:45 +08:00
|
|
|
protected:
|
2012-04-19 14:35:52 +08:00
|
|
|
/** Target that will be called */
|
2013-06-20 14:13:12 +08:00
|
|
|
Object* _selectorTarget;
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
union
|
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
SEL_CallFunc _callFunc;
|
|
|
|
SEL_CallFuncN _callFuncN;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
2013-06-04 11:57:32 +08:00
|
|
|
|
|
|
|
/** function that will be called */
|
|
|
|
std::function<void()> _function;
|
2012-04-18 18:43:45 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Calls a 'callback' with the node as the first argument
|
|
|
|
N means Node
|
|
|
|
*/
|
2013-08-22 18:16:50 +08:00
|
|
|
class CC_DLL CallFuncN : public CallFunc
|
2012-04-18 18:43:45 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-06-22 05:58:52 +08:00
|
|
|
/** creates the action with the callback of type std::function<void()>.
|
|
|
|
This is the preferred way to create the callback.
|
|
|
|
*/
|
|
|
|
static CallFuncN * create(const std::function<void(Node*)>& func);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
/** creates the action with the callback
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
typedef void (Object::*SEL_CallFuncN)(Node*);
|
2013-06-22 05:58:52 +08:00
|
|
|
@deprecated Use the std::function API instead.
|
2012-04-19 14:35:52 +08:00
|
|
|
*/
|
2013-07-16 03:43:22 +08:00
|
|
|
CC_DEPRECATED_ATTRIBUTE static CallFuncN * create(Object* pSelectorTarget, SEL_CallFuncN selector);
|
|
|
|
public:
|
|
|
|
CallFuncN():_functionN(nullptr){}
|
2013-06-22 05:58:52 +08:00
|
|
|
|
|
|
|
/** initializes the action with the std::function<void(Node*)>
|
|
|
|
*/
|
2013-07-17 16:25:13 +08:00
|
|
|
bool initWithFunction(const std::function<void(Node*)>& func);
|
2013-06-22 05:58:52 +08:00
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
/** initializes the action with the callback
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
typedef void (Object::*SEL_CallFuncN)(Node*);
|
2013-06-22 05:58:52 +08:00
|
|
|
@deprecated Use the std::function API instead.
|
2012-04-19 14:35:52 +08:00
|
|
|
*/
|
2013-07-17 16:25:13 +08:00
|
|
|
CC_DEPRECATED_ATTRIBUTE bool initWithTarget(Object* pSelectorTarget, SEL_CallFuncN selector);
|
2013-07-16 03:43:22 +08:00
|
|
|
|
|
|
|
//
|
|
|
|
// Overrides
|
|
|
|
//
|
|
|
|
virtual CallFuncN* clone() const override;
|
|
|
|
virtual void execute() override;
|
2011-07-01 15:08:23 +08:00
|
|
|
|
2012-04-18 18:43:45 +08:00
|
|
|
protected:
|
2013-06-22 05:58:52 +08:00
|
|
|
/** function that will be called with the "sender" as the 1st argument */
|
|
|
|
std::function<void(Node*)> _functionN;
|
2012-04-18 18:43:45 +08:00
|
|
|
};
|
2010-12-23 16:47:29 +08:00
|
|
|
|
2013-07-24 16:45:11 +08:00
|
|
|
/**
|
|
|
|
@deprecated Please use CallFuncN instead.
|
|
|
|
@brief Calls a 'callback' with the node as the first argument and the 2nd argument is data
|
|
|
|
* ND means: Node and Data. Data is void *, so it could be anything.
|
|
|
|
*/
|
2013-07-25 13:45:02 +08:00
|
|
|
|
2013-07-25 15:03:44 +08:00
|
|
|
class CC_DLL __CCCallFuncND : public CallFunc
|
2013-07-24 16:45:11 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action with the callback and the data to pass as an argument */
|
2013-07-25 15:03:44 +08:00
|
|
|
CC_DEPRECATED_ATTRIBUTE static __CCCallFuncND * create(Object* selectorTarget, SEL_CallFuncND selector, void* d);
|
2013-07-24 16:45:11 +08:00
|
|
|
|
2013-07-25 15:03:44 +08:00
|
|
|
protected:
|
2013-07-24 16:45:11 +08:00
|
|
|
/** initializes the action with the callback and the data to pass as an argument */
|
|
|
|
bool initWithTarget(Object* selectorTarget, SEL_CallFuncND selector, void* d);
|
|
|
|
|
2013-07-25 15:03:44 +08:00
|
|
|
public:
|
2013-07-24 16:45:11 +08:00
|
|
|
//
|
|
|
|
// Overrides
|
|
|
|
//
|
2013-07-25 15:03:44 +08:00
|
|
|
virtual __CCCallFuncND* clone() const override;
|
2013-07-24 16:45:11 +08:00
|
|
|
virtual void execute() override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
SEL_CallFuncND _callFuncND;
|
|
|
|
void* _data;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@deprecated Please use CallFuncN instead.
|
|
|
|
@brief Calls a 'callback' with an object as the first argument.
|
|
|
|
O means Object.
|
|
|
|
@since v0.99.5
|
|
|
|
*/
|
|
|
|
|
2013-08-22 18:16:50 +08:00
|
|
|
class CC_DLL __CCCallFuncO : public CallFunc
|
2013-07-24 16:45:11 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** creates the action with the callback
|
|
|
|
|
|
|
|
typedef void (Object::*SEL_CallFuncO)(Object*);
|
|
|
|
*/
|
2013-07-25 15:03:44 +08:00
|
|
|
CC_DEPRECATED_ATTRIBUTE static __CCCallFuncO * create(Object* selectorTarget, SEL_CallFuncO selector, Object* object);
|
2013-07-24 16:45:11 +08:00
|
|
|
|
2013-07-25 15:03:44 +08:00
|
|
|
__CCCallFuncO();
|
|
|
|
virtual ~__CCCallFuncO();
|
|
|
|
|
|
|
|
protected:
|
2013-07-24 16:45:11 +08:00
|
|
|
/** initializes the action with the callback
|
|
|
|
|
|
|
|
typedef void (Object::*SEL_CallFuncO)(Object*);
|
|
|
|
*/
|
|
|
|
bool initWithTarget(Object* selectorTarget, SEL_CallFuncO selector, Object* object);
|
|
|
|
|
2013-07-25 15:03:44 +08:00
|
|
|
public:
|
2013-07-24 16:45:11 +08:00
|
|
|
//
|
|
|
|
// Overrides
|
|
|
|
//
|
2013-07-25 15:03:44 +08:00
|
|
|
virtual __CCCallFuncO* clone() const override;
|
2013-07-24 16:45:11 +08:00
|
|
|
virtual void execute() override;
|
|
|
|
|
2013-07-25 13:45:02 +08:00
|
|
|
Object* getObject() const;
|
|
|
|
void setObject(Object* obj);
|
2013-07-24 16:45:11 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
/** object to be passed as argument */
|
|
|
|
Object* _object;
|
|
|
|
SEL_CallFuncO _callFuncO;
|
|
|
|
};
|
|
|
|
|
2012-06-20 18:09:11 +08:00
|
|
|
// end of actions group
|
|
|
|
/// @}
|
|
|
|
|
2012-04-18 18:43:45 +08:00
|
|
|
NS_CC_END
|
2010-08-05 17:22:47 +08:00
|
|
|
|
2010-11-12 17:26:01 +08:00
|
|
|
#endif //__CCINSTANT_ACTION_H__
|