mirror of https://github.com/axmolengine/axmol.git
issue #2423 : change TargetedAction::reverse() function from just cloning to reversing the internal action
This commit is contained in:
parent
31d8200e05
commit
97f6e11f0d
|
@ -2201,8 +2201,11 @@ TargetedAction* TargetedAction::clone() const
|
|||
|
||||
TargetedAction* TargetedAction::reverse(void) const
|
||||
{
|
||||
// no reverse for this action, just clone it
|
||||
return this->clone();
|
||||
// just reverse the internal action
|
||||
auto a = new TargetedAction();
|
||||
a->initWithTarget(_forcedTarget, _action->reverse());
|
||||
a->autorelease();
|
||||
return a;
|
||||
}
|
||||
|
||||
void TargetedAction::startWithTarget(Node *target)
|
||||
|
|
Loading…
Reference in New Issue