コード例 #1
0
        public void draw(SpriteBatch sprite_batch)
        {
            sprite_batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null);
            Black_Fill.draw(sprite_batch);
            Burst.draw(sprite_batch);
            sprite_batch.End();

            Rectangle scissor_rect = new Rectangle(Banner_Scissor_Rect.X +
                                                   (int)Stereoscopic_Graphic_Object.graphic_draw_offset(Config.RANKING_BANNER_DEPTH).X,
                                                   Banner_Scissor_Rect.Y, Banner_Scissor_Rect.Width, Banner_Scissor_Rect.Height);

            sprite_batch.GraphicsDevice.ScissorRectangle = Scene_Map.fix_rect_to_screen(scissor_rect);
            sprite_batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp,
                               null, new RasterizerState {
                ScissorTestEnable = true
            });
            Banner.draw(sprite_batch);
            sprite_batch.End();

            sprite_batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null);
            Window_Img.draw(sprite_batch);
            if (Window_Img.visible)
            {
                foreach (TextSprite text in Text)
                {
                    text.draw(sprite_batch, -Window_Img.loc);
                }
            }
            Rank.draw(sprite_batch);
            White_Screen.draw(sprite_batch);
            sprite_batch.End();
        }
コード例 #2
0
 public virtual void draw(SpriteBatch sprite_batch, Vector2 draw_offset)
 {
     Name.draw(sprite_batch, draw_offset - ((this.loc + draw_vector()) + new Vector2(16, 0) - offset));
     if (Icon != null)
     {
         Icon.draw(sprite_batch, draw_offset - ((this.loc + draw_vector()) - offset));
     }
 }
コード例 #3
0
        public override void draw(SpriteBatch sprite_batch, Vector2 draw_offset = default(Vector2))
        {
            Vector2 loc = this.loc + draw_vector();

            sprite_batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, Scissor_State);
            Class.draw(sprite_batch, draw_offset - loc);
            Lvl.draw(sprite_batch, draw_offset - loc);
            Exp.draw(sprite_batch, draw_offset - loc);
            Hp.draw(sprite_batch, draw_offset - loc);
            Slash.draw(sprite_batch, draw_offset - loc);
            MaxHp.draw(sprite_batch, draw_offset - loc);
            Affinity_Icon.draw(sprite_batch, draw_offset - loc);
            foreach (Status_Icon_Sprite icon in Status_Icons)
            {
                icon.draw(sprite_batch, draw_offset - loc);
            }
            sprite_batch.End();
        }
コード例 #4
0
        protected override void draw_units(SpriteBatch spriteBatch)
        {
            Vector2 offset = this.loc + draw_vector() - Offset;

            base.draw_units(spriteBatch);

            spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend);

            // Get the range of indices that are completely visible
            int        count   = (ROWS - (Offset.Y == Scroll * this.RowSize ? 0 : 1)) * COLUMNS;
            int        start   = (Scroll + (Offset.Y <= Scroll * this.RowSize ? 0 : 1)) * COLUMNS;
            List <int> indices = Enumerable.Range(start, count).ToList();

            foreach (int index in indices.Intersect(TalkIndices))
            {
                int ox = (index % COLUMNS) * unit_spacing();
                int oy = (index / COLUMNS) * ROW_SIZE;
                TalkIcon.draw(spriteBatch, -(offset + new Vector2(ox, oy)));
            }
            spriteBatch.End();
        }