コード例 #1
0
ファイル: CategoryManager.cs プロジェクト: nnton3/AR_Tutor
    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();
    }
コード例 #2
0
ファイル: PatientCreator.cs プロジェクト: nnton3/AR_Tutor
    private void Awake()
    {
        saveSystem           = FindObjectOfType <UserSaveSystem>();
        transitionController = FindObjectOfType <MenuTransitionController>();

        BinFields();
        BindBtn();
    }
コード例 #3
0
    private void Awake()
    {
        storage              = FindObjectOfType <CardStorage>();
        saveSystem           = FindObjectOfType <SaveSystem>();
        patientDataManager   = FindObjectOfType <PatientDataManager>();
        categoryManager      = FindObjectOfType <CategoryManager>();
        transitionController = FindObjectOfType <MenuTransitionController>();

        BindUI();
    }
コード例 #4
0
ファイル: MainMenuUIControl.cs プロジェクト: nnton3/AR_Tutor
    public void Initialize()
    {
        transitionController = FindObjectOfType <MenuTransitionController>();

        BindBtns();
        SwitchEditableElemets();

        transitionController.ActivatePanel(gameSelector);
        transitionController.ReturnToMainMenuEvent.AddListener(() => settingsBtn.gameObject.SetActive(true));
    }
コード例 #5
0
	//public GameObject loadGamePanel;
	//public GameObject menuObject;

    public void ShowMenu(MenuTransitionController menu)
    {
        if (CurrentMenu != null)
        {
            CurrentMenu.IsOpen = false;
        }

        CurrentMenu = menu;
        CurrentMenu.IsOpen = true;
		Time.timeScale = 1;
    }
コード例 #6
0
    void Awake()
    {
        transitionController = FindObjectOfType <MenuTransitionController>();
        gameLogic            = FindObjectOfType <ButtonsGameLogic>();

        startGameBtn.onClick.AddListener(() =>
        {
            if (DataIsValid())
            {
                StartGame();
            }
        });

        SelectEvent.AddListener((card) => selectedCards.Add(card));
        UnselectEvent.AddListener((card) => selectedCards.Remove(card));
    }