Beispiel #1
0
 void Start()
 {
     startPos      = doorMesh.transform.position;
     canOpenDoor   = false;
     transitioning = false;
     isOpen        = false;
     shouldDestroy = false;
     InteractableHelper.AddHighlightMaterial(doorMesh.GetComponent <MeshRenderer>());
     HasKey = RequiredKey != PickableObject.KeyNumber.kKeyNumberNone;
     if (HasKey)
     {
         Color    color = PickableObject.GetKeyColor(RequiredKey);
         Material mat   = doorMesh.GetComponent <MeshRenderer>().materials[0];
         mat.color = color;
     }
 }