2011-07-08 11:22:35 +08:00
|
|
|
//
|
|
|
|
// Bug-886
|
|
|
|
// http://code.google.com/p/cocos2d-iphone/issues/detail?id=886
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "Bug-886.h"
|
|
|
|
|
2015-04-09 08:37:30 +08:00
|
|
|
USING_NS_CC;
|
|
|
|
|
2011-07-08 11:22:35 +08:00
|
|
|
bool Bug886Layer::init()
|
|
|
|
{
|
2015-04-03 14:31:03 +08:00
|
|
|
if(BugsTestBase::init())
|
2011-07-08 11:22:35 +08:00
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
// ask director the the window size
|
2013-08-16 16:05:27 +08:00
|
|
|
// auto size = [[Director sharedDirector] winSize];
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-08-16 16:05:27 +08:00
|
|
|
auto sprite = Sprite::create("Images/bugs/bug886.jpg");
|
2014-05-15 01:07:09 +08:00
|
|
|
sprite->setAnchorPoint(Vec2::ZERO);
|
|
|
|
sprite->setPosition(Vec2::ZERO);
|
2012-04-19 14:35:52 +08:00
|
|
|
sprite->setScaleX(0.6f);
|
|
|
|
addChild(sprite);
|
2011-07-08 11:22:35 +08:00
|
|
|
|
2013-08-16 16:05:27 +08:00
|
|
|
auto sprite2 = Sprite::create("Images/bugs/bug886.png");
|
2014-05-15 01:07:09 +08:00
|
|
|
sprite2->setAnchorPoint(Vec2::ZERO);
|
2012-04-19 14:35:52 +08:00
|
|
|
sprite2->setScaleX(0.6f);
|
2014-08-28 11:41:18 +08:00
|
|
|
sprite2->setPosition(sprite->getContentSize().width * 0.6f + 10, 0);
|
2012-04-19 14:35:52 +08:00
|
|
|
addChild(sprite2);
|
2011-07-08 11:22:35 +08:00
|
|
|
|
|
|
|
return true;
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
2011-07-08 11:22:35 +08:00
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
return false;
|
2011-07-08 11:22:35 +08:00
|
|
|
}
|