public IEnumerator CloseDoorCor() { isMoving = true; yield return(StartCoroutine(Lerp.MoveTo(transform, startPos, openingClosingDuration))); isMoving = false; isOpen = false; }
public IEnumerator OpenDoorCor() { isMoving = true; Vector3 targetPos = startPos + transform.forward * 3f; yield return(StartCoroutine(Lerp.MoveTo(transform, targetPos, openingClosingDuration))); isMoving = false; isOpen = true; }