コード例 #1
0
        // DRAW

        public void Draw(Window window)
        {
            if (this.state)
            {
                GfxTools.DrawSprite(window, this.position, this.spriteA);
            }
            else
            {
                GfxTools.DrawSprite(window, this.position, this.spriteB);
            }
        }
コード例 #2
0
        // DRAW

        private void DrawAllBullets(Window window)
        {
            for (int i = 0; i < this.bullets.Length; i++)
            {
                if (this.bullets[i].IsFired)
                {
                    this.bullets[i].Draw(window);
                }
                if (this.bullets[i].IsExploded)
                {
                    Vector2 explosionPosition = new Vector2(bullets[i].Position.X - bullets[i].ExplosionWidth / 2, bullets[i].Position.Y - bullets[i].ExplosionHeight);
                    GfxTools.DrawSprite(window, explosionPosition, this.bullets[i].ExplosionSprite);
                }
            }
        }
コード例 #3
0
        // DRAW

        private void DrawScore(Window window)
        {
            Vector2 position = this.position;

            for (int i = 0; i < sprites.Length; i++)
            {
                if (sprites[i] == null)
                {
                    return;
                }
                else
                {
                    GfxTools.DrawSprite(window, position, sprites[i]);
                    position.X += sprites[i].width + 2;
                }
            }
        }
コード例 #4
0
 public void Draw()
 {
     GfxTools.DrawSprite(sprite, (int)position.X, (int)position.Y);
 }
コード例 #5
0
        // DRAW

        public void Draw(Window window)
        {
            GfxTools.DrawSprite(window, this.position, this.sprite);
        }