I am making a mining styled game and am looking to make variables that effect how fast you are able to mine the block. This is the idea I have currently got but it does not wait for the timer to complete before mining, has anyone got a better way to do this?
if (MinePlayerCollision() && newState.IsKeyDown(Keys.D))
{
MiningElapsed = (float) gameTime.TotalGameTime.Seconds;
if (MiningEff <= MiningElapsed)
{
BlockMined = true;
MineReset = false;
MiningElapsed = 0;
}
}
MiningEff
? \$\endgroup\$