示例#1
0
文件: SZ.cs 项目: CharsAce/XNA
        public SZ(BasicEffect be)
        {
            bones[0] = new Bone2();
            bones[1] = new Bone2();

            bones[0].BoneStart = new Vector2(24, 0);
            bones[0].BoneEnd = new Vector2(24, 48);
            bones[0].ParentId = -1;
            bones[0].TextureName = "0";
            bones[0].TextureOrigin = new Vector2(24, 0);

            bones[1].BoneStart = new Vector2(0, 24);
            bones[1].BoneEnd = new Vector2(48, 24);
            bones[1].ParentId = 0;
            bones[0].TextureName = "1";
            bones[1].TextureOrigin = new Vector2(12,24);

            this.be = be;

            l = new DebugLine[bones.Length];
            textures = new Texture2D[bones.Length];

            positions[0] = new Vector2(200, 200);
            positions[1] = new Vector2(0, 0);
        }
示例#2
0
文件: Skeleton2.cs 项目: CharsAce/XNA
        public Skeleton2(BasicEffect be)
        {
            bones[0] = new Bone2();
            bones[1] = new Bone2();

            //bones[0].BoneStart = new Vector2(400, 400);
            //bones[0].ParentId = -1;
            //bones[0].Length = 60.90156f;
            //bones[0].TextureName = "machine_arm";
            //bones[0].Rotation = 0f;
            //bones[0].TextureOrigin = new Vector2(10, 43);

            //bones[1].BoneStart = new Vector2(0, -32);
            //bones[1].ParentId = 0;
            //bones[1].Length = 48;
            //bones[1].TextureName = "machine_forearm2";
            //bones[1].Rotation = 0f;
            //bones[1].TextureOrigin = new Vector2(25, 24);

            bones[0].BoneStart = new Vector2(400, 400);
            bones[0].ParentId = -1;
            bones[0].Length = 60.90156f;
            bones[0].TextureName = "1";
            bones[0].Rotation = 0f;
            bones[0].TextureOrigin = new Vector2(10, 43);
            bones[0].Flag = BoneFlag.BoneAbsolute;

            bones[1].BoneStart = new Vector2(0, -32);
            bones[1].ParentId = 0;
            bones[1].Length = 48;
            bones[1].TextureName = "1";
            bones[1].Rotation = 0f;
            bones[1].TextureOrigin = new Vector2(25, 24);
            bones[0].Flag = BoneFlag.Child;

            this.be = be;

            l = new DebugLine[bones.Length];
            textures = new Texture2D[bones.Length];
            //for (int i = 0; i < l.Length; i++)
            //{
            //    l[i] = new DebugLine(be, bones[i].BoneStart.X,
            //        bones[i].BoneStart.Y, bones[i].Length);
            //}
        }