Merge pull request #12670 from yangws/issue_8256

Fixbug: CCTargetedAction executes callback twice.
This commit is contained in:
pandamicro 2015-07-03 22:34:54 +08:00
commit 38ded61568
2 changed files with 9 additions and 0 deletions

View File

@ -2503,6 +2503,11 @@ void TargetedAction::update(float time)
_action->update(time);
}
bool TargetedAction::isDone(void) const
{
return _action->isDone();
}
void TargetedAction::setForcedTarget(Node* forcedTarget)
{
if( _forcedTarget != forcedTarget ) {

View File

@ -1509,6 +1509,10 @@ public:
* @param time In seconds.
*/
virtual void update(float time) override;
//
// Overrides
//
virtual bool isDone(void) const override;
CC_CONSTRUCTOR_ACCESS:
TargetedAction();