public void UnlockWorldItem() { if (HasWorldItem) { worlditem.UnlockTransform(tr); } }
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); } } } } }