public void AddtoUI(BasePokemon Pokemon) { ActivePokemon = Pokemon; Icon.SetActive(true); Icon.GetComponentInChildren <Image>().sprite = SpriteSheetLoader.GetSprite(ActivePokemon.Monster); SetSlider(); Name.text = ActivePokemon.Name; Level.text = "Lv." + ActivePokemon.Level; HPText.text = ActivePokemon.LiveStats.HP + "/" + ActivePokemon.Stats.HP; if (ActivePokemon.Gender != Gender.None) { IconGender.SetActive(true); IconGender.GetComponentInChildren <Image>().sprite = SpriteSheetLoader.LoadSheet("GenderSheet/" + ActivePokemon.Gender.ToString().ToLower()); } }
public void SetUI(BasePokemon Pokemon) { Name.text = Pokemon.Name; Level.text = "Lv." + Pokemon.Level; HP.text = Pokemon.LiveStats.HP + "/" + Pokemon.Stats.HP; Slider.GetComponent <Slider>().maxValue = Pokemon.Stats.HP; Slider.GetComponent <Slider>().value = Pokemon.LiveStats.HP; if (Pokemon.Gender != Gender.None) { IconGender.SetActive(true); IconGender.GetComponentInChildren <Image>().sprite = SpriteSheetLoader.LoadSheet("GenderSheet/" + Pokemon.Gender.ToString().ToLower()); } BattleGround.SetActive(true); BattleGround.name = Pokemon.Name; BattleGround.GetComponent <Image>().sprite = SpriteSheetLoader.GetSprite(Pokemon.Monster, Pokemon.isShiny); }