示例#1
0
 public void CloneHero()
 {
     heroCloneToPass = CharectorStats.setTempHero(CharectorStats.getTempHero());
     accumHeroXp     = heroCloneToPass[2];
     if (!gridMan.isMaxedActually)
     {
         bounds  = GetBounds();
         current = accumHeroXp - bounds[0];
     }
     heroLevelCap = CharectorStats.findCurrentMaxLevel(CharectorStats.getTempHero());
 }
 private void OnEnable()
 {
     heroesChosenSuccessfully = false;
     selectHeroesButton.GetComponent <Button>().onClick.AddListener(OnSelectClick);
     meltBackButton.GetComponent <Button>().interactable = false;
     currentHeroArray = CharectorStats.setTempHero(CharectorStats.getTempHero());
     selectedHeroTier = CharectorStats.HeroTier(currentHeroArray[0]);
     determineRequirements();
     AGT.GetComponent <Text>().text = heroRequirements.goldReq.ToString();
     setIconsNeedFilled();
 }
 public void DisplayStats()
 {
     int[] heroStats = CharectorStats.setTempHero(CharectorStats.getTempHero()); //displays stats of hero picked from tile but not necessarily selected
     objects[0].GetComponent <Text>().text = heroStats[2].ToString();            //XP
     objects[1].GetComponent <Text>().text = heroStats[5].ToString();            //health
     objects[2].GetComponent <Text>().text = heroStats[4].ToString();            //dmg
     objects[3].GetComponent <Text>().text = heroStats[7].ToString();            //agi
     objects[4].GetComponent <Text>().text = heroStats[6].ToString();            //crit
     objects[5].GetComponent <Text>().text = heroStats[8].ToString();            //def
     objects[6].GetComponent <Text>().text = heroStats[9].ToString();            //xptonext
     objects[7].GetComponent <Text>().text = heroStats[1].ToString();            //level
 }
    private void OnEnable()
    {
        isMaxedActually = false;
        int[] temp = CharectorStats.setTempHero(CharectorStats.getTempHero());
        if (CharectorStats.HeroIsMaxLvl(CharectorStats.getTempHero()))
        {
            isMaxedActually = true;
        }
        MeltPrestButtonDisplay();
        xpslide.tempMax        += tempMaxHit;
        xpslide.tempMaxReduced += tempMaxReduced;

        if (!isMaxedActually)
        {
            xpslide.CloneHero();
            xpslide.UpdateSlider(0);
            xpslide.SetCurrentAndBoundText();
        }
        xpToBeAdded = 0;
        InitializeMeltGrid();
        xpslide.SetHeroNameText();
        //need to remove selectedButtons if refreshing panel
        ClearSelectedGameObjs();
    }
 //these methods can also contain positional logic for displays
 private void SetToTemp()
 {
     disableObjects();
     transform.GetChild(CharectorStats.setTempHero(CharectorStats.getTempHero())[0]).gameObject.SetActive(true);
 }
示例#6
0
 public void SetHeroNameText()
 {
     int[] nameTemp = CharectorStats.setTempHero(CharectorStats.getTempHero());
     heroText.text = CharectorStats.HeroName(nameTemp[0]);
 }
示例#7
0
 public void SetTemp()
 {
     CharectorStats.setTempHero(thisButtonIndex);
     statValues.DisplayStats();
 }