Esempio n. 1
0
        public void setBox1()
        {
            ballPos = new Vector2(50, 350);
            passPos = new Vector2(700, 150);
            boxMax  = 16;



            //不明物建構
            box    = new Box[boxMax];
            box[0] = new ZLine(Game1.picZ1, new Vector2(0, 0), new Vector2(800, 0));
            box[1] = new ZLine(Game1.picZ1, new Vector2(0, 0), new Vector2(0, 400));
            box[2] = new ZLine(Game1.picZ1, new Vector2(800, 0), new Vector2(800, 400));
            box[3] = new ZLine(Game1.picZ1, new Vector2(0, 400), new Vector2(800, 400));


            box[4] = new Zbox(Game1.picZ2, new Vector2(50, 250), 1);
            box[5] = new Zbox(Game1.picZ2, new Vector2(100, 250), 1);
            box[6] = new Zbox(Game1.picZ2, new Vector2(100, 350), 1);
            box[7] = new Zbox(Game1.picZ2, new Vector2(0, 250), 1);

            box[8]  = new Zbox(Game1.picZ2, new Vector2(150, 50), 2);
            box[9]  = new Zbox(Game1.picZ2, new Vector2(250, 250), 2);
            box[10] = new Zbox(Game1.picZ2, new Vector2(700, 0), 2);
            box[11] = new Zbox(Game1.picZ2, new Vector2(700, 250), 2);

            box[12] = new Zbox(Game1.picZ2, new Vector2(650, 50), 1);
            box[13] = new Zbox(Game1.picZ2, new Vector2(650, 250), 1);

            box[14] = new Zbox(Game1.picZ2, new Vector2(600, 100), 1);
            box[15] = new Zbox(Game1.picZ2, new Vector2(600, 200), 1);
        }
Esempio n. 2
0
        public Zbox2(int x, int y, int z, bool L)
        {
            B = new Zbox[z];


            for (int i = 0; i < B.Count(); i++)
            {
                if (L)
                {
                    B[i] = new Zbox(Game1.picZ3, new Vector2(x + Game1.picZ3.Width * i, y + Game1.picZ3.Height * i), 1);
                }
                else
                {
                    B[i] = new Zbox(Game1.picZ3, new Vector2(x - Game1.picZ3.Width * i, y + Game1.picZ3.Height * i), 1);
                }
            }//for
        }