Beispiel #1
0
        void OpenSearch()
        {
            int i = 0;

            foreach (MajorClass major in majorList)
            {
                GameObject li = Instantiate(MajorListItem, MajorContentTransform);
                li.GetComponent <Image>().color = Color.white;
                li.transform.GetChild(0).GetComponent <Text>().text    = major.majorName;
                li.transform.GetChild(1).GetComponent <Image>().sprite = major.majorImage;
                AddMajorButtonListener(li.transform.GetChild(2).GetComponent <Button>(), i);
                li.GetComponent <RectTransform>().localScale = Vector3.one;
                i++;
            }
            SearchUI.SetActive(true);
            SearchUI.GetComponent <Animator>().SetBool("SlideIn", true);
            OptionMenuUI.GetComponent <Animator>().SetBool("SlideIn", false);
        }
Beispiel #2
0
        // Player presses back button on SwitchUI
        public void ExitSwitchMenu()
        {
            hideMoveOverviews();

            if (isSearch)
            {
                StartCoroutine(AnimateClose(BankUI, false));
                SearchUI.SetActive(true);
                SearchUI.GetComponent <Animator>().SetBool("SlideIn", true);
            }
            else
            {
                StartCoroutine(AnimateClose(BankUI, true));
            }

            // Reset switch-in data
            HouseDeltIndex = -1;
            PosseDeltIndex = -1;
            HouseSwitchIn  = null;
            HouseOverview.gameObject.SetActive(false);
            PosseOverview.gameObject.SetActive(false);
        }