Beispiel #1
0
 public void UnlockWorldItem()
 {
     if (HasWorldItem)
     {
         worlditem.UnlockTransform(tr);
     }
 }
Beispiel #2
0
 public void LockOccupant(bool locked)
 {
     if (IsOccupied)
     {
         if (locked && !Occupant.LockedParent == tr)
         {
             if (!Occupant.LockTransform(tr))
             {
                 Debug.Log("Couldn't lock occupant, already locked by " + Occupant.LockedParent.name);
             }
         }
         else
         {
             if (!Occupant.UnlockTransform(tr))
             {
                 if (Occupant.LockedParent != null)
                 {
                     Debug.Log("already locked by " + Occupant.LockedParent.name);
                 }
             }
         }
     }
 }