Example #1
0
        private void PnlGame_Paint(object sender, PaintEventArgs e)
        {
            //get the graphics used to paint on the panel control
            g = e.Graphics;

            //Calls to each objects respective draw methods
            bat1.DrawEnemy(g);
            player.DrawPlayer(g);
            tree.DrawTree(g);
            crate.DrawCrate(g);
            bush.DrawBush(g);

            foreach (Bullet b in bullets)
            {
                b.DrawBullet(g);
            }
        }