Example #1
0
        public void UpdateDeltStatus(bool isPlayer, statusType status)
        {
            Sprite statusImage = GetStatusImage(status);

            DeltInfoUI deltInfo = isPlayer ? PlayerDeltInfo : OpponentDeltInfo;

            deltInfo.Status.sprite = statusImage;

            // REFACTOR_TODO: Remove this
            PlayerBattleState player = isPlayer ? State.PlayerState : State.OpponentState;

            player.DeltInBattle.statusImage = statusImage;
        }
Example #2
0
        public void PopulateBattlingDeltInfo(bool isPlayer, DeltemonClass switchIn)
        {
            DeltInfoUI deltInfo = isPlayer ? PlayerDeltInfo : OpponentDeltInfo;

            deltInfo.NameText.text      = (switchIn.nickname + "   lvl. " + switchIn.level);
            deltInfo.HealthBar.maxValue = switchIn.GPA;
            deltInfo.HealthBar.value    = switchIn.health;
            deltInfo.Status.sprite      = switchIn.statusImage; // REFACTOR_TODO: This should not be stored in DeltemonClass

            if (GameManager.Inst.pork)
            {
                deltInfo.Image.sprite = isPlayer ? porkBack : porkSprite;
            }
            else
            {
                deltInfo.Image.sprite = isPlayer ? switchIn.deltdex.backImage : switchIn.deltdex.frontImage;
            }

            // Set player/opp specific info
            if (isPlayer)
            {
                if (GameManager.Inst.pork)
                {
                    deltInfo.HealthText.text = GameManager.Inst.pork ? ((int)switchIn.health + "/PORK") : ((int)switchIn.health + "/" + (int)switchIn.GPA);
                }
                deltInfo.ExperienceBar.maxValue = switchIn.XPToLevel;
                deltInfo.ExperienceBar.value    = switchIn.experience;
            }
            else
            {
                SetIsCaughtIcon();
            }

            deltInfo.HealthBarImage.color = GetHealthBarColor(switchIn.health / switchIn.GPA);

            if (isPlayer)
            {
                PopulateMoveset(switchIn);
            }
        }
Example #3
0
        public void SetDeltImageActive(bool isPlayer)
        {
            DeltInfoUI deltInfo = isPlayer ? PlayerDeltInfo : OpponentDeltInfo;

            deltInfo.Image.gameObject.SetActiveIfChanged(true);
        }