void GameScene::showScore() { //スコア CCLabelBMFont* score = dynamic_cast<CCLabelBMFont*>(this->getChildByTag( kTagScore)); if (score) { score->removeFromParent(); } CCLabelBMFont* label = dynamic_cast<CCLabelBMFont*>(this->getChildByTag( kTagScoreLabel)); CCString* gameScore = CCString::createWithFormat("%d", getScore()); score = CCLabelBMFont::create(gameScore->getCString(), FONT_ORANGE); score->setScale(TEXT_SCALE); score->setAnchorPoint(CCPointZero); score->setPosition( label->getPositionX() + label->getContentSize().width * TEXT_SCALE + 10, label->getPositionY()); score->setTag(kTagScore); this->addChild(score); }