* revert #17437

* fix resource path
This commit is contained in:
minggo 2017-03-20 09:28:12 +08:00 committed by GitHub
parent d263f8e0f2
commit b5a1360a17
4 changed files with 0 additions and 78 deletions

View File

@ -422,11 +422,6 @@ Sequence* Sequence::reverse() const
return nullptr; return nullptr;
} }
bool Sequence::isDone() const
{
return (_last == 1) && _actions[1]->isDone();
}
// //
// Repeat // Repeat
// //

View File

@ -182,7 +182,6 @@ public:
// //
virtual Sequence* clone() const override; virtual Sequence* clone() const override;
virtual Sequence* reverse() const override; virtual Sequence* reverse() const override;
virtual bool isDone() const override;
virtual void startWithTarget(Node *target) override; virtual void startWithTarget(Node *target) override;
virtual void stop(void) override; virtual void stop(void) override;
/** /**

View File

@ -92,7 +92,6 @@ ActionsTests::ActionsTests()
ADD_TEST_CASE(ActionFloatTest); ADD_TEST_CASE(ActionFloatTest);
ADD_TEST_CASE(Issue14936_1); ADD_TEST_CASE(Issue14936_1);
ADD_TEST_CASE(Issue14936_2); ADD_TEST_CASE(Issue14936_2);
ADD_TEST_CASE(SequenceWithFinalInstant);
} }
std::string ActionsDemo::title() const std::string ActionsDemo::title() const
@ -2395,59 +2394,3 @@ std::string ActionFloatTest::subtitle() const
} }
//------------------------------------------------------------------
//
// SequenceWithFinalInstant
//
//------------------------------------------------------------------
void SequenceWithFinalInstant::onEnter()
{
ActionsDemo::onEnter();
_manager = new cocos2d::ActionManager();
_target = cocos2d::Node::create();
_target->setActionManager( _manager );
_target->retain();
_target->onEnter();
bool called( false );
const auto f
( [ &called ]() -> void
{
cocos2d::log("Callback called.");
called = true;
} );
const auto action =
cocos2d::Sequence::create
(cocos2d::DelayTime::create(0.05),
cocos2d::CallFunc::create(f),
nullptr);
_target->runAction(action);
_manager->update(0);
_manager->update(0.05 - FLT_EPSILON);
if ( action->isDone() && !called )
cocos2d::log
("Action says it is done but is not."
" called=%d, elapsed=%f, duration=%f",
(int)called, action->getElapsed(), action->getDuration());
else
cocos2d::log("Everything went fine.");
}
void SequenceWithFinalInstant::onExit()
{
ActionsDemo::onExit();
_target->onExit();
_target->release();
_manager->release();
}
std::string SequenceWithFinalInstant::subtitle() const
{
return "Instant action should be run. See console.";
}

View File

@ -620,19 +620,4 @@ private:
int _count; int _count;
}; };
class SequenceWithFinalInstant : public ActionsDemo
{
public:
CREATE_FUNC(SequenceWithFinalInstant);
virtual std::string subtitle() const override;
virtual void onEnter() override;
virtual void onExit() override;
private:
cocos2d::ActionManager* _manager;
cocos2d::Node* _target;
};
#endif #endif