private void LoadCurrentLevel() { currentLevel = levels[levelIndex]; currentLevel.LoadLevel(); gameStats.SetLevelVariables(currentLevel.GetSecondsToComplete(), currentLevel.GetRequiredGems()); levelRenderer.LoadLevel(currentLevel, currentLevel.GetPlayerInitialPosition().x - 3, currentLevel.GetPlayerInitialPosition().y - 3); playerPosition.InitializePosition(currentLevel.GetPlayerInitialPosition().x, currentLevel.GetPlayerInitialPosition().y); }
public void ReloadAfterDeath() { currentLevel.ChangeCell(playerPosition.XPosition, playerPosition.YPosition, CellKind.Empty); currentLevel.ChangeCell(currentLevel.GetPlayerInitialPosition().x, currentLevel.GetPlayerInitialPosition().y, CellKind.Player); playerPosition.InitializePosition(currentLevel.GetPlayerInitialPosition().x, currentLevel.GetPlayerInitialPosition().y); levelRenderer.LoadLevel(currentLevel, currentLevel.GetPlayerInitialPosition().x - 3, currentLevel.GetPlayerInitialPosition().y - 3); gameInProgress = true; }