public void Update(List <Platform> platformList, Camera camera)
{
WaitForPlatformEnd(platformList);
switch (currentStance)
{
case GameConstants.PlayerStance.GameStartCountDown:
if (!newGameCounter.IsRunning)
{
newGameCounter.Start();
}
else
{
if (GameConstants.NewGameCountdownTime - newGameCounter.Elapsed.Seconds <= 0)
{
lastStance = GameConstants.PlayerStance.Idle;
currentStance = GameConstants.PlayerStance.Idle;
}
}
break;
case GameConstants.PlayerStance.Idle:
UpdateProgressBarWidth();
CheckPlayerOnPlatformPosition(platformList);
break;
case GameConstants.PlayerStance.IdleJump:
PerformIdleJump();
break;
case GameConstants.PlayerStance.Jump:
PerformJump();
break;
case GameConstants.PlayerStance.SideJump:
PerformIdleJump();
PerformHorizontalJump();
break;
case GameConstants.PlayerStance.JumpReady:
UpdateProgressBarWidth();
break;
case GameConstants.PlayerStance.SideJumpReady:
UpdateProgressBarWidth();
break;
}
}