Example #1
0
 public override void OnStateExit(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex)
 {
     if (_System == null)
     {
         _System = animator.transform.root.GetComponentInChildren <TalkEventSystem> ();
     }
     _System.UIAnimationCallBack(_State);
 }
 private void Awake()
 {
     if (_System == null)
     {
         _System = FindObjectOfType <TalkEventSystem> ();
         if (_System == null)
         {
             Debug.LogWarning("TalkEventSystemがシーン上にも存在しません");
         }
         Debug.LogWarning("TalkEventSystemがアタッチされていません");
     }
 }
Example #3
0
 private void OnDestroy()
 {
     _SpriteDataCashMap.Clear();
     _SpriteDataCashMap = null;
     _UI      = null;
     Instance = null;
     _EventDoneAsObservable  = null;
     _EventStartAsObservable = null;
     _IsTalking = false;
     _AnimationEventAwaiter.OnCompleted();
     _DialogResultObserver.OnCompleted();
     Debug.Log("OndeStroyTalk");
     _EventObserver.OnCompleted();
     _EventObserver = null;
 }
Example #4
0
        private void Awake()
        {
            Instance = this;
            _EventDoneAsObservable  = _EventObserver.Where(msg => msg != null).ThrottleFrame(1);
            _EventStartAsObservable = _EventObserver.Where(msg => msg == null).ThrottleFrame(1).AsUnitObservable();

            gameObject.SetActive(false);

            _AnimationEventAwaiter.Where(state => state == TalkEventState.Start)
            .Subscribe(_ => _StartAnimationCompleted = true);

            _AnimationEventAwaiter.Where(state => state == TalkEventState.End)
            .Throttle(TimeSpan.FromSeconds(0.1))
            .Subscribe(_ => _EndAnimationCompleted = true);
        }