private IEnumerator AnimationCoroutine(UniRx.IObserver <int> observer) { if (_isAnimating) { observer.OnNext(0); observer.OnCompleted(); yield break; } _isAnimating = true; _searchLightFocus = default(SearchLightFocus); _searchLightFocus.isEval = true; _referenceCameraTransform.transform.eulerAngles = Vector3.zero; string anim = "SearchLightFocusAndBack"; _animation.Play(anim); throw new NotImplementedException("‚È‚É‚±‚ê"); // yield return new WaitForSeconds(_animation.get_Item(anim).length); yield return(new WaitForSeconds(0)); _searchLightFocus.isEval = false; _isAnimating = false; observer.OnNext(0); observer.OnCompleted(); }
private void Start() { _animation = GetComponent <Animation>(); _searchLightFocus = default(SearchLightFocus); if (_launchLoop) { PlayAnimation().DelayFrame(10).Repeat().Subscribe(delegate { }); } }