Esempio n. 1
0
 // Update is called once per frame
 void Update()
 {
     if (reset)
     {
         reset = false;
         foreach (Transform child in transform)
         {
             //Debug.Log(positions[child.name]);
             child.position = (Vector3)positions[child.name];
             child.rotation = (Quaternion)rotations[child.name];
             BucketScript childBucket = child.GetComponent <BucketScript>();
             if (childBucket != null)
             {
                 childBucket.reset();
             }
         }
     }
 }