IEnumerator _CloseDoor() { doorbase.sprite = sprites[8]; overlay_Lights.sprite = overlaySprites[5]; yield return(new WaitForSeconds(0.03f)); doorbase.sprite = sprites[9]; overlay_Lights.sprite = overlaySprites[4]; doorController.PlayCloseSFXshort(); yield return(new WaitForSeconds(0.04f)); doorController.BoxCollToggleOn(); yield return(new WaitForSeconds(0.06f)); doorbase.sprite = sprites[10]; if (doorController.isWindowedDoor) { overlay_Glass.sprite = overlaySprites[43]; } else { overlay_Glass.sprite = sprites[20]; } overlay_Lights.sprite = overlaySprites[3]; yield return(new WaitForSeconds(0.09f)); doorbase.sprite = sprites[11]; if (doorController.isWindowedDoor) { overlay_Glass.sprite = overlaySprites[42]; } else { overlay_Glass.sprite = sprites[19]; } overlay_Lights.sprite = overlaySprites[2]; yield return(new WaitForSeconds(0.12f)); doorbase.sprite = sprites[12]; if (!doorController.isWindowedDoor) { overlay_Glass.sprite = sprites[18]; } overlay_Lights.sprite = overlaySprites[1]; yield return(new WaitForSeconds(0.15f)); doorbase.sprite = sprites[13]; if (doorController.isWindowedDoor) { overlay_Glass.sprite = overlaySprites[39]; } else { overlay_Glass.sprite = sprites[15]; } overlay_Lights.sprite = overlaySprites[0]; yield return(new WaitForSeconds(0.18f)); overlay_Lights.sprite = null; yield return(new WaitForSeconds(0.20f)); doorbase.sprite = sprites[13]; yield return(new WaitForEndOfFrame()); doorController.isPerformingAction = false; }