Beispiel #1
0
		void Awake(){
			
			JCounter = new int[1];
			jointDictionary = new Dictionary<string,GameObject> ();
			traits = Traits.Instance;
			traits.build();

			if (defaultJoint == null)
				defaultJointExists = false;

			trait = new Trait();
			trait.makeDefault();
				Joint j;
				if(gameObject.GetComponent<Joint>()==null)
					j = gameObject.AddComponent<Joint>();
				else 
					j = gameObject.GetComponent<Joint>();
			Trait rootTrait = new Trait ();
			rootTrait.makeDefault ();
			rootTrait.jointMesh = null;
			rootTrait.ballMesh = null;
			j.trait = rootTrait;
			name = "root";
			root = gameObject;
		}
Beispiel #2
0
        GameObject makeRoot()
        {
            Trait rootTrait = new Trait();

            rootTrait.makeDefault();
            rootTrait.jointMesh = null;
            rootTrait.ballMesh  = null;
            GameObject root = makeJoint(rootTrait);

            root.name = "root";
            return(root);
        }