public void CancelFineSight() { if (isFineSightMode) { isFineSightMode = false; PlaySE(SoundClips.aimSound); currentGunWeapon.anim.SetBool("FineSightMode", isFineSightMode); theCrossHair.FineSightAnimation(isFineSightMode); } }
private void FineSight() { isFineSightMode = !isFineSightMode; currentGun.anim.SetBool("FineSightMode", isFineSightMode); theCrossHair.FineSightAnimation(isFineSightMode); if (isFineSightMode) { StopAllCoroutines(); StartCoroutine(FineSightActivateCoroutine()); } else { StopAllCoroutines(); StartCoroutine(FineSightDeactivateCoroutine()); } }
// 정조준 실행 함수 private void FineSight() { /* 정조준 상태를 변경 */ isFineSightMode = !isFineSightMode; currentGun.anim.SetBool("FineSightMode", isFineSightMode); /* 크로스헤어의 정조준 상태 변경 */ theCrossHair.FineSightAnimation(isFineSightMode); /* */ if (isFineSightMode) { StopAllCoroutines(); StartCoroutine(FineSightActCoroutine()); } else { StopAllCoroutines(); StartCoroutine(FineSightDeactCoroutine()); } }
private void FineSight() { isFineSightMode = !isFineSightMode; currentGun.animator.SetBool("FineSightMode", isFineSightMode); theCrossHair.FineSightAnimation(isFineSightMode); if (isFineSightMode) { //while문에서 실행되는 originPos값이 바뀌는것을 방지 StopAllCoroutines(); //Coroutine을 통해 정조준 가동 StartCoroutine(FineSightActiveCoroutine()); } else { //while문에서 실행되는 originPos값이 바뀌는것을 방지 StopAllCoroutines(); //정조준 푸는 Coroutine StartCoroutine(FineSightDeactivateCoroutine()); } }