Exemple #1
0
        // Heal Delts, remove status, restore move PP
        void Heal()
        {
            UIMan.StartMessage(null, null, () => OptionMenuUI.GetComponent <Animator>().SetBool("SlideIn", false));
            if (!hasHealed)
            {
                hasHealed = true;
                UIMan.StartNPCMessage("Looks like your Delts aren't looking so hot!", "Nurse Valleck");
                UIMan.StartNPCMessage("I think I've got something for that...", "Nurse Valleck");
                foreach (DeltemonClass delt in GameMan.deltPosse)
                {
                    delt.health      = delt.GPA;
                    delt.curStatus   = statusType.None;
                    delt.statusImage = UIMan.noStatus;
                    foreach (MoveClass move in delt.moveset)
                    {
                        move.PPLeft = move.PP;
                    }
                }
            }
            else
            {
                UIMan.StartNPCMessage("I just... oh I get it.", "Nurse Valleck");
                UIMan.StartNPCMessage("You just want to take advantage of all these free meds.", "Nurse Valleck");
                UIMan.StartNPCMessage("I guess I could hook you up with some more.", "Nurse Valleck");
            }

            // LATER: 3-second Heal animation here
            UIMan.StartMessage(null, healDeskAnimation());
            UIMan.StartNPCMessage("That should do it!", "Nurse Valleck");
            UIMan.StartNPCMessage("Tell those boys to study a little harder next time!", "Nurse Valleck");
            UIMan.StartNPCMessage("Is there anything else I can do for you today?", "Nurse Valleck");
            UIMan.StartMessage(null, null, () => OptionMenuUI.GetComponent <Animator>().SetBool("SlideIn", true));
        }
Exemple #2
0
 // Return to movement UI and save
 public void EndInteraction()
 {
     UIMan.StartMessage(null, null, () => OptionMenuUI.GetComponent <Animator>().SetBool("SlideIn", false));
     UIMan.StartNPCMessage("Come back anytime!", "Nurse Valleck");
     UIMan.StartMessage(null, null, () => nurseValleck.SetTrigger("SlideOut"));
     UIMan.StartMessage(null, wait(1), () => UIMan.MovementUI.Open());
     UIMan.StartMessage(null, null, () => UIMan.EndNPCMessage());
     GameMan.Save();
 }
Exemple #3
0
        // Animates close of a UI object
        public IEnumerator AnimateClose(GameObject UI, bool onMenu)
        {
            UI.GetComponent <Animator>().SetBool("SlideIn", false);
            yield return(new WaitForSeconds(0.5f));

            UI.SetActive(false);
            if (onMenu)
            {
                OptionMenuUI.SetActive(true);
                UIMan.StartNPCMessage("Is there anything else I can do for you today?", "Nurse Valleck");
                UIMan.StartMessage(null, null, () => OptionMenuUI.GetComponent <Animator>().SetBool("SlideIn", true));
            }
        }
Exemple #4
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);
        }
Exemple #5
0
        // When new game sequence triggered
        IEnumerator OnTriggerEnter2D(Collider2D player)
        {
            if (!hasTriggered)
            {
                UIMan.MovementUI.Close();

                hasTriggered = true;

                // Slide in nurse Valleck
                nurseValleck.gameObject.SetActive(true);
                nurseValleck.SetTrigger("SlideIn");

                yield return(new WaitForSeconds(1));

                UIMan.StartNPCMessage("Nurse Valleck here!", "Nurse Valleck");
                UIMan.StartNPCMessage("How can I help you, sweetie?", "Nurse Valleck");
                UIMan.StartMessage(null, null, () => OptionMenuUI.SetActiveIfChanged(true));
                UIMan.StartMessage(null, null, () => OptionMenuUI.GetComponent <Animator>().SetBool("SlideIn", true));
            }
        }
Exemple #6
0
        // Load House Delts into the scroll view
        public void ShowHouseDelts()
        {
            hideMoveOverviews();

            HouseScrollView.SetActive(true);
            PosseScrollView.SetActive(false);

            ShowHouseButtonImage.color = Color.yellow;
            ShowPosseButtonImage.color = Color.magenta;

            if (!houseDeltsLoaded)
            {
                houseDeltsLoaded = true;
                int i = 0;

                // Destroy previous list
                foreach (Transform child in HouseContentTransform)
                {
                    Destroy(child.gameObject);
                }

                queryResults.Clear();

                // Load house Delts into UI
                foreach (DeltemonData houseDelt in GameMan.houseDelts)
                {
                    DeltDexClass tmpDex = ((GameObject)Resources.Load("Deltemon/DeltDex/" + houseDelt.deltdexName + "DD")).GetComponent <DeltDexClass>();
                    // Do not show Delts that do not match search query
                    if (isSearch)
                    {
                        // Check names, pin, level, item, and majors
                        if (!(houseDelt.nickname.Contains(nameQuery) || houseDelt.deltdexName.Contains(nameQuery) || tmpDex.nickname.Contains(nameQuery)))
                        {
                            continue;
                        }
                        else if ((tmpDex.pinNumber < pinQuery) || (houseDelt.level < levelQuery))
                        {
                            continue;
                        }
                        else if (itemQuery && string.IsNullOrEmpty(houseDelt.itemName))
                        {
                            continue;
                        }
                        else if (!majorQuery.Contains(tmpDex.major1) && !majorQuery.Contains(tmpDex.major2))
                        {
                            continue;
                        }
                        // Add if query fits
                        queryResults.Add(houseDelt);
                    }
                    else
                    {
                        queryResults = new List <DeltemonData>(GameMan.houseDelts);
                    }

                    GameObject li    = Instantiate(DeltListItem, HouseContentTransform);
                    Text[]     texts = li.GetComponentsInChildren <Text>();
                    texts[0].text = houseDelt.nickname;
                    texts[1].text = "Lv. " + houseDelt.level;

                    li.transform.GetChild(0).GetComponent <Image>().color = tmpDex.major1.background;
                    if (tmpDex.major2.majorName == "NoMajor")
                    {
                        li.transform.GetChild(3).GetComponent <Image>().sprite = tmpDex.major1.majorImage;
                        li.GetComponent <Image>().color = tmpDex.major1.background;
                    }
                    else
                    {
                        li.transform.GetChild(4).GetComponent <Image>().sprite = tmpDex.major1.majorImage;
                        li.transform.GetChild(5).GetComponent <Image>().sprite = tmpDex.major2.majorImage;
                        li.GetComponent <Image>().color = tmpDex.major2.background;
                    }

                    Button b = li.transform.GetChild(6).gameObject.GetComponent <Button>();
                    AddListener(b, i, true);
                    li.transform.localScale = Vector3.one;
                    i++;
                }
            }

            // If BankUI not open, slide it in.
            if (!BankUI.activeInHierarchy)
            {
                BankUI.SetActive(true);
                BankUI.GetComponent <Animator>().SetBool("SlideIn", true);

                // If not a search query, slide out Option Menu
                if (!isSearch)
                {
                    OptionMenuUI.GetComponent <Animator>().SetBool("SlideIn", false);
                }
            }
        }