using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Obstacle : MonoBehaviour
{
    public List<GameObject> easyObstacleObjs;
    public List<GameObject> mediumObstacleObjs;
    public List<GameObject> hardObstacleObjs;

    private void Start()
    {
        Starter();
    }
    public void Starter()
    {
        List<GameObject> list = DifficultyList();
        int rand = Random.Range(0, list.Count);
        list[rand].gameObject.SetActive(true);
    }
    List<GameObject> DifficultyList()
    {
        int difficultyLevel = (int)GameManager.instance.difficultyLevel;
        return difficultyLevel == 0 ? easyObstacleObjs : difficultyLevel == 1 ? mediumObstacleObjs : hardObstacleObjs;
        //if (difficultyLevel == 0)
        //{
        //    return easyObstacleObjs;
        //}
        //else if (difficultyLevel == 1)
        //{
        //    return mediumObstacleObjs;
        //}
        //else
        //{
        //    return HardObstacleObjs;
        //}
    }
}
