Пример #1
0
//开始游戏
void JiejiScene::startGame()
{
	lineMax = JieJi_LineMax;
	moshi = "jieji";
	BaseScene::startGame();	
	setScoreLabel(StringUtils::format("%d",scoreLine));	
}
Пример #2
0
void JiejiScene::update(float dt)
{
	if(timeRunning)
	{ 
		setScoreLabel(StringUtils::format("%d",scoreLine));	
		moveSpeed += JieJi_Add * dt;
	}
}
Пример #3
0
void GameMain::createLabel()
{
    auto timeSubLabel=Label::createWithSystemFont("TIME","Marker Felt",36);
    timeSubLabel->setAnchorPoint(Vec2::ANCHOR_BOTTOM_RIGHT);
    timeSubLabel->setPosition(Vec2(200,1200));
    this->addChild(timeSubLabel);
    
    auto time=Label::createWithSystemFont("0","Marker Felt",36);
    time->setAnchorPoint(Vec2::ANCHOR_BOTTOM_RIGHT);
    time->setPosition(Vec2(200,1140));
    setTimeLabel(time);
    this->addChild(time);
    
    auto scoreSub=Label::createWithSystemFont("SCORE","Marker Felt",36);
    scoreSub->setAnchorPoint(Vec2::ANCHOR_BOTTOM_RIGHT);
    scoreSub->setPosition(Vec2(510,1200));
    this->addChild(scoreSub);
    
    auto score=Label::createWithSystemFont("0","Marker Felt",36);
    score->setAnchorPoint(Vec2::ANCHOR_BOTTOM_RIGHT);
    score->setPosition(Vec2(510,1140));
    setScoreLabel(score);
    this->addChild(score);
}