using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Panel_LoadingData : TWS_UIPanel { private Transform UI_Parent; public GameObject taskPrefab; public GameObject loadingBarPrefab; public override void Initialize() { UI_Parent = transform; if(!GameData.Instance.SkipSplash) { TWS_SplashScreenStoryManager.Instance.LoadStoryData(LoadStoryDataIntoUI, UI_Parent); TWS_Delegates._OnAllGameDataLoaded = OnAllGameDataLoaded; } else OnAllGameDataLoaded(); } void SpawnGameLoadingTasks() { Instantiate(taskPrefab); } void LoadStoryDataIntoUI(GameObject storyData) { PI_StoryData storyDataComponent = storyData.GetComponent(); storyDataComponent.LaunchStory(); SpawnGameLoadingTasks(); Instantiate(loadingBarPrefab, UI_Parent); } private void OnAllGameDataLoaded() => GameManager.Instance.InitRunner(); // void OpenCharacterCreationPanel() // { // UI_Manager.Instance.OpenPanel(); // } }