Пример #1
0
        public virtual void carregarGame()
        {
            heroiImg = new Bitmap(@"heroi.png");
            heroi    = new ObjHeroi(2, 17, heroiImg);

            fundo = new Bitmap(@"vulcao.png");

            Queue <String> msgs = new Queue <string>();

            msgs.Enqueue("Shingetsu Chan, olá!");
            msgs.Enqueue("Minna Chan está ali naquela ilha, consegue ver?");
            msgs.Enqueue("Você deve estar imaginando como eu coloquei ela lá, certo?");
            msgs.Enqueue("Eu usei um bloco de peso P = 1000N e uma roldana...");
            msgs.Enqueue("Ah, não liga? Ok... Vejo que não está pra conversa...");
            msgs.Enqueue("Vai tentar me derrotar?");
            msgs.Enqueue("Lá vamos nós!");

            minnaImg = new Bitmap(@"minna.png");
            minna    = new ObjNpc(17, 2, minnaImg, msgs, true);
            game.setOcupado(minna.X, minna.Y);

            glauxiaImg = new Bitmap(@"glauxia.png");
            glauxia    = new ObjNpc(13, 8, glauxiaImg, msgs, true);
            game.setOcupado(glauxia.X, glauxia.Y);
        }
Пример #2
0
        public virtual void carregarGame()
        {
            //texto
            //vc se chama shingetsu kun, um samurai muito respeitado
            //sua vida inteira vc usou a força sobre tudo, até agora.
            //vc chega na vila e ta tudo difrerente, vazia, e vc encontra o Senpaio, o mestre em matematica

            heroiImg = new Bitmap(@"heroi.png");
            heroi    = new ObjHeroi(24, 13, heroiImg);

            ovelhaImg = new Bitmap(@"barreira3.png");

            ovelha1 = new ObjEstatico(15, 6, ovelhaImg);
            game.setOcupado(ovelha1.X, ovelha1.Y);
            ovelha2 = new ObjEstatico(9, 15, ovelhaImg);
            game.setOcupado(ovelha2.X, ovelha2.Y);
            ovelha3 = new ObjEstatico(2, 5, ovelhaImg);
            game.setOcupado(ovelha3.X, ovelha3.Y);

            fundo = new Bitmap(@"sand_desert.png");

            Queue <String> msgs = new Queue <string>();

            msgs.Enqueue("HMMMMM... bem vindo viajante, meu nome é Mohammed!");
            msgs.Enqueue("O que deseja? Podes encontrar de tudo aqui na minha loja de conveniência.");
            msgs.Enqueue("Vingança contra Glau Xia? Certo...");
            msgs.Enqueue("Os rastros de seu terrível clã levam até o topo do vulcão.");
            msgs.Enqueue("Eu posso te dar uma carona até lá em cima, mas...");
            msgs.Enqueue("... você precisa batalhar comigo, antes.");
            msgs.Enqueue("... fico tão sozinho aqui com minhas ovelhas...");
            msgs.Enqueue("Vamos batalhar!");
            npcImg = new Bitmap(@"muslim.png");
            npc    = new ObjNpc(3, 10, npcImg, msgs, true);
            game.setOcupado(npc.X, npc.Y);
        }
Пример #3
0
        public virtual void carregarGame()
        {
            heroiImg = new Bitmap(@"heroi.png");
            heroi    = new ObjHeroi(2, 19, heroiImg);

            fundo = new Bitmap(@"dark_forest.png");

            Queue <String> msgs = new Queue <string>();

            msgs.Enqueue("AAAAAAH.");
            msgs.Enqueue("Não me machuque novamente, eu imploro.");
            msgs.Enqueue("Vocês do clan de Glau Xia são muito do mal.");
            msgs.Enqueue("Destruiram minha casa, me bateram, cortaram minhas árvores.");
            msgs.Enqueue("Não se faça de desentendido, você sabe sim do que estou falando.");
            msgs.Enqueue("Quer saber?");
            msgs.Enqueue("Dessa vez vou te destruir com o poder da SUBTRAÇÃO.");

            Queue <String> msgsD = new Queue <string>();

            msgsD.Enqueue("Eles vieram aqui... acabaram com tudo.");


            aldeaoImg = new Bitmap(@"aldeao_abatido.png");
            aldeao    = new ObjNpc(16, 10, aldeaoImg, msgs, true);
            game.setOcupado(aldeao.X, aldeao.Y);

            aldeaoDImg = new Bitmap(@"aldea_abatida.png");
            aldeaoD    = new ObjNpc(4, 4, aldeaoDImg, msgsD, false);
            game.setOcupado(aldeaoD.X, aldeaoD.Y);
        }
        public override void carregarGame()
        {
            base.carregarGame();

            Queue <String> msgs = new Queue <string>();

            msgs.Enqueue("Retirei a madeira para você.");
            msgs.Enqueue("Siga com cuiadado.");
            mestreImg = new Bitmap(@"npc.png");
            mestre    = new ObjNpc(16, 3, mestreImg, msgs, false);
            game.setOcupado(mestre.X, mestre.Y);

            heroi = new ObjHeroi(6, 5, heroiImg);
        }
        public override void carregarGame()
        {
            base.carregarGame();

            heroi = new ObjHeroi(3, 11, heroiImg);

            Queue <String> msgs = new Queue <string>();

            msgs.Enqueue("Isso, agora pegue carona na minha nuvem mágica.");
            msgs.Enqueue("Acabe com Glau Xia!");
            npcImg = new Bitmap(@"muslim.png");
            npc    = new ObjNpc(3, 10, npcImg, msgs, false);
            game.setOcupado(npc.X, npc.Y);
        }
        public override void carregarGame()
        {
            base.carregarGame();

            heroi = new ObjHeroi(14, 9, heroiImg);

            Queue <String> msgs = new Queue <string>();

            msgs.Enqueue("Obrigado, Shingetsu!");
            msgs.Enqueue("Vamos voltar à vila e repovoá-la.");
            msgs.Enqueue(";)");

            minnaImg = new Bitmap(@"minna.png");
            minna    = new ObjNpc(13, 8, minnaImg, msgs, true, true);
            game.setOcupado(minna.X, minna.Y);

            glauxiaImg = new Bitmap(@"glauxia.png");
            glauxia    = new ObjNpc(17, 2, glauxiaImg, msgs, false);
            game.setOcupado(glauxia.X, glauxia.Y);
        }
        public override void carregarGame()
        {
            base.carregarGame();

            heroi = new ObjHeroi(15, 12, heroiImg);

            Queue <String> msgs = new Queue <string>();

            msgs.Enqueue("Sinto muito, pensei que você era do clã de Glau Xia.");
            msgs.Enqueue("Pedi para minha amiga retirar o crocodilo para você.");
            msgs.Enqueue("Siga sua jornada pelo deserto.");
            aldeaoImg = new Bitmap(@"aldeao_abatido.png");
            aldeao    = new ObjNpc(15, 3, aldeaoImg, msgs, false);
            game.setOcupado(aldeao.X, aldeao.Y);

            msgs = new Queue <string>();
            msgs.Enqueue("Esse crocodilo é o bixão kkkj.");
            aldeaoDImg = new Bitmap(@"aldea_abatida.png");
            aldeaoD    = new ObjNpc(11, 2, aldeaoDImg, msgs, false);
            game.setOcupado(aldeaoD.X, aldeaoD.Y);
        }
Пример #8
0
        public virtual void carregarGame()
        {
            //texto
            //vc se chama shingetsu kun, um samurai muito respeitado
            //sua vida inteira vc usou a força sobre tudo, até agora.
            //vc chega na vila e ta tudo difrerente, vazia, e vc encontra o Senpaio, o mestre em matematica

            heroiImg = new Bitmap(@"heroi.png");
            heroi    = new ObjHeroi(2, 17, heroiImg);

            fundo = new Bitmap(@"vila.png");

            Queue <String> msgs = new Queue <string>();

            msgs.Enqueue("Oh, nobre guerreiro samurai Shingetsu Kun.");
            msgs.Enqueue("O clan de Glau Xia veio aqui e destruiu tudo nosso.");
            msgs.Enqueue("Logo antes de sua chegada, eles queimaram toda a vila...");
            msgs.Enqueue("e... roubaram a sua namorada, a Minna Chan.");
            msgs.Enqueue("Só há um meio de derrotar Glau Xia, ela adora física.");
            msgs.Enqueue("Portanto precisamos combatê - la com matemática.");
            msgs.Enqueue("Você quer vingança? Entendo...");
            msgs.Enqueue("Mas para recuperar sua namorada, não será necessária a força de um samurai.");
            msgs.Enqueue("Mas a sabedoria de um matemático.");
            msgs.Enqueue("...");
            msgs.Enqueue("Entre no dojo, vamos conseguir sua vingança.");
            mestreImg = new Bitmap(@"npc.png");
            mestre    = new ObjNpc(5, 5, mestreImg, msgs, true);
            game.setOcupado(mestre.X, mestre.Y);

            Queue <String> msgsEasterEgg = new Queue <string>();

            msgsEasterEgg.Enqueue("É perigoso ir sozinho, eu até te daria uma espada...");
            msgsEasterEgg.Enqueue("... Mas é um jogo infantil.");
            easterEggImg = new Bitmap(@"heroi.png");
            easterEgg    = new ObjNpc(18, 13, easterEggImg, msgsEasterEgg, false);
        }
Пример #9
0
        public void texto(object sender, PaintEventArgs e, ObjNpc obj)
        {
            string text = obj.Msg;

            FontFamily fontFamily = new FontFamily("arial");

            try
            {
                fontFamily = new FontFamily("Gill Sans MT");
            }
            catch (Exception erro)
            {
                //TODO
            }


            using (Font font1 = new Font(fontFamily, 12, FontStyle.Bold, GraphicsUnit.Point))
            {
                SizeF a          = e.Graphics.MeasureString(text, font1);
                Size  sizeString = a.ToSize();

                int largura = sizeString.Width + 2;
                int altura  = sizeString.Height + 2;//margem de erro
                int xTxt    = (obj.X * Game.Tam) - largura + Game.Tam;
                int yTxt    = (obj.Y * Game.Tam) - Game.Tam;

                /*int larguraTotal = Game.Tam * Game.Largura / 2;
                 *
                 * if (largura > larguraTotal)
                 * {
                 *  largura = larguraTotal;
                 *  xTxt += largura;
                 *
                 *  String[] linhas = text.Split(' ');
                 *  int qtd_linhas = linhas.Length;
                 *  altura += sizeString.Height * qtd_linhas;
                 *  yTxt -= altura;
                 * }*/

                if (xTxt < 0)
                {
                    xTxt = 0;
                }

                if (xTxt > Game.Tam * Game.Largura)
                {
                    xTxt = Game.Tam * Game.Largura - largura;
                }

                /*if (yTxt < 0)
                 * {
                 *  yTxt = 0;
                 * }
                 *
                 * if (yTxt > Game.Tam * Game.Altura)
                 * {
                 *  yTxt = Game.Tam * Game.Altura;
                 * }*/

                Rectangle  rectF1 = new Rectangle(xTxt, yTxt, largura, altura);
                SolidBrush branco = new SolidBrush(Color.White);
                e.Graphics.FillRectangle(branco, rectF1);
                e.Graphics.DrawString(text, font1, Brushes.Black, rectF1);
                e.Graphics.DrawRectangle(Pens.Black, Rectangle.Round(rectF1));
            }
        }