//Ends the level
    public void EndGame(bool hasWon)
    {
        SpeedToEnd();

        HasStarted = false;
        tries      = 3;
        foreach (var spawner in SpawnersInLevel)
        {
            spawner.StopSpawning();
        }

        if (musicController)
        {
            musicController.EndMusic();
        }

        if (!menuController)
        {
            return;
        }
        if (hasWon)
        {
            menuController.ShowWinState();
        }
        else
        {
            menuController.ShowLoseState();
        }
    }