1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #include "HelloWorldScene.h" Scene* HelloWorld::createScene() { auto scene = Scene::create(); auto layer = HelloWorld::create(); scene->addChild(layer); return scene; } bool HelloWorld::init() { if ( !Layer::init() ) { return false; } //auto label = Label::createWithSystemFont("Hello World", "Thonburi", 34); auto label = Label::createWithSystemFont("Hell Cocos2d-x", "Thonburi", 50); label->setPosition(Point(240, 160)); this->addChild(label); return true; } | cs |
원본 실행 결과
문구와 글자크기 조절