示例#1
0
 public void SetOpenState(DoorPoint.OpenPattern pattern, bool isSelf)
 {
     if (this.OpenState == pattern)
     {
         return;
     }
     this.OpenState = pattern;
     if (!isSelf)
     {
         return;
     }
     if (Object.op_Inequality((Object)this._doorPointFragment, (Object)null))
     {
         this._doorPointFragment.SetOpenState(pattern, isSelf);
     }
     if (Object.op_Inequality((Object)this._offMeshLink, (Object)null))
     {
         this._offMeshLink.set_activated(pattern == DoorPoint.OpenPattern.Close);
     }
     if (Object.op_Inequality((Object)this._obstacleInOpenRight, (Object)null))
     {
         ((Component)this._obstacleInOpenRight).get_gameObject().SetActive(pattern == DoorPoint.OpenPattern.OpenRight);
     }
     if (Object.op_Inequality((Object)this._obstacleInOpenLeft, (Object)null))
     {
         ((Component)this._obstacleInOpenLeft).get_gameObject().SetActive(pattern == DoorPoint.OpenPattern.OpenLeft);
     }
     if (!Object.op_Inequality((Object)this._obstacleInClose, (Object)null))
     {
         return;
     }
     ((Component)this._obstacleInClose).get_gameObject().SetActive(pattern == DoorPoint.OpenPattern.Close);
 }
 private IEnumerator StartCloseAnimation(DoorPoint.OpenPattern pattern)
 {
     // ISSUE: object of a compiler-generated type is created
     return((IEnumerator) new DoorAnimation.\u003CStartCloseAnimation\u003Ec__Iterator1()
     {
         pattern = pattern,
         \u0024this = this
     });
 }
 private void StopCloseAnimation(DoorPoint.OpenPattern pattern)
 {
     if (this._closeAnimDisposable == null)
     {
         return;
     }
     this._closeAnimDisposable.Dispose();
     this._closeAnimEnumerator = (IEnumerator)null;
 }
示例#4
0
        protected override void OnAwake(PlayerActor player)
        {
            DoorPoint currentPoint = player.CurrentPoint as DoorPoint;

            if (Object.op_Inequality((Object)currentPoint, (Object)null))
            {
                DoorPoint.OpenPattern openState = currentPoint.OpenState;
                currentPoint.SetOpenState(DoorPoint.OpenPattern.Close, true);
                this._doorAnimation = (DoorAnimation)((Component)currentPoint).GetComponent <DoorAnimation>();
                if (Object.op_Inequality((Object)this._doorAnimation, (Object)null))
                {
                    this._doorAnimation.PlayCloseAnimation(openState);
                }
                currentPoint.SetBookingUser((Actor)player);
            }
            ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndAction, 1), (Action <M0>)(_ => this.Elapsed(player)));
            ActorAnimInfo animInfo = player.Animation.AnimInfo;

            animInfo.outEnableBlend   = true;
            animInfo.outBlendSec      = 0.0f;
            player.Animation.AnimInfo = animInfo;
        }
 public void PlayCloseAnimation(DoorPoint.OpenPattern pattern)
 {
     this.PlayMoveSE(false);
     this._closeAnimEnumerator = this.StartCloseAnimation(pattern);
     this._closeAnimDisposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)Observable.FromCoroutine((Func <CancellationToken, IEnumerator>)(_ => this._closeAnimEnumerator), false));
 }