예제 #1
0
        void CreateGoldBricks()
        {
            int v;
            int f;
            int g;
            int h;


            v = TT.Next(0, 20);
            g = FF.Next(0, 10);

            for (int i = 0; i < v; i++)
            {
                CActor pnn  = new CActor();
                int    var2 = XX.Next(0, (this.Width));
                pnn.X = var2;
                pnn.Y = YY.Next(200, this.Height);
                pnn.W = 60;
                pnn.H = 40;
                f     = R.Next(1, 3);

                pnn.img = new Bitmap(f + ".png");
                pnn.img.MakeTransparent(pnn.img.GetPixel(0, 0));
                Gold.Add(pnn);

                CActor pnn2 = new CActor();
                pnn2.X   = var2;
                pnn2.Y   = YY.Next(200, this.Height);
                pnn2.W   = 60;
                pnn2.H   = 40;
                f        = R.Next(1, 3);
                pnn2.img = new Bitmap(f + ".png");
                pnn2.img.MakeTransparent(pnn2.img.GetPixel(0, 0));
                Gold.Add(pnn2);
            }

            for (int i = 0; i < g; i++)
            {
                CActor pnn = new CActor();
                int    var = XX.Next(0, (this.Width));
                pnn.X   = var;
                pnn.Y   = YY.Next(200, this.Height);
                pnn.W   = 60;
                pnn.H   = 40;
                h       = E.Next(3, 5);
                pnn.img = new Bitmap(h + ".png");
                pnn.img.MakeTransparent(pnn.img.GetPixel(0, 0));
                Bricks.Add(pnn);

                CActor pnn2 = new CActor();
                pnn2.X   = var;
                pnn2.Y   = YY.Next(200, this.Height);
                pnn2.W   = 60;
                pnn2.H   = 40;
                h        = E.Next(3, 5);
                pnn2.img = new Bitmap(h + ".png");
                pnn2.img.MakeTransparent(pnn2.img.GetPixel(0, 0));
                Bricks.Add(pnn2);
            }
        }
예제 #2
0
        void CreateHero()
        {
            CActor pnn = new CActor();

            pnn.X = 700;
            pnn.Y = 60;
            pnn.W = 110;
            pnn.H = 130;



            pnn.imgs = new List <Bitmap>();
            for (int i = 0; i < 7; i++)
            {
                Bitmap pnm = new Bitmap("ID" + (i + 1) + ".PNG");
                pnm.MakeTransparent(pnm.GetPixel(0, 0));
                pnn.imgs.Add(pnm);
            }
            pnn.ID = 0;

            Hero.Add(pnn);
        }
예제 #3
0
        void CreateHook()
        {
            CActor pnn = new CActor();

            pnn.X = 720;
            pnn.Y = Hero[0].Y + Hero[0].H;
            pnn.W = 50;
            pnn.H = 50;

            StartX = pnn.X;
            StartY = pnn.Y;

            pnn.imgs = new List <Bitmap>();

            for (int i = 0; i < 24; i++)
            {
                Bitmap pnm = new Bitmap("Hook" + (i + 1) + ".PNG");
                pnm.MakeTransparent(pnm.GetPixel(0, 0));
                pnn.imgs.Add(pnm);
            }
            pnn.GG = 0;
            Hook.Add(pnn);
        }