axmol/samples/Cpp/TestCpp/Classes/BugsTest/Bug-886.cpp

32 lines
815 B
C++
Raw Normal View History

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"
bool Bug886Layer::init()
{
if(BugsTestBaseLayer::init())
{
// ask director the the window size
// CGSize size = [[Director sharedDirector] winSize];
Sprite* sprite = Sprite::create("Images/bugs/bug886.jpg");
sprite->setAnchorPoint(Point::ZERO);
sprite->setPosition(Point::ZERO);
sprite->setScaleX(0.6f);
addChild(sprite);
2011-07-08 11:22:35 +08:00
Sprite* sprite2 = Sprite::create("Images/bugs/bug886.png");
sprite2->setAnchorPoint(Point::ZERO);
sprite2->setScaleX(0.6f);
2013-07-12 14:11:55 +08:00
sprite2->setPosition(Point(sprite->getContentSize().width * 0.6f + 10, 0));
addChild(sprite2);
2011-07-08 11:22:35 +08:00
return true;
}
2011-07-08 11:22:35 +08:00
return false;
2011-07-08 11:22:35 +08:00
}