Пример #1
0
        public static bool CanStartAttack(PetBase meuCriatureBase)
        {
            PetAtributes     A   = meuCriatureBase.PetFeat.meusAtributos;
            PetAttackManager ggg = meuCriatureBase.GerenteDeGolpes;
            PetAttackBase    gg  = ggg.meusGolpes[ggg.golpeEscolhido];

            if (
                //gg.UltimoUso + gg.TempoDeReuso < Time.time
                meuCriatureBase.StManager.VerifyStaminaAction() &&
                A.PE.Corrente >= gg.CustoPE)
            {
                A.PE.Corrente -= gg.CustoPE;
                //gg.UltimoUso = Time.time;
                meuCriatureBase.StManager.ConsumeStamina((uint)gg.CustoDeStamina);

                //AplicadorDeGolpe aplG = gameObject.AddComponent<AplicadorDeGolpe>();

                //aplG.esseGolpe = gg;

                //GameController.g.HudM.AtualizaDadosDaHudVida(false);

                //if (GameController.g.estaEmLuta)
                //    GameController.g.HudM.AtualizaDadosDaHudVida(true);

                // if(!GameController.g.estaEmLuta)
                //   //GameController.g.HudM.AtualizaHudHeroi(meuCriatureBase);

                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #2
0
        public PetBase(PetName X, int nivel = 1)
        {
            PetBase Y = PetFactory.GetPet(X);

            petFeat             = Y.petFeat;
            atkManager          = Y.GerenteDeGolpes;
            movFeat             = Y.MovFeat;
            alturaCamera        = Y.alturaCamera;
            distanciaCamera     = Y.distanciaCamera;
            alturaCameraLuta    = Y.alturaCameraLuta;
            distanciaCameraLuta = Y.distanciaCameraLuta;
            petId = X;

            if (nivel > 1)
            {
                PetFeat.IncrementaNivel(nivel);
            }


            atkManager.meusGolpes = new List <PetAttackBase>();
            atkManager.meusGolpes.AddRange(GolpesAtivos(nivel, atkManager.listaDeGolpes.ToArray()));


            VerificaSomaDeTaxas();

            if (StManager == null)
            {
                stManager = new StaminaManager();
            }
        }
Пример #3
0
        public static PetAttackDb RetornaGolpePersonagem(GameObject G, AttackNameId nomeDoGolpe)
        {
            PetBase          criatureBase = G.GetComponent <PetManager>().MeuCriatureBase;
            PetAttackManager gg           = criatureBase.GerenteDeGolpes;
            PetAttackDb      gP           = gg.ProcuraGolpeNaLista(criatureBase.NomeID, nomeDoGolpe);

            return(gP);
        }
Пример #4
0
        public static colisor GetCollider(GameObject G, AttackNameId nomeColisor)
        {
            PetBase          criatureBase = G.GetComponent <PetManager>().MeuCriatureBase;
            PetAttackManager gg           = criatureBase.GerenteDeGolpes;
            PetAttackDb      gP           = gg.ProcuraGolpeNaLista(criatureBase.NomeID, nomeColisor);

            return(gP.Colisor);
            /*GolpePersonagem.RetornaGolpePersonagem(G, nomeColisor).Colisor;*/
        }