2018-01-29 16:25:32 +08:00
|
|
|
/****************************************************************************
|
|
|
|
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
|
|
|
|
|
|
|
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.
|
|
|
|
****************************************************************************/
|
|
|
|
|
2012-04-08 14:16:29 +08:00
|
|
|
#include "EffectsAdvancedTest.h"
|
|
|
|
|
2015-04-09 08:37:30 +08:00
|
|
|
USING_NS_CC;
|
|
|
|
|
2010-09-16 11:35:58 +08:00
|
|
|
enum
|
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
kTagTextLayer = 1,
|
2010-09-16 11:35:58 +08:00
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
kTagSprite1 = 1,
|
|
|
|
kTagSprite2 = 2,
|
2010-09-16 11:35:58 +08:00
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
kTagBackground = 1,
|
|
|
|
kTagLabel = 2,
|
2012-04-08 14:16:29 +08:00
|
|
|
};
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
EffectAdvanceTests::EffectAdvanceTests()
|
|
|
|
{
|
|
|
|
ADD_TEST_CASE(Effect3);
|
|
|
|
ADD_TEST_CASE(Effect2);
|
|
|
|
ADD_TEST_CASE(Effect1);
|
|
|
|
ADD_TEST_CASE(Effect4);
|
|
|
|
ADD_TEST_CASE(Effect5);
|
|
|
|
ADD_TEST_CASE(Issue631);
|
|
|
|
}
|
|
|
|
|
2010-09-16 11:35:58 +08:00
|
|
|
//------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// Effect1
|
|
|
|
//
|
|
|
|
//------------------------------------------------------------------
|
2012-04-08 14:16:29 +08:00
|
|
|
void Effect1::onEnter()
|
|
|
|
{
|
2015-04-03 14:31:03 +08:00
|
|
|
EffectAdvanceBaseTest::onEnter();
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-12-11 13:39:34 +08:00
|
|
|
//auto target = getChildByTag(kTagBackground);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
// To reuse a grid the grid size and the grid type must be the same.
|
|
|
|
// in this case:
|
|
|
|
// Lens3D is Grid3D and it's size is (15,10)
|
|
|
|
// Waves3D is Grid3D and it's size is (15,10)
|
|
|
|
|
2013-08-16 16:05:27 +08:00
|
|
|
auto size = Director::getInstance()->getWinSize();
|
2014-05-15 01:07:09 +08:00
|
|
|
auto lens = Lens3D::create(0.0f, Size(15,10), Vec2(size.width/2,size.height/2), 240);
|
2013-08-16 16:05:27 +08:00
|
|
|
auto waves = Waves3D::create(10, Size(15,10), 18, 15);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-08-16 16:05:27 +08:00
|
|
|
auto reuse = ReuseGrid::create(1);
|
|
|
|
auto delay = DelayTime::create(8);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-12-28 14:34:52 +08:00
|
|
|
// auto orbit = OrbitCamera::create(5, 1, 2, 0, 180, 0, -90);
|
|
|
|
// auto orbit_back = orbit->reverse();
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2014-07-10 00:45:27 +08:00
|
|
|
//_bgNode->runAction( RepeatForever::create( Sequence::create( orbit, orbit_back, nullptr) ) );
|
|
|
|
_bgNode->runAction( Sequence::create(lens, delay, reuse, waves, nullptr) );
|
2012-04-08 14:16:29 +08:00
|
|
|
}
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
std::string Effect1::title() const
|
2010-09-16 11:35:58 +08:00
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
return "Lens + Waves3d and OrbitCamera";
|
2012-04-08 14:16:29 +08:00
|
|
|
}
|
|
|
|
|
2010-09-16 11:35:58 +08:00
|
|
|
//------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// Effect2
|
|
|
|
//
|
|
|
|
//------------------------------------------------------------------
|
2012-04-08 14:16:29 +08:00
|
|
|
void Effect2::onEnter()
|
|
|
|
{
|
2015-04-03 14:31:03 +08:00
|
|
|
EffectAdvanceBaseTest::onEnter();
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-12-11 13:39:34 +08:00
|
|
|
//auto target = getChildByTag(kTagBackground);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
// To reuse a grid the grid size and the grid type must be the same.
|
|
|
|
// in this case:
|
|
|
|
// ShakyTiles is TiledGrid3D and it's size is (15,10)
|
|
|
|
// Shuffletiles is TiledGrid3D and it's size is (15,10)
|
|
|
|
// TurnOfftiles is TiledGrid3D and it's size is (15,10)
|
2013-08-16 16:05:27 +08:00
|
|
|
auto shaky = ShakyTiles3D::create(5, Size(15,10), 4, false);
|
|
|
|
auto shuffle = ShuffleTiles::create(0, Size(15,10), 3);
|
|
|
|
auto turnoff = TurnOffTiles::create(0, Size(15,10), 3);
|
|
|
|
auto turnon = turnoff->reverse();
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
// reuse 2 times:
|
|
|
|
// 1 for shuffle
|
|
|
|
// 2 for turn off
|
|
|
|
// turnon tiles will use a new grid
|
2013-08-16 16:05:27 +08:00
|
|
|
auto reuse = ReuseGrid::create(2);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-08-16 16:05:27 +08:00
|
|
|
auto delay = DelayTime::create(1);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2012-06-14 15:13:16 +08:00
|
|
|
// id orbit = [OrbitCamera::create:5 radius:1 deltaRadius:2 angleZ:0 deltaAngleZ:180 angleX:0 deltaAngleX:-90];
|
2012-04-19 14:35:52 +08:00
|
|
|
// id orbit_back = [orbit reverse];
|
2010-09-16 11:35:58 +08:00
|
|
|
//
|
2013-12-11 13:39:34 +08:00
|
|
|
// [target runAction: [RepeatForever::create: [Sequence actions: orbit, orbit_back, nil]]];
|
2014-07-10 00:45:27 +08:00
|
|
|
_bgNode->runAction(Sequence::create( shaky, delay, reuse, shuffle, delay->clone(), turnoff, turnon, nullptr) );
|
2012-04-08 14:16:29 +08:00
|
|
|
}
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
std::string Effect2::title() const
|
2010-09-16 11:35:58 +08:00
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
return "ShakyTiles + ShuffleTiles + TurnOffTiles";
|
2012-04-08 14:16:29 +08:00
|
|
|
}
|
|
|
|
|
2010-09-16 11:35:58 +08:00
|
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// Effect3
|
|
|
|
//
|
|
|
|
//------------------------------------------------------------------
|
2012-04-08 14:16:29 +08:00
|
|
|
void Effect3::onEnter()
|
|
|
|
{
|
2015-04-03 14:31:03 +08:00
|
|
|
EffectAdvanceBaseTest::onEnter();
|
2013-12-11 13:39:34 +08:00
|
|
|
//auto bg = getChildByTag(kTagBackground);
|
|
|
|
//auto target1 = bg->getChildByTag(kTagSprite1);
|
|
|
|
//auto target2 = bg->getChildByTag(kTagSprite2);
|
2013-08-16 16:05:27 +08:00
|
|
|
auto waves = Waves::create(5, Size(15,10), 5, 20, true, false);
|
|
|
|
auto shaky = Shaky3D::create(5, Size(15,10), 4, false);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-12-11 13:39:34 +08:00
|
|
|
_target1->runAction( RepeatForever::create( waves ) );
|
|
|
|
_target2->runAction( RepeatForever::create( shaky ) );
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
// moving background. Testing issue #244
|
2014-05-15 01:07:09 +08:00
|
|
|
auto move = MoveBy::create(3, Vec2(200,0) );
|
2014-07-10 00:45:27 +08:00
|
|
|
_bgNode->runAction(RepeatForever::create( Sequence::create(move, move->reverse(), nullptr) ));
|
2012-04-08 14:16:29 +08:00
|
|
|
}
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
std::string Effect3::title() const
|
2010-09-16 11:35:58 +08:00
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
return "Effects on 2 sprites";
|
2012-04-08 14:16:29 +08:00
|
|
|
}
|
|
|
|
|
2010-09-16 11:35:58 +08:00
|
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// Effect4
|
|
|
|
//
|
|
|
|
//------------------------------------------------------------------
|
2012-06-27 18:44:25 +08:00
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
class Lens3DTarget : public Node
|
2012-06-27 18:44:25 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-05-15 01:07:09 +08:00
|
|
|
virtual void setPosition(const Vec2& var)
|
2012-06-27 18:44:25 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
_lens3D->setPosition(var);
|
2012-06-27 18:44:25 +08:00
|
|
|
}
|
2013-01-29 12:59:43 +08:00
|
|
|
|
2014-05-15 01:07:09 +08:00
|
|
|
virtual const Vec2& getPosition() const
|
2013-01-29 12:59:43 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
return _lens3D->getPosition();
|
2013-01-29 12:59:43 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
static Lens3DTarget* create(Lens3D* pAction)
|
2012-06-27 18:44:25 +08:00
|
|
|
{
|
2014-08-28 07:31:57 +08:00
|
|
|
Lens3DTarget* pRet = new (std::nothrow) Lens3DTarget();
|
2013-06-15 14:03:30 +08:00
|
|
|
pRet->_lens3D = pAction;
|
2012-06-27 18:44:25 +08:00
|
|
|
pRet->autorelease();
|
|
|
|
return pRet;
|
|
|
|
}
|
|
|
|
private:
|
2012-06-27 20:50:47 +08:00
|
|
|
|
|
|
|
Lens3DTarget()
|
2014-04-09 22:53:59 +08:00
|
|
|
: _lens3D(nullptr)
|
2012-06-27 20:50:47 +08:00
|
|
|
{}
|
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
Lens3D* _lens3D;
|
2012-06-27 18:44:25 +08:00
|
|
|
};
|
|
|
|
|
2012-04-08 14:16:29 +08:00
|
|
|
void Effect4::onEnter()
|
|
|
|
{
|
2015-04-03 14:31:03 +08:00
|
|
|
EffectAdvanceBaseTest::onEnter();
|
2013-12-16 14:21:05 +08:00
|
|
|
//Node* gridNode = NodeGrid::create();
|
2013-12-11 13:39:34 +08:00
|
|
|
|
2014-05-15 01:07:09 +08:00
|
|
|
auto lens = Lens3D::create(10, Size(32,24), Vec2(100,180), 150);
|
|
|
|
auto move = JumpBy::create(5, Vec2(380,0), 100, 4);
|
2013-08-16 16:05:27 +08:00
|
|
|
auto move_back = move->reverse();
|
2014-07-10 00:45:27 +08:00
|
|
|
auto seq = Sequence::create( move, move_back, nullptr);
|
2012-04-08 14:16:29 +08:00
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
/* In cocos2d-iphone, the type of action's target is 'id', so it supports using the instance of 'Lens3D' as its target.
|
|
|
|
While in cocos2d-x, the target of action only supports Node or its subclass,
|
|
|
|
so we make an encapsulation for Lens3D to achieve that.
|
2012-06-27 20:50:47 +08:00
|
|
|
*/
|
|
|
|
|
2013-08-16 16:05:27 +08:00
|
|
|
auto director = Director::getInstance();
|
|
|
|
auto pTarget = Lens3DTarget::create(lens);
|
2012-06-27 20:50:47 +08:00
|
|
|
// Please make sure the target been added to its parent.
|
|
|
|
this->addChild(pTarget);
|
2013-12-11 13:39:34 +08:00
|
|
|
//gridNode->addChild(pTarget);
|
2012-06-27 20:50:47 +08:00
|
|
|
|
2012-06-27 18:44:25 +08:00
|
|
|
director->getActionManager()->addAction(seq, pTarget, false);
|
2013-12-11 13:39:34 +08:00
|
|
|
|
|
|
|
_bgNode->runAction( lens );
|
2012-04-08 14:16:29 +08:00
|
|
|
}
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
std::string Effect4::title() const
|
2010-09-16 11:35:58 +08:00
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
return "Jumpy Lens3D";
|
2012-04-08 14:16:29 +08:00
|
|
|
}
|
|
|
|
|
2010-09-16 11:35:58 +08:00
|
|
|
//------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// Effect5
|
|
|
|
//
|
|
|
|
//------------------------------------------------------------------
|
2012-04-08 14:16:29 +08:00
|
|
|
void Effect5::onEnter()
|
|
|
|
{
|
2015-04-03 14:31:03 +08:00
|
|
|
EffectAdvanceBaseTest::onEnter();
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-07-12 06:24:23 +08:00
|
|
|
//CCDirector::getInstance()->setProjection(DirectorProjection2D);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-08-16 16:05:27 +08:00
|
|
|
auto effect = Liquid::create(2, Size(32,24), 1, 20);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-08-16 16:05:27 +08:00
|
|
|
auto stopEffect = Sequence::create(
|
2012-04-19 14:35:52 +08:00
|
|
|
effect,
|
2013-06-20 14:17:10 +08:00
|
|
|
DelayTime::create(2),
|
|
|
|
StopGrid::create(),
|
2012-06-14 15:13:16 +08:00
|
|
|
// [DelayTime::create:2],
|
2012-04-19 14:35:52 +08:00
|
|
|
// [[effect copy] autorelease],
|
2014-07-10 00:45:27 +08:00
|
|
|
nullptr);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-12-11 13:39:34 +08:00
|
|
|
//auto bg = getChildByTag(kTagBackground);
|
|
|
|
_bgNode->runAction(stopEffect);
|
2012-04-08 14:16:29 +08:00
|
|
|
}
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
std::string Effect5::title() const
|
2010-09-16 11:35:58 +08:00
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
return "Test Stop-Copy-Restar";
|
2012-04-08 14:16:29 +08:00
|
|
|
}
|
|
|
|
|
2010-09-16 11:35:58 +08:00
|
|
|
void Effect5::onExit()
|
|
|
|
{
|
2015-04-03 14:31:03 +08:00
|
|
|
EffectAdvanceBaseTest::onExit();
|
2010-09-16 11:35:58 +08:00
|
|
|
|
2013-07-26 04:36:19 +08:00
|
|
|
Director::getInstance()->setProjection(Director::Projection::_3D);
|
2012-04-08 14:16:29 +08:00
|
|
|
}
|
|
|
|
|
2010-09-16 11:35:58 +08:00
|
|
|
//------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// Effect5
|
|
|
|
//
|
|
|
|
//------------------------------------------------------------------
|
2012-04-08 14:16:29 +08:00
|
|
|
void Issue631::onEnter()
|
|
|
|
{
|
2015-04-03 14:31:03 +08:00
|
|
|
EffectAdvanceBaseTest::onEnter();
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2014-07-10 00:45:27 +08:00
|
|
|
auto effect = Sequence::create( DelayTime::create(2.0f), Shaky3D::create(5.0f, Size(5, 5), 16, false), nullptr);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
// cleanup
|
2013-12-11 13:39:34 +08:00
|
|
|
//auto bg = getChildByTag(kTagBackground);
|
|
|
|
removeChild(_bgNode, true);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
// background
|
2013-08-16 16:05:27 +08:00
|
|
|
auto layer = LayerColor::create( Color4B(255,0,0,255) );
|
2012-04-19 14:35:52 +08:00
|
|
|
addChild(layer, -10);
|
2013-08-16 16:05:27 +08:00
|
|
|
auto sprite = Sprite::create("Images/grossini.png");
|
2014-08-28 11:41:18 +08:00
|
|
|
sprite->setPosition(50,80);
|
2012-04-19 14:35:52 +08:00
|
|
|
layer->addChild(sprite, 10);
|
|
|
|
|
|
|
|
// foreground
|
2013-12-16 14:21:05 +08:00
|
|
|
auto layer2BaseGrid = NodeGrid::create();
|
2013-08-16 16:05:27 +08:00
|
|
|
auto layer2 = LayerColor::create(Color4B( 0, 255,0,255 ) );
|
|
|
|
auto fog = Sprite::create("Images/Fog.png");
|
2012-04-08 14:16:29 +08:00
|
|
|
|
2013-07-05 16:49:22 +08:00
|
|
|
BlendFunc bf = {GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA};
|
2012-04-19 14:35:52 +08:00
|
|
|
fog->setBlendFunc(bf);
|
|
|
|
layer2->addChild(fog, 1);
|
2013-12-11 13:39:34 +08:00
|
|
|
addChild(layer2BaseGrid, 1);
|
|
|
|
layer2BaseGrid->addChild(layer2);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-12-11 13:39:34 +08:00
|
|
|
layer2BaseGrid->runAction( RepeatForever::create(effect) );
|
2012-04-08 14:16:29 +08:00
|
|
|
}
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
std::string Issue631::title() const
|
2012-04-08 14:16:29 +08:00
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
return "Testing Opacity";
|
2012-04-08 14:16:29 +08:00
|
|
|
}
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
std::string Issue631::subtitle() const
|
2012-04-08 14:16:29 +08:00
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
return "Effect image should be 100% opaque. Testing issue #631";
|
2012-04-08 14:16:29 +08:00
|
|
|
}
|
|
|
|
|
2010-09-16 11:35:58 +08:00
|
|
|
//------------------------------------------------------------------
|
|
|
|
//
|
2015-04-03 14:31:03 +08:00
|
|
|
// EffectAdvanceBaseTest
|
2010-09-16 11:35:58 +08:00
|
|
|
//
|
|
|
|
//------------------------------------------------------------------
|
2012-04-08 14:16:29 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
void EffectAdvanceBaseTest::onEnter(void)
|
2010-09-16 11:35:58 +08:00
|
|
|
{
|
2015-04-03 14:31:03 +08:00
|
|
|
TestCase::onEnter();
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-12-16 14:21:05 +08:00
|
|
|
_bgNode = NodeGrid::create();
|
2014-05-15 01:07:09 +08:00
|
|
|
_bgNode->setAnchorPoint(Vec2(0.5,0.5));
|
2013-12-11 13:39:34 +08:00
|
|
|
addChild(_bgNode);
|
|
|
|
//_bgNode->setPosition( VisibleRect::center() );
|
2013-08-16 16:05:27 +08:00
|
|
|
auto bg = Sprite::create("Images/background3.png");
|
2012-10-23 17:48:50 +08:00
|
|
|
bg->setPosition( VisibleRect::center() );
|
2013-12-11 13:39:34 +08:00
|
|
|
//addChild(bg, 0, kTagBackground);
|
|
|
|
//bg->setPosition( VisibleRect::center() );
|
|
|
|
_bgNode->addChild(bg);
|
|
|
|
|
2013-12-16 14:21:05 +08:00
|
|
|
_target1 = NodeGrid::create();
|
2014-05-15 01:07:09 +08:00
|
|
|
_target1->setAnchorPoint(Vec2(0.5,0.5));
|
2013-08-16 16:05:27 +08:00
|
|
|
auto grossini = Sprite::create("Images/grossinis_sister2.png");
|
2013-12-11 13:39:34 +08:00
|
|
|
_target1->addChild(grossini);
|
|
|
|
_bgNode->addChild(_target1);
|
2014-08-28 11:41:18 +08:00
|
|
|
_target1->setPosition(VisibleRect::left().x+VisibleRect::getVisibleRect().size.width/3.0f, VisibleRect::bottom().y+ 200);
|
2013-08-16 16:05:27 +08:00
|
|
|
auto sc = ScaleBy::create(2, 5);
|
|
|
|
auto sc_back = sc->reverse();
|
2014-07-10 00:45:27 +08:00
|
|
|
_target1->runAction( RepeatForever::create(Sequence::create(sc, sc_back, nullptr) ) );
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-12-11 13:39:34 +08:00
|
|
|
|
2013-12-16 14:21:05 +08:00
|
|
|
_target2 = NodeGrid::create();
|
2014-05-15 01:07:09 +08:00
|
|
|
_target2->setAnchorPoint(Vec2(0.5,0.5));
|
2013-08-16 16:05:27 +08:00
|
|
|
auto tamara = Sprite::create("Images/grossinis_sister1.png");
|
2013-12-11 13:39:34 +08:00
|
|
|
_target2->addChild(tamara);
|
|
|
|
_bgNode->addChild(_target2);
|
2014-08-28 11:41:18 +08:00
|
|
|
_target2->setPosition(VisibleRect::left().x+2*VisibleRect::getVisibleRect().size.width/3.0f,VisibleRect::bottom().y+200);
|
2013-08-16 16:05:27 +08:00
|
|
|
auto sc2 = ScaleBy::create(2, 5);
|
|
|
|
auto sc2_back = sc2->reverse();
|
2014-07-10 00:45:27 +08:00
|
|
|
_target2->runAction( RepeatForever::create(Sequence::create(sc2, sc2_back, nullptr) ) );
|
2013-12-11 13:39:34 +08:00
|
|
|
|
2012-04-08 14:16:29 +08:00
|
|
|
}
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
EffectAdvanceBaseTest::~EffectAdvanceBaseTest(void)
|
2012-04-08 14:16:29 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
std::string EffectAdvanceBaseTest::title() const
|
2010-09-16 11:35:58 +08:00
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
return "No title";
|
2010-09-16 11:35:58 +08:00
|
|
|
}
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
std::string EffectAdvanceBaseTest::subtitle() const
|
2010-09-16 11:35:58 +08:00
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
return "";
|
2010-09-16 11:35:58 +08:00
|
|
|
}
|