private void Awake() { selector = FindObjectOfType <VariantCardSelector>(); mainUIControl = FindObjectOfType <MainMenuUIControl>(); btn.onClick.AddListener(OnClickEventHandler); }
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(); } }
// Use this for initialization void Start() { mainMenuUIControl = GetComponent <MainMenuUIControl>(); if (PlayerPrefs.HasKey("Coins")) { coins = PlayerPrefs.GetInt("Coins"); } else { PlayerPrefs.SetInt("Coins", 0); } }
public virtual void Initialize() { patientDataManager = FindObjectOfType <PatientDataManager>(); categoryManager = FindObjectOfType <CategoryManager>(); categoryStorage = FindObjectOfType <CategoryStorage>(); cardStorage = FindObjectOfType <CardStorage>(); mainMenu = FindObjectOfType <MainMenuUIControl>(); ConfigurateCategories(); cardSelector.Initialize(Cards); Signals.AddCategoryEvent.AddListener(AddNewCategory); Signals.AddCardEvent.AddListener(AddNewCard); Signals.DeleteCategoryFromGame.AddListener(DeleteCategory); Signals.DeleteCardFromCategory.AddListener(DeleteCard); }