private void Awake() { transitionController = FindObjectOfType <MenuTransitionController>(); variantMenu = FindObjectOfType <VariantGameMenu>(); wordbookMenu = FindObjectOfType <WordBookMenuControl>(); patientDataManager = FindObjectOfType <PatientDataManager>(); categoryStorage = FindObjectOfType <CategoryStorage>(); cardStorage = FindObjectOfType <CardStorage>(); categoryLibraryControl = FindObjectOfType <CategoryLibraryUIControl>(); cardLibraryControl = FindObjectOfType <CardLibraryUIControl>(); categoryCreator = FindObjectOfType <CategoryCreator>(); cardCreator = FindObjectOfType <CardCreator>(); contentLoader = FindObjectOfType <ContentLoader>(); Signals.SetImgForCardEvent.AddListener(SetUpNewImgForCard); Signals.SetImgForCategoryEvent.AddListener(SetUpImgForCategory); Signals.CardLoadEnd.AddListener((value) => { if (value) { transitionController.ReturnToBack(); Debug.Log("load end"); } else { Debug.Log("load error"); } }); BindBtn(); }
private void Awake() { variantGameUI = FindObjectOfType <VariantGameMenu>(); wordbookGameUI = FindObjectOfType <WordBookMenuControl>(); wordCompositngUI = FindObjectOfType <WordComposingMenuControl>(); cardStorage = FindObjectOfType <CardStorage>(); categoryStorage = FindObjectOfType <CategoryStorage>(); mainMenuUI = FindObjectOfType <MainMenuUIControl>(); patientManager = FindObjectOfType <PatientDataManager>(); saveSystem = FindObjectOfType <SaveSystem>(); cardLibrary = FindObjectOfType <CardLibraryUIControl>(); categoryLibrary = FindObjectOfType <CategoryLibraryUIControl>(); if (patientManager != null) { patientManager.Initialize(); } if (saveSystem != null) { saveSystem.Initialize(); } if (categoryStorage != null) { categoryStorage.Initialize(); } if (cardStorage != null) { cardStorage.Initialize(); } if (variantGameUI != null) { variantGameUI.Initialize(); } if (wordbookGameUI != null) { wordbookGameUI.Initialize(); } if (wordCompositngUI != null) { wordCompositngUI.Initialize(); } if (categoryLibrary != null) { categoryLibrary.Initialize(); } if (cardLibrary != null) { cardLibrary.Initialize(); } if (mainMenuUI != null) { mainMenuUI.Initialize(); } }