コード例 #1
0
        private void Form2_Paint(object sender, PaintEventArgs e)
        {
            /////////////////////// NEW VERSION////

            // draw pipe
            if (pipe.pipe_Above1_Appearance)
            {
                pipe.Draw_Pipe_Above_1(e.Graphics);
            }
            if (pipe.pipe_Bottom1_Appearance)
            {
                pipe.Draw_Pipe_Bottom_1(e.Graphics);
            }
            if (pipe.pipe_Above2_Appearance)
            {
                pipe.Draw_Pipe_Above_2(e.Graphics);
            }
            if (pipe.pipe_Bottom2_Appearance)
            {
                pipe.Draw_Pipe_Bottom_2(e.Graphics);
            }

            // draw rocket
            if (rocket.rocket_Apearance)
            {
                rocket.Draw_Rocket(e.Graphics);
            }

            // draw bird
            if (bird.bird_Appearance)
            {
                bird.Draw(e.Graphics);
            }

            // life_span
            if (lifeSpan.life_Span1_Appearance)
            {
                lifeSpan.Draw_Heart_1(e.Graphics);
            }

            if (lifeSpan.life_Span2_Appearance)
            {
                lifeSpan.Draw_Heart_2(e.Graphics);
            }

            if (lifeSpan.life_Span3_Appearance)
            {
                lifeSpan.Draw_Heart_3(e.Graphics);
            }

            // draw shield
            if (lifeSpan.shield_Apearance)
            {
                lifeSpan.Draw_Shield(e.Graphics);
            }
        }
コード例 #2
0
ファイル: Form2.cs プロジェクト: LucasTran-tq/Flappy_paint
        private void Form2_Paint_1(object sender, PaintEventArgs e)
        {
            //gameLoop.Draw(e.Graphics);
            //gameLoop.Draw(e.Graphics);

            // draw pipe
            if (pipe.pipe_Above1_Appearance)
            {
                pipe.Draw_Pipe_Above_1(e.Graphics);
            }
            if (pipe.pipe_Bottom1_Appearance)
            {
                pipe.Draw_Pipe_Bottom_1(e.Graphics);
            }
            if (pipe.pipe_Above2_Appearance)
            {
                pipe.Draw_Pipe_Above_2(e.Graphics);
            }
            if (pipe.pipe_Bottom2_Appearance)
            {
                pipe.Draw_Pipe_Bottom_2(e.Graphics);
            }

            // draw rocket
            if (rocket.rocket_Apearance)
            {
                rocket.Draw_Rocket(e.Graphics);
            }

            // draw fire
            if (rocket.fire_Appearance)
            {
                rocket.Draw_Fire(e.Graphics);
            }

            // draw bird
            if (bird.bird_Appearance)
            {
                bird.Draw(e.Graphics);
            }

            // draw coins
            if (coins.coins_Appearance)
            {
                coins.Draw(e.Graphics);
            }

            // draw gift
            if (gift.gift_Flash_Appearance)
            {
                gift.Draw_Gift_Flash(e.Graphics);
            }

            // draw thunder
            if (gift.Thunder_Appearance)
            {
                gift.Draw_Thunder(e.Graphics);
            }

            // draw heart
            if (heart.heart_Appearance)
            {
                heart.Draw(e.Graphics);
            }



            // draw emergency
            if (rocket.emergency_Appearance)
            {
                rocket.Draw_Emergency(e.Graphics);
            }

            // life_span
            if (lifeSpan.life_Span1_Appearance)
            {
                lifeSpan.Draw_Heart_1(e.Graphics);
            }

            if (lifeSpan.life_Span2_Appearance)
            {
                lifeSpan.Draw_Heart_2(e.Graphics);
            }

            if (lifeSpan.life_Span3_Appearance)
            {
                lifeSpan.Draw_Heart_3(e.Graphics);
            }

            // draw shield
            if (lifeSpan.shield_Apearance)
            {
                lifeSpan.Draw_Shield(e.Graphics);
            }
        }