public void Change(bool isChan) { _isChan = isChan; if (_isChan) { _chan.UnlockAll(); _specter.LockAll(); } else { _chan.LockAll(); _specter.UnlockAll(); } }
protected override void LockableUpdate() { if (Input.GetKeyDown(KeyCode.LeftAlt)) { _isFree = !_isFree; if (_isFree) { Cursor.lockState = CursorLockMode.None; Cursor.visible = true; _chan.LockAll(); _specter.LockAll(); _controlModeChanger.isLock = true; } else { Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; _chan.UnlockAll(); _specter.UnlockAll(); _controlModeChanger.isLock = false; _controlModeChanger.Change(_controlModeChanger.isChan); } } }