Exemple #1
0
    public void StartRound()
    {
        failed  = false;
        onRound = true;

        actualLevelEnemies = levelSettings.ListToManager();
        foreach (var enemy in actualLevelEnemies)
        {
            enemy.gameObject.SetActive(true);
            enemy.SpawnEnemy(levelSettings.GetEnemyRandomSpawnPosition(levelSettings.actualLoops));
        }

        playerMov.Respawn();

        levelSettings.actualLevelTime = 0;

        levelShadowCreator.SetPlayerRecords(roundPlayerRecords);
        levelShadowCreator.CreateShadows();
        playerMov.ResetToSpawn(levelSettings.GetPlayerRandomSpawnPosition(levelSettings.actualLoops));
        playerRec.ResetRecord();

        playerRec.BeginRound();
        roundStartTime = Time.time;

        soundManager.LoopEffect();
        levelCamera.GlitchCameraLoop();
    }