예제 #1
0
        protected override void OnCompletedStateTask()
        {
            if (Object.op_Equality((Object)this.CurrentPoint, (Object)null))
            {
                return;
            }
            DoorPoint currentPoint = this.CurrentPoint as DoorPoint;

            if (currentPoint.OpenType == DoorPoint.OpenTypeState.Right)
            {
                currentPoint.SetOpenState(DoorPoint.OpenPattern.OpenRight, true);
            }
            else
            {
                currentPoint.SetOpenState(DoorPoint.OpenPattern.OpenLeft, true);
            }
        }
예제 #2
0
        private void Elapsed(PlayerActor player)
        {
            DoorPoint currentPoint = player.CurrentPoint as DoorPoint;

            if (Object.op_Inequality((Object)currentPoint, (Object)null))
            {
                if (currentPoint.OpenType == DoorPoint.OpenTypeState.Right || currentPoint.OpenType == DoorPoint.OpenTypeState.Right90)
                {
                    currentPoint.SetOpenState(DoorPoint.OpenPattern.OpenRight, true);
                }
                else
                {
                    currentPoint.SetOpenState(DoorPoint.OpenPattern.OpenLeft, true);
                }
            }
            player.PlayerController.CommandArea.RefreshCommands();
            if (Object.op_Inequality((Object)player.CurrentPoint, (Object)null))
            {
                player.CurrentPoint.RemoveBooking((Actor)player);
                CommandArea commandArea = player.PlayerController.CommandArea;
                commandArea.RemoveConsiderationObject((ICommandable)player.CurrentPoint);
                commandArea.RefreshCommands();
            }
            if (player.PlayerController.PrevStateName == "Onbu")
            {
                player.Controller.ChangeState(player.PlayerController.PrevStateName);
            }
            else if (player.PlayerController.PrevStateName == "Follow")
            {
                player.PlayerController.ChangeState("Follow");
            }
            else
            {
                player.Controller.ChangeState("Normal");
            }
        }
예제 #3
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;
        }