コード例 #1
0
ファイル: GameScreen.cs プロジェクト: hunter497/MonoGame
        public override void Draw()
        {
            Statics.SPRITEBATCH.Begin(sortMode: SpriteSortMode.Deferred, blendState: BlendState.AlphaBlend, samplerState: SamplerState.LinearWrap);

            Statics.SPRITEBATCH.Draw(background, Vector2.Zero, Color.White);


            foreach (var tube in tubes)
            {
                tube.Draw();
            }

            Statics.SPRITEBATCH.Draw(sand, new Vector2(0, 529), Color.White);

            scroll.Draw();

            player.Draw();

            Statics.SPRITEBATCH.DrawString(font, "Score: " + score.ToString(), new Vector2(10, 10), Color.Red);

            if (player.dead)
            {
                Statics.SPRITEBATCH.Draw(Statics.PIXEL, new Rectangle(0, 0, Statics.GAME_WIDTH, Statics.GAME_HEIGHT), new Color(1f, 0f, 0f, 0.3f));
                Statics.SPRITEBATCH.Draw(gameOver, new Vector2(0, 80), Color.White);
            }

            Statics.SPRITEBATCH.End();
            base.Draw();
        }
コード例 #2
0
        public override void Draw()
        {
            Statics.SPRITEBATCH.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearWrap, null, null);

            Statics.SPRITEBATCH.Draw(this.background, Vector2.Zero, Color.White);
            foreach (var item in Tuyaux)
            {
                item.Draw();
            }

            Statics.SPRITEBATCH.Draw(this.sand, new Vector2(0, 529), Color.White);

            Scroll.Draw();


            Bird.Draw();

            Statics.SPRITEBATCH.DrawString(this.Font, "Score : " + this.score.ToString(), new Vector2(10, 10), Color.Red);

            if (Bird.dead)
            {
                Statics.SPRITEBATCH.Draw(Statics.PIXEL, new Rectangle(0, 0, Statics.GAME_WIDTH, Statics.GAME_HEIGHT), new Color(1f, 0f, 0f, 0.3f));
                Statics.SPRITEBATCH.Draw(this.gameover, new Vector2(0, 80), Color.White);
            }


            Statics.SPRITEBATCH.End();
            base.Draw();
        }
コード例 #3
0
ファイル: GameScreen.cs プロジェクト: lolnik1/projektowanie
        public override void Draw()
        {
            Statics.SPRITEBATCH.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearWrap, null, null);

            Statics.SPRITEBATCH.Draw(this.background, Vector2.Zero, Color.White);
            Scroll.Draw();
            Bird.Draw();
            Statics.SPRITEBATCH.DrawString(Font, "Wynik :" + this.wynik.ToString(), new Vector2(10, 10), Color.White);
            //Statics.SPRITEBATCH.DrawString(Font, "Score", new Vector2(100, 100), Color.Black);
            foreach (var item in Pipe)
            {
                item.Draw();
            }
            Statics.SPRITEBATCH.End();
            base.Draw();
        }