Beispiel #1
0
        public ForeTable(TextureManager _t, int level)
        {
            this.level     = level;
            texturemanager = _t;
            renderer       = new Renderer();
            tableback      = new Sprite[4];         //四周的遮掩图块
            Texture texture = _t.Get("foretable1"); //("table1");

            tableback[0]         = new Sprite();    // 0 上,  1 左, 2 下, 3 右
            tableback[0].Texture = texture;
            tableback[0].SetWidth(640);
            tableback[0].SetHeight(15);
            tableback[0].SetPosition(0, 232.5f);         //去除顶上的白线(有bug隐患)
            tableback[0].SetUVs(0, 0, 1, 15 / 480.0f);

            tableback[1]         = new Sprite();
            tableback[1].Texture = texture;
            tableback[1].SetWidth(30);
            tableback[1].SetHeight(450);
            tableback[1].SetPosition(-306, 0);
            tableback[1].SetUVs(0, 15 / 480.0f, 28 / 640.0f, 1 - 15 / 480.0f);

            tableback[2]         = new Sprite();
            tableback[2].Texture = texture;
            tableback[2].SetWidth(640);
            tableback[2].SetHeight(15 + 2);
            tableback[2].SetPosition(0, -232.5f + 1);
            tableback[2].SetUVs(0, 1 - 15 / 480.0f, 1, 1);

            tableback[3]         = new Sprite();
            tableback[3].Texture = texture;
            tableback[3].SetWidth(225);
            tableback[3].SetHeight(450);
            tableback[3].SetPosition(209.5f - 2, 0);
            tableback[3].SetUVs(415 / 640.0f, 15 / 480.0f, 1, 1 - 15 / 480.0f);

            gameproperties        = new GameProperties(texturemanager, new Renderer(), 150, 180);
            gameproperties.Scores = 34567890;
        }
Beispiel #2
0
        public ForeTable(TextureManager _t , int level)
        {
            this.level = level;
            texturemanager = _t;
            renderer = new Renderer();
            tableback = new Sprite[4];       //四周的遮掩图块
            Texture texture = _t.Get("foretable1");//("table1");
            tableback[0] = new Sprite();     // 0 上,  1 左, 2 下, 3 右
            tableback[0].Texture = texture;
            tableback[0].SetWidth(640);
            tableback[0].SetHeight(15);
            tableback[0].SetPosition(0, 232.5f  );       //去除顶上的白线(有bug隐患)
            tableback[0].SetUVs(0, 0, 1, 15 / 480.0f);

            tableback[1] = new Sprite();
            tableback[1].Texture = texture;
            tableback[1].SetWidth(30);
            tableback[1].SetHeight(450);
            tableback[1].SetPosition(-306,0);
            tableback[1].SetUVs(0, 15 / 480.0f, 28 / 640.0f, 1 - 15 / 480.0f);

            tableback[2] = new Sprite();
            tableback[2].Texture = texture;
            tableback[2].SetWidth(640);
            tableback[2].SetHeight(15+2);
            tableback[2].SetPosition(0, -232.5f + 1);
            tableback[2].SetUVs(0, 1 - 15 / 480.0f, 1, 1);

            tableback[3] = new Sprite();
            tableback[3].Texture = texture;
            tableback[3].SetWidth(225);
            tableback[3].SetHeight(450);
            tableback[3].SetPosition(209.5f -2,0);
            tableback[3].SetUVs(415 / 640.0f, 15 / 480.0f, 1, 1 - 15 / 480.0f);

            gameproperties = new GameProperties(texturemanager, new Renderer(), 150, 180);
            gameproperties.Scores = 34567890;
        }