game: simplify if expr for OpenDoor()

This commit is contained in:
Mark Joshwel 2024-08-10 02:28:59 +08:00
parent 327d51a7e3
commit 15ac78b26a

View file

@ -96,10 +96,7 @@ private IEnumerator OpenDoor()
{ {
currentDuration = 0; currentDuration = 0;
_opening = false; _opening = false;
if (_isOpen) _isOpen = !_isOpen;
_isOpen = false;
else
_isOpen = true;
} }
yield return new WaitForEndOfFrame(); yield return new WaitForEndOfFrame();