------------------------------------------------------------------ StressNodeTest2 ------------------------------------------------------------------
| 337 | // |
| 338 | //------------------------------------------------------------------ |
| 339 | StressTest2::StressTest2() |
| 340 | { |
| 341 | auto s = Director::getInstance()->getWinSize(); |
| 342 | |
| 343 | auto sublayer = Layer::create(); |
| 344 | |
| 345 | auto sp1 = Sprite::create(s_pathSister1); |
| 346 | sp1->setPosition(Vec2(80.0f, s.height / 2)); |
| 347 | |
| 348 | auto move = MoveBy::create(3, Vec2(350.0f, 0.0f)); |
| 349 | auto move_ease_inout3 = EaseInOut::create(move->clone(), 2.0f); |
| 350 | auto move_ease_inout_back3 = move_ease_inout3->reverse(); |
| 351 | auto seq3 = Sequence::create(move_ease_inout3, move_ease_inout_back3, nullptr); |
| 352 | sp1->runAction(RepeatForever::create(seq3)); |
| 353 | sublayer->addChild(sp1, 1); |
| 354 | |
| 355 | auto fire = ParticleFire::create(); |
| 356 | fire->setTexture(Director::getInstance()->getTextureCache()->addImage("Images/fire.png")); |
| 357 | fire->setPosition(Vec2(80.0f, s.height / 2 - 50)); |
| 358 | |
| 359 | auto copy_seq3 = seq3->clone(); |
| 360 | |
| 361 | fire->runAction(RepeatForever::create(copy_seq3)); |
| 362 | sublayer->addChild(fire, 2); |
| 363 | |
| 364 | schedule(AX_CALLBACK_1(StressTest2::shouldNotLeak, this), 6.0f, "should_not_leak_key"); |
| 365 | |
| 366 | addChild(sublayer, 0, kTagSprite1); |
| 367 | } |
| 368 | |
| 369 | void StressTest2::shouldNotLeak(float dt) |
| 370 | { |
nothing calls this directly
no test coverage detected