「Cocos2D-x」Android端末にデバッグログを表示してみた
Android端末上に数値を表示する方法メモ。
ただ単にラベルで表示しただけ。
※下記のCSystemManager::getInstance()->getScaleSize()の部分を変更して使用する。
//cocos2d::の省略 using namespace cocos2d; // デバッグログ表示 std::string debugString = StringUtils::format("%f", CSystemManager::getInstance()->getScaleSize()); Label* pDebugLabel = Label::createWithSystemFont(debugString, "Arial", 30); pDebugLabel->setColor(Color3B::BLACK); pDebugLabel->setPosition(WINDOW_RIGHT * 0.9f, WINDOW_TOP * 0.1f); this->addChild(pDebugLabel);