コード例 #1
0
        public void SetarCriature(PetBase C, System.Action <int> ao, bool armagedom = false)
        {
            this.armagedom = armagedom;
            ThisAction    += ao;

            PetAtributes A = C.PetFeat.meusAtributos;

            imgDoCriature.sprite = ResourcesFolders.GetMiniPet(C.NomeID);
            //GameController.g.El.RetornaMini(C.NomeID);
            nomeCriature.text     = C.GetNomeEmLinguas;
            txtNivelNum.text      = C.PetFeat.mNivel.Nivel.ToString();
            txtPVnum.text         = A.PV.Corrente + " / " + A.PV.Maximo;
            txtPEnum.text         = A.PE.Corrente + " / " + A.PE.Maximo;
            txtListaDeStatus.text = "";

            if (A.PV.Corrente <= 0)
            {
                Text[] txtS = GetComponentsInChildren <Text>();

                for (int i = 1; i < txtS.Length - 2; i++)
                {
                    txtS[i].color = Color.gray;
                }

                txtS[0].color = new Color(1, 1, 0.75f);

                txtListaDeStatus.text = "derrotado";
            }
            else
            {
                txtListaDeStatus.text = "preparado";
            }
        }
コード例 #2
0
        private void OnChangeSelectedPet(MsgChangeSelectedPet obj)
        {
            criatureImg.transform.parent.gameObject.SetActive(true);
            criatureImg.sprite = ResourcesFolders.GetMiniPet(obj.petname);

            //= Resources.Load<Sprite>("miniCriatures/" + obj.petname.ToString());
            ActiveInfoText(PetBase.NomeEmLinguas(obj.petname));
        }
コード例 #3
0
        public void InserirDadosNoPainelPrincipal(PetBase C)
        {
            PetAtributes A = C.PetFeat.meusAtributos;
            IGerenciadorDeExperiencia g_XP = C.PetFeat.mNivel;

            imgDoPersonagem.sprite = Resources.Load <Sprite>("miniCriatures/" + C.NomeID);
            txtNomeC.text          = C.GetNomeEmLinguas;
            numNivel.text          = g_XP.Nivel.ToString();
            numPV.text             = A.PV.Corrente + "\t/\t" + A.PV.Maximo;
            numPE.text             = A.PE.Corrente + "\t/\t" + A.PE.Maximo;
            numXp.text             = g_XP.XP + "\t/\t" + g_XP.ParaProxNivel;
            numAtk.text            = A.Ataque.Corrente.ToString();
            numDef.text            = A.Defesa.Corrente.ToString();
            numPod.text            = A.Poder.Corrente.ToString();
            string paraTipos = "";

            for (int i = 0; i < C.PetFeat.meusTipos.Length; i++)
            {
                paraTipos += PetWeaknessAndResistence.NomeEmLinguas(C.PetFeat.meusTipos[i]) + ", ";
            }

            if (C.StatusTemporarios.Count > 0)
            {
                string sTemp = "";
                foreach (var v in C.StatusTemporarios)
                {
                    sTemp += v.GetNomeEmLinguas + ", ";
                }

                txtStatus.text = sTemp.Substring(0, sTemp.Length - 2);
                txtStatus.transform.parent.gameObject.SetActive(true);
            }
            else
            {
                txtStatus.transform.parent.gameObject.SetActive(false);
            }

            txtMeusTipos.text = paraTipos.Substring(0, paraTipos.Length - 2);
        }