Exemplo n.º 1
0
        public IEnumerator CloseDoorCor()
        {
            isMoving = true;
            yield return(StartCoroutine(Lerp.MoveTo(transform, startPos, openingClosingDuration)));

            isMoving = false;
            isOpen   = false;
        }
Exemplo n.º 2
0
        public IEnumerator OpenDoorCor()
        {
            isMoving = true;
            Vector3 targetPos = startPos + transform.forward * 3f;

            yield return(StartCoroutine(Lerp.MoveTo(transform, targetPos, openingClosingDuration)));

            isMoving = false;
            isOpen   = true;
        }