|
|
|
@ -133,7 +133,7 @@ void Meteos::spawnBlocks(float fElapsedTime){ |
|
|
|
|
lastBlockSpawn+=fElapsedTime; |
|
|
|
|
if (lastBlockSpawn>=gameBoard.spawnRate){ |
|
|
|
|
lastBlockSpawn-=gameBoard.spawnRate; |
|
|
|
|
//gameBoard.spawnBlock(randBlockPos(gen));
|
|
|
|
|
gameBoard.spawnBlock(randBlockPos(gen)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -984,7 +984,15 @@ void Meteos::drawGame(float fElapsedTime,bool debugView){ |
|
|
|
|
DrawStringDecal(gameBoard.drawOffset+vi2d{0,-8},"+"+std::to_string(accumulatedScore),frameTime%5>2?Pixel{224, 184, 148}:WHITE,{0.75,0.75}); |
|
|
|
|
GradientFillRectDecal(gameBoard.drawOffset+vi2d{gameBoard.boardSize.x*12+16,0}, {32,32}, BLACK, VERY_DARK_GREEN, VERY_DARK_GREEN, BLACK); |
|
|
|
|
DrawRectDecal(gameBoard.drawOffset+vi2d{gameBoard.boardSize.x*12+16,0}, {32,32}, DARK_YELLOW); |
|
|
|
|
DrawStringDecal(gameBoard.drawOffset+vi2d{gameBoard.boardSize.x*12+16,8},std::to_string(blocksInAttackQueue),{66, 125, 92}); |
|
|
|
|
std::string attackQueueDisplay=""; |
|
|
|
|
if (blocksInAttackQueue<100){ |
|
|
|
|
attackQueueDisplay+='0'; |
|
|
|
|
} |
|
|
|
|
if (blocksInAttackQueue<10){ |
|
|
|
|
attackQueueDisplay+='0'; |
|
|
|
|
} |
|
|
|
|
attackQueueDisplay+=std::to_string(blocksInAttackQueue); |
|
|
|
|
DrawStringDecal(gameBoard.drawOffset-vf2d{GetTextSize(attackQueueDisplay).x*0.85f/2,0}+vi2d{gameBoard.boardSize.x*12+16+16,3},attackQueueDisplay,{66, 125, 92},{0.85,1}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|