Ejemplo n.º 1
0
        public override void OnStart()
        {
            menu    = true;
            submenu = turno = finish = false;

            foreach (Playable x in x1.ToList())
            {
                F.BloquearMov(x, true);
                Interacoes.Andar(x, 2, 200);
            }

            foreach (Playable x in x2.ToList())
            {
                F.BloquearMov(x, true);
                Interacoes.Andar(x, 3, 200);
            }
        }
Ejemplo n.º 2
0
        public static void TelaPrincipal()
        {
            V.window.SetView(V.view);
            foreach (Playable x in x1.ToList())
            {
                F.DesenharShape(x.x - 50 + (x.imgWidth / 2), x.y - x.imgHeight + x.height - 50, 100, 10, 19, 19, 19, 230);
                F.DesenharShape(x.x - 50 + (x.imgWidth / 2), x.y - x.imgHeight + x.height - 50, (100 / x.vida_) * x.vidaA, 10, 000, 255, 000, 230);

                F.DesenharShape(x.x - 50 + (x.imgWidth / 2), x.y - x.imgHeight + x.height - 65, 100, 10, 19, 19, 19, 230);
                F.DesenharShape(x.x - 50 + (x.imgWidth / 2), x.y - x.imgHeight + x.height - 65, (100 / x.energia_) * x.energiaA, 10, 255, 255, 000, 230);
            }

            foreach (Playable x in x2.ToList())
            {
                F.DesenharShape(x.x - 50 + (x.imgWidth / 2), x.y - x.imgHeight + x.height - 30, 100, 15, 19, 19, 19, 230);
                F.DesenharShape(x.x - 50 + (x.imgWidth / 2), x.y - x.imgHeight + x.height - 30, (100 / x.vida_) * x.vidaA, 15, 000, 255, 000, 230);
            }


            V.window.SetView(V.hud);

            F.DesenharShape(10, Screen.height - 200, Screen.width - 20, 190, 210, 210, 210, 230);
            F.DesenharShape(230, Screen.height - 190, Screen.width - 250, 170, 19, 19, 19, 255);

            HeroiAtacar();
            InimigoAtacar();

            int qtdX1 = 0, qtdX2 = 0;

            foreach (Playable x in x1.ToList())
            {
                if (x.vidaA <= 0)
                {
                    qtdX1++;
                }
            }

            foreach (Playable x in x2.ToList())
            {
                if (x.vidaA <= 0)
                {
                    x.OnDie();
                    x2.Remove(x);
                    qtdX2++;
                }
            }

            if (qtdX1 >= x1.Count() && !finish)
            {
                finish = true;
            }

            if (qtdX2 >= x2.Count() && !finish)
            {
                finish = true;
                foreach (Playable x in x1.ToList())
                {
                    Interacoes.Andar(x, 3, 200);
                }
            }
        }