Esempio n. 1
0
 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);
 }
Esempio n. 2
0
    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;
    }