bool HighscoreScreen::init()
{
    if (!Layer::init())
    {
        return false;
    }

    _rootNode = CSLoader::createNode("Screens/HighscoreScreen.csb");
    addChild(_rootNode);
    this->scheduleUpdate();

    _myDictionary = __Dictionary::create();

    ReadHighscore();

    if (_scores[1]->length() == 0)
    {
        WriteDefaultHighscore();
        ReadHighscore();
    }

    //SPRITES
    InitSprites();
    //Animated Santa Sprite
    InitAnimation();
    //LABELS
    InitLabels();
    //TOUCHES
    InitControls();
    //BUTTONS
    InitButtons();

    return true;
}
Example #2
0
void Highscore::Initialize()
{
	Instance = this; 
	m_filePath = "Assets/Misc/Highscore.score";
	ReadHighscore();

	m_highscoreSize = 5;
}