Exemple #1
0
 private void OnStart(PlayerActor player)
 {
     MapUIContainer.RefreshCommands(0, player.SleepCommandInfos);
     MapUIContainer.CommandList.CancelEvent = (System.Action)(() =>
     {
         Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel);
         ActorAnimInfo animInfo = player.Animation.AnimInfo;
         player.SetStand(player.Animation.RecoveryPoint, animInfo.endEnableBlend, animInfo.endBlendSec, animInfo.directionType);
         player.Animation.RecoveryPoint   = (Transform)null;
         player.Animation.RefsActAnimInfo = true;
         player.Controller.ChangeState("Normal");
         player.ReleaseCurrentPoint();
         if (Object.op_Inequality((Object)player.PlayerController.CommandArea, (Object)null))
         {
             ((Behaviour)player.PlayerController.CommandArea).set_enabled(true);
         }
         MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception);
         player.ActivateNavMeshAgent();
         player.IsKinematic = false;
         MapUIContainer.SetActiveCommandList(false);
     });
     MapUIContainer.SetActiveCommandList(true, "睡眠");
     this._onEndActionDisposable = ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndAction, 1), (System.Action <M0>)(__ =>
     {
         Dictionary <int, Dictionary <int, Dictionary <int, PlayState> > > playerActionAnimTable = Singleton <Resources> .Instance.Animation.PlayerActionAnimTable;
         PoseKeyPair wakeupPoseId = Singleton <Resources> .Instance.PlayerProfile.PoseIDData.WakeupPoseID;
         PlayState info           = playerActionAnimTable[(int)player.ChaControl.sex][wakeupPoseId.postureID][wakeupPoseId.poseID];
         player.Animation.StopAllAnimCoroutine();
         player.Animation.InitializeStates(info);
         player.ActivateNavMeshAgent();
         player.IsKinematic     = false;
         ActorAnimInfo animInfo = player.Animation.AnimInfo;
         player.SetStand(player.Animation.RecoveryPoint, animInfo.endEnableBlend, animInfo.endBlendSec, 0);
         player.Animation.PlayInAnimation(info.MainStateInfo.InStateInfo.EnableFade, info.MainStateInfo.InStateInfo.FadeSecond, info.MainStateInfo.FadeOutTime, info.Layer);
         player.CameraControl.Mode = CameraMode.Normal;
         player.CameraControl.RecoverShotType();
         player.CameraControl.EnabledInput = true;
     }));
     this._onEndInAnimDisposable = ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndInAnim, 1), (System.Action <M0>)(__ =>
     {
         ActorAnimInfo animInfo = player.Animation.AnimInfo;
         player.SetStand(player.Animation.RecoveryPoint, animInfo.endEnableBlend, animInfo.endBlendSec, animInfo.directionType);
         player.Animation.RefsActAnimInfo = true;
         player.Controller.ChangeState("Normal");
         player.ReleaseCurrentPoint();
         if (Object.op_Inequality((Object)player.PlayerController.CommandArea, (Object)null))
         {
             ((Behaviour)player.PlayerController.CommandArea).set_enabled(true);
         }
         MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception);
     }));
 }
        protected override void OnAwake(PlayerActor player)
        {
            Singleton <Input> .Instance.ReserveState(Input.ValidType.UI);

            Singleton <Input> .Instance.SetupState();

            DateActionPointInfo outInfo;

            player.CurrentPoint.TryGetPlayerDateActionPointInfo(player.ChaControl.sex, EventType.Lesbian, out outInfo);
            player.HPoseID = outInfo.poseIDA;
            MapUIContainer.RefreshCommands(0, player.SpecialHCommandInfo);
            MapUIContainer.CommandList.CancelEvent = (Action)(() =>
            {
                Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel);
                MapUIContainer.SetActiveCommandList(false);
                player.Controller.ChangeState("Normal");
                player.ReleaseCurrentPoint();
                if (Object.op_Inequality((Object)player.PlayerController.CommandArea, (Object)null))
                {
                    ((Behaviour)player.PlayerController.CommandArea).set_enabled(true);
                }
                MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception);
                player.ActivateNavMeshAgent();
                player.IsKinematic = false;
            });
            MapUIContainer.SetActiveCommandList(true, "特殊エッチ");
        }
 private void OnStart(PlayerActor player)
 {
     MapUIContainer.RefreshCommands(0, player.CookCommandInfos);
     MapUIContainer.CommandList.CancelEvent = (Action)(() =>
     {
         Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel);
         MapUIContainer.SetActiveCommandList(false);
         MapUIContainer.SetVisibleHUDExceptStoryUI(true);
         MapUIContainer.StorySupportUI.Open();
         player.Controller.ChangeState("Normal");
         player.ReleaseCurrentPoint();
         if (Object.op_Inequality((Object)player.PlayerController.CommandArea, (Object)null))
         {
             ((Behaviour)player.PlayerController.CommandArea).set_enabled(true);
         }
         MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.InvokeAcception);
         player.ActivateNavMeshAgent();
         player.IsKinematic = false;
     });
     MapUIContainer.SetActiveCommandList(true, "料理");
 }
 protected override void OnAwake(PlayerActor player)
 {
     this._eventPoint = player.CurrentEventPoint;
     if (Object.op_Equality((Object)this._eventPoint, (Object)null))
     {
         this.ErrorEnd(player, "イベントポイント持っていないのにバルブ扉を開こうとした");
     }
     else
     {
         if (Object.op_Equality((Object)this._eventPoint, (Object)EventPoint.GetTargetPoint()))
         {
             EventPoint.SetTargetID(-1, -1);
         }
         HarborDoorAnimation component = (HarborDoorAnimation)((Component)this._eventPoint).GetComponent <HarborDoorAnimation>();
         if (Object.op_Equality((Object)component, (Object)null))
         {
             this.ErrorEnd(player, "イベントポイントからHarborDoorAnimationが取得できなかった");
         }
         else
         {
             this._prevAcceptionState = MapUIContainer.CommandLabel.Acception;
             if (this._prevAcceptionState != CommandLabel.AcceptionState.None)
             {
                 MapUIContainer.CommandLabel.Acception = CommandLabel.AcceptionState.None;
             }
             this._animData  = component.AnimData;
             player.EventKey = EventType.DoorOpen;
             this._poseInfo  = component.PoseInfo;
             player.SetActiveOnEquipedItem(false);
             player.ChaControl.setAllLayerWeight(0.0f);
             Transform t = component.BasePoint ?? ((Component)this._eventPoint).get_transform();
             player.Animation.RecoveryPoint = component.RecoveryPoint;
             int sex       = (int)player.ChaControl.sex;
             int postureId = this._poseInfo.postureID;
             int poseId    = this._poseInfo.poseID;
             this._info = Singleton <Resources> .Instance.Animation.PlayerActionAnimTable[sex][postureId][poseId];
             ActorAnimInfo actorAnimInfo = new ActorAnimInfo()
             {
                 layer          = this._info.Layer,
                 inEnableBlend  = this._info.MainStateInfo.InStateInfo.EnableFade,
                 inBlendSec     = this._info.MainStateInfo.InStateInfo.FadeSecond,
                 outEnableBlend = this._info.MainStateInfo.OutStateInfo.EnableFade,
                 outBlendSec    = this._info.MainStateInfo.OutStateInfo.FadeSecond,
                 directionType  = this._info.DirectionType,
                 endEnableBlend = this._info.EndEnableBlend,
                 endBlendSec    = this._info.EndBlendRate
             };
             player.Animation.AnimInfo = actorAnimInfo;
             ActorAnimInfo animInfo = actorAnimInfo;
             player.Animation.LoadSEEventKeyTable(postureId, poseId);
             player.Animation.InitializeStates(this._info.MainStateInfo.InStateInfo.StateInfos, this._info.MainStateInfo.OutStateInfo.StateInfos, this._info.MainStateInfo.AssetBundleInfo);
             player.Animation.PlayInAnimation(animInfo.inEnableBlend, animInfo.inBlendSec, this._info.MainStateInfo.FadeOutTime, animInfo.layer);
             ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndAction, 1), (Action <M0>)(_ => player.Animation.PlayOutAnimation(animInfo.outEnableBlend, animInfo.outBlendSec, animInfo.layer)));
             player.DeactivateNavMeshAgent();
             player.IsKinematic = true;
             player.SetStand(t, this._info.MainStateInfo.InStateInfo.EnableFade, this._info.MainStateInfo.InStateInfo.FadeSecond, this._info.DirectionType);
             if (Object.op_Inequality((Object)this._animData, (Object)null))
             {
                 this._animData.AnimEndAction = (Action)(() => this._animData.PlayOpenIdleAnimation(false, 0.0f, 0.0f, 0));
                 this._animData.PlayToOpenAnimation(animInfo.inEnableBlend, animInfo.inBlendSec, this._info.MainStateInfo.FadeOutTime, animInfo.layer);
             }
             ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onComplete, 1), (Action <M0>)(_ =>
             {
                 if (this._animData is AreaOpenLinkedHarborDoorAnimData)
                 {
                     Singleton <Manager.Map> .Instance.SetOpenAreaState((this._animData as AreaOpenLinkedHarborDoorAnimData).AreaOpenID, true);
                 }
                 if (this._eventPoint.GroupID == 1)
                 {
                     switch (this._eventPoint.PointID)
                     {
                     case 2:
                         Manager.Map.ForcedSetTutorialProgress(26);
                         break;
                     }
                 }
                 if (this._prevAcceptionState != MapUIContainer.CommandLabel.Acception)
                 {
                     MapUIContainer.CommandLabel.Acception = this._prevAcceptionState;
                 }
                 player.ActivateNavMeshAgent();
                 player.PlayerController.ChangeState("Normal");
             }));
             player.CameraControl.Mode = CameraMode.ActionFreeLook;
             player.CameraControl.SetShotTypeForce(ShotType.Near);
             player.CameraControl.LoadActionCameraFile(postureId, poseId, (Transform)null);
             player.OldEnabledHoldingHand = ((Behaviour)player.HandsHolder).get_enabled();
             if (player.OldEnabledHoldingHand)
             {
                 ((Behaviour)player.HandsHolder).set_enabled(false);
                 player.HandsHolder.Weight = 0.0f;
                 if (player.HandsHolder.EnabledHolding)
                 {
                     player.HandsHolder.EnabledHolding = false;
                 }
             }
             this._initSuccess = true;
         }
     }
 }