Example #1
0
//
//	public void setDictionaryName(params int[] name){
//
//	}

        private void _construct()
        {
            GameObject ballMesh = TREEUtils.makePart(trait.ballMesh, trait.material);

            GameObject jointMesh = TREEUtils.makePart(trait.jointMesh, trait.material);

            jointMesh.transform.localPosition = new Vector3(0, .5f, 0);
            jointMesh.transform.localScale    = new Vector3(1, 1, 1);

            scalar       = new GameObject(); // trait.scalar;
            scalar.name  = "scalar";
            rotator      = new GameObject(); //trait.rotator;
            rotator.name = "rotator";

            jointMesh.transform.parent  = scalar.transform;
            scalar.transform.localScale = new Vector3(1, trait.jointScale, 1);

            ballMesh.transform.parent = rotator.transform;

            scalar.transform.parent  = rotator.transform;
            rotator.transform.parent = transform;

            if (trait.endJoint)
            {
                GameObject ballMesh2 = TREEUtils.makePart(trait.ballMesh, trait.material);
                ballMesh2.transform.parent        = rotator.transform;
                ballMesh2.transform.localPosition = new Vector3(0, trait.jointScale, 0);
            }
        }