using System.Collections.Generic;
using Assets.Source.CommonWorkers;
using Assets.Source.Core.Managers;
using Assets.Source.Settings;
using UnityEngine;

namespace Assets.Source.General
{
    public class SceneEntry : MonoBehaviour
    {
        public List<GameObject> CommonPrefabs;
        public List<GameSceneType> ScenesToPreload;

        void Awake()
        {
            if (!GameManager.HasInstance)
            {
                var core = Instantiate(Get.CoreSettings.MainCore);
                core.name = Get.CoreSettings.MainCore.name;
                WorkerScenes.MoveToCommon(core);
            }
            Get.Scenes.UseSceneEntry(this);
        }
    }
}