Example #1
0
 public void SelectPart(ObjectPart part)
 {
     //StopAllCoroutines();
     //StartCoroutine(PhysicalManipulation.Rotate(transform, transform.rotation, Quaternion.identity, 1f));
     foreach (ObjectPart obj in parts)
     {
         if (obj != part)
         {
             obj.gameObject.SetActive(false);
         }
     }
     selectedPart = part;
     selectedPart.GetSelected();
     UIManager.ins.ShowPartPanel(part.partName);
 }
Example #2
0
        private void Start()
        {
            if (GetComponent <BoxCollider>())
            {
                myCollider         = GetComponent <BoxCollider>();
                myCollider.enabled = false;
            }

            myObjectPart = GetComponentInParent <ObjectPart>();
            myGlowObject = GetComponent <GlowObject>();

            gameObject.layer = LayerMask.NameToLayer("ObjectPart");

            startLocalPosition = transform.localPosition;
            startLocalRotation = transform.localRotation;
        }