Exemplo n.º 1
0
        void InitializeBodyParts()
        {
            head.parent  = body;
            uArmL.parent = body;
            armL.parent  = uArmL;

            uArmR.parent = body;
            armR.parent  = uArmR;

            thighL.parent     = underTrunk;
            thighR.parent     = underTrunk;
            legL.parent       = thighL;
            legR.parent       = thighR;
            handR.parent      = armR;
            handL.parent      = armL;
            footL.parent      = legL;
            footR.parent      = legR;
            underTrunk.parent = body;

            head.position.Y = 2f;
            arm.position.Y  = 1.0f;

            uArmL.position.Y = 1.0f;
            uArmL.position.X = -1.2f;
            armL.position.Y  = 1.2f;
            handL.position.Y = 0.8f;

            uArmR.position.Y = 1.0f;
            uArmR.position.X = 1.2f;
            armR.position.Y  = 1.2f;
            handR.position.Y = 0.8f;

            legL.position.Y   = 1.8f;
            legR.position.Y   = 1.8f;
            thighR.position.Y = -0.2f;
            thighL.position.Y = -0.2f;
            thighR.position.X = -1f;
            thighL.position.X = 1f;

            armL.baseAngle.Z   = 0f;
            uArmL.baseAngle.Z  = 90f;
            armR.baseAngle.Z   = -0f;
            uArmR.baseAngle.Z  = -90f;
            hand.baseAngle.Z   = 0f;
            thighL.baseAngle.Z = 180f;
            thighR.baseAngle.Z = 180f;

            footL.position.Z = 0.4f;
            footR.position.Z = 0.4f;

            footL.position.Y = 1.3f;
            footR.position.Y = 1.3f;

            underTrunk.position.Y = -1.0f;

            head.Init(GraphicsDevice);
            armL.Init(GraphicsDevice);
            armR.Init(GraphicsDevice);
            uArmL.Init(GraphicsDevice);
            uArmR.Init(GraphicsDevice);
            hand.Init(GraphicsDevice);
            body.Init(GraphicsDevice);
            thighL.Init(GraphicsDevice);
            thighR.Init(GraphicsDevice);
            legL.Init(GraphicsDevice);
            legR.Init(GraphicsDevice);

            handR.Init(GraphicsDevice);
            handL.Init(GraphicsDevice);
            footR.Init(GraphicsDevice);
            footL.Init(GraphicsDevice);
            underTrunk.Init(GraphicsDevice);


            armL.Update();
            armR.Update();
            uArmL.Update();
            uArmR.Update();
            hand.Update();
            body.Update();
            head.Update();
            legR.Update();
            legL.Update();
            thighL.Update();
            thighR.Update();

            bodyParts[( int )BodyPartsName.Head]       = head;
            bodyParts[( int )BodyPartsName.Trunk]      = body;
            bodyParts[( int )BodyPartsName.LegR]       = legR;
            bodyParts[( int )BodyPartsName.LegL]       = legL;
            bodyParts[( int )BodyPartsName.ThighR]     = thighR;
            bodyParts[( int )BodyPartsName.ThighL]     = thighL;
            bodyParts[( int )BodyPartsName.UpperArmL]  = uArmL;
            bodyParts[( int )BodyPartsName.UpperArmR]  = uArmR;
            bodyParts[( int )BodyPartsName.ArmR]       = armR;
            bodyParts[( int )BodyPartsName.ArmL]       = armL;
            bodyParts[( int )BodyPartsName.HandR]      = handR;
            bodyParts[( int )BodyPartsName.HandL]      = handL;
            bodyParts[( int )BodyPartsName.FootR]      = footR;
            bodyParts[( int )BodyPartsName.FootL]      = footL;
            bodyParts[( int )BodyPartsName.UnderTrunk] = underTrunk;
        }
Exemplo n.º 2
0
        void InitializeBodyParts()
        {
            head.parent  = body;
            uArmL.parent = body;
            armL.parent  = uArmL;

            uArmR.parent = body;
            armR.parent  = uArmR;

            thighL.parent = body;
            thighR.parent = body;
            legL.parent   = thighL;
            legR.parent   = thighR;

            head.position.Y = 2f;
            arm.position.Y  = 1.0f;

            uArmL.position.Y = 1.0f;
            uArmL.position.X = -1.5f;
            armL.position.Y  = 1.0f;

            uArmR.position.Y = 1.0f;
            uArmR.position.X = 1.5f;
            armR.position.Y  = 1.0f;

            legL.position.Y   = 1.8f;
            legR.position.Y   = 1.8f;
            thighR.position.Y = -1f;
            thighL.position.Y = -1f;
            thighR.position.X = -1f;
            thighL.position.X = 1f;


            armL.baseAngle.Z   = 0f;
            uArmL.baseAngle.Z  = 90f;
            armR.baseAngle.Z   = -0f;
            uArmR.baseAngle.Z  = -90f;
            hand.baseAngle.Z   = 0f;
            thighL.baseAngle.Z = 180f;
            thighR.baseAngle.Z = 180f;

            head.Init(GraphicsDevice);
            armL.Init(GraphicsDevice);
            armR.Init(GraphicsDevice);
            uArmL.Init(GraphicsDevice);
            uArmR.Init(GraphicsDevice);
            hand.Init(GraphicsDevice);
            body.Init(GraphicsDevice);
            thighL.Init(GraphicsDevice);
            thighR.Init(GraphicsDevice);
            legL.Init(GraphicsDevice);
            legR.Init(GraphicsDevice);

            armL.Update();
            armR.Update();
            uArmL.Update();
            uArmR.Update();
            hand.Update();
            body.Update();
            head.Update();
            legR.Update();
            legL.Update();
            thighL.Update();
            thighR.Update();

            //bodyParts.Add( head );
            bodyParts.Add(body);
            //bodyParts.Add( hand );
            bodyParts.Add(legL);
            bodyParts.Add(legR);
            bodyParts.Add(thighR);
            bodyParts.Add(thighL);
            bodyParts.Add(uArmL);
            bodyParts.Add(uArmR);
            bodyParts.Add(armR);
            bodyParts.Add(armL);
        }