Skip to content

Commit

Permalink
set level data in dailycell
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Oct 17, 2023
1 parent 8ac1db5 commit 03bdeff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/layers/DailyCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ void DailyCell::loadFromLevel(GJGameLevel* level) {
title->limitLabelWidth(170, .7f, .4f);
this->m_pLayer->addChild(title);

level->levelName = biCache->getLevelName(level->levelID);

/*CCNode* percentage = CCLabelBMFont::create(CCString::createWithFormat("%i%%", level->normalPercent)->getCString(), "goldFont.fnt");
if(level->normalPercent == 100) percentage = CCSprite::createWithSpriteFrameName("GJ_completesIcon_001.png");
percentage->setAnchorPoint({ 0.0f, 0.5f });
Expand Down Expand Up @@ -150,6 +152,8 @@ void DailyCell::loadFromLevel(GJGameLevel* level) {
this->m_pLayer->addChild(coinSprite);
}

level->coins = biCache->getCoinCount(level->levelID);

//buttons
auto menu = CCMenu::create();

Expand Down

0 comments on commit 03bdeff

Please sign in to comment.