增加难度上升机制
This commit is contained in:
+13
-2
@@ -221,10 +221,21 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
!suspendFlag &&
|
||||
!gameOverFlag)
|
||||
{
|
||||
if (currentMode == MODE_ROGUE)
|
||||
{
|
||||
int previousFallInterval = currentFallInterval;
|
||||
AdvanceRogueDifficulty(currentFallInterval > 0 ? currentFallInterval : GAME_TIMER_INTERVAL);
|
||||
if (currentFallInterval != previousFallInterval)
|
||||
{
|
||||
ResetGameTimer(hWnd);
|
||||
}
|
||||
}
|
||||
|
||||
if (currentMode == MODE_ROGUE && rogueStats.timeDilationLevel > 0 && rogueStats.timeDilationTicks <= 0)
|
||||
{
|
||||
int occupiedHeight = 0;
|
||||
for (int y = 0; y < nGameHeight; y++)
|
||||
int playableHeight = GetRoguePlayableHeight();
|
||||
for (int y = 0; y < playableHeight; y++)
|
||||
{
|
||||
bool hasCell = false;
|
||||
for (int x = 0; x < nGameWidth; x++)
|
||||
@@ -237,7 +248,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
if (hasCell)
|
||||
{
|
||||
occupiedHeight = nGameHeight - y;
|
||||
occupiedHeight = playableHeight - y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user