コード例 #1
0
        public MokeponOverview(Mokepon pokemon, Vector2 pos) : base(null, null)
        {
            Position     = pos;
            Scale        = Vector2.One;
            Width        = 400;
            Height       = 200;
            this.pokemon = pokemon;

            Background   = new Image("White", new Rectangle((int)pos.X, (int)pos.Y, Width, Height), 0.8f);
            pokemonImage = new Image("Mokepons/" + pokemon.DefaultName);

            pokemonName  = new Text(pokemon.Name, Color.Black, pos + new Vector2(150, 14), Vector2.One, "Expression-pro-18px");
            pokemonLevel = new Text("Lvl " + pokemon.LVL.ToString(), Color.Black, pos + new Vector2(310, 15), Vector2.One, "Expression-pro-18px");
            hpbar        = new HPBar(ref pokemon, 6, 150, pos + new Vector2(150, 55));
            hpStatus     = new Text("", Color.Black, pos + new Vector2(310, 55), Vector2.One, "Expression-pro-18px");
            expbar       = new ExpBar(ref pokemon, 4, 120, pos + new Vector2(150, 60));

            pokemonStats = new Text[6];

            pokemonStats[0] = new Text("ATK: " + pokemon.ATK, Color.Black,
                                       pos + new Vector2(150, 100), Vector2.One, "Expression-pro-18px");
            pokemonStats[1] = new Text("DEF: " + pokemon.DEF, Color.Black,
                                       pos + new Vector2(275, 100), Vector2.One, "Expression-pro-18px");
            pokemonStats[2] = new Text("SP ATK: " + pokemon.SP_ATK, Color.Black,
                                       pos + new Vector2(150, 125), Vector2.One, "Expression-pro-18px");
            pokemonStats[3] = new Text("SP DEF: " + pokemon.SP_DEF, Color.Black,
                                       pos + new Vector2(275, 125), Vector2.One, "Expression-pro-18px");
            pokemonStats[4] = new Text("SPD: " + pokemon.SPD, Color.Black,
                                       pos + new Vector2(150, 150), Vector2.One, "Expression-pro-18px");
            pokemonStats[5] = new Text("ACC: " + pokemon.ACC, Color.Black,
                                       pos + new Vector2(275, 150), Vector2.One, "Expression-pro-18px");
        }
コード例 #2
0
        public MokeponBattleStats(ref Mokepon pokemon, Vector2 pos, bool mine = false)
        {
            Position = pos;
            Scale    = Vector2.One;

            this.mine    = mine;
            this.pokemon = pokemon;

            background   = new Image(mine ? "MyMokeponStatus" : "MokeponStatus", pos, Vector2.One);
            pokemonName  = new Text(pokemon.Name, Color.Black, pos + new Vector2(10, 10), Vector2.One, "Expression-pro-24px");
            pokemonLevel = new Text("Lvl " + pokemon.LVL.ToString(), Color.Black, pos + new Vector2(200, 10), Vector2.One, "Expression-pro-18px");
            pokemonName.MoveVector(mine ? new Vector2(18, 0) : new Vector2(0, 0));
            pokemonLevel.MoveVector(mine ? new Vector2(18, 0) : new Vector2(0, 0));
            hpbar = new HPBar(ref pokemon, 6, 150, pos + new Vector2(10, 55));
            hpbar.MoveVector(mine ? new Vector2(18, 0) : new Vector2(0, 0));

            if (mine)
            {
                hpStatus = new Text("", Color.Black, pos + new Vector2(190, 55), Vector2.One, "Expression-pro-18px");
                expbar   = new ExpBar(ref pokemon, 4, 120, pos + new Vector2(28, 60));
            }
        }