public virtual void OnStart() { ((Task)this).OnStart(); AgentActor agent = this.Agent; agent.EventKey = EventType.Sleep; agent.CurrentPoint = agent.TargetInSightActionPoint; agent.SetActiveOnEquipedItem(false); agent.ChaControl.setAllLayerWeight(0.0f); agent.ElectNextPoint(); agent.CurrentPoint.SetActiveMapItemObjs(false); agent.DeactivateNavMeshAgent(); agent.DisableActionFlag(); ActionPointInfo actionPointInfo1 = agent.TargetInSightActionPoint.GetActionPointInfo(agent); agent.Animation.ActionPointInfo = actionPointInfo1; ActionPointInfo actionPointInfo2 = actionPointInfo1; Transform t = ((Component)agent.CurrentPoint).get_transform().FindLoop(actionPointInfo2.baseNullName)?.get_transform() ?? ((Component)agent.CurrentPoint).get_transform(); GameObject loop = ((Component)agent.CurrentPoint).get_transform().FindLoop(actionPointInfo2.recoveryNullName); agent.Animation.RecoveryPoint = loop?.get_transform(); PoseKeyPair wakenUpId = Singleton <Resources> .Instance.AgentProfile.PoseIDTable.WakenUpID; PlayState playState = Singleton <Resources> .Instance.Animation.AgentActionAnimTable[wakenUpId.postureID][wakenUpId.poseID]; agent.Animation.LoadEventKeyTable(wakenUpId.postureID, wakenUpId.poseID); ActorAnimInfo actorAnimInfo1 = new ActorAnimInfo() { layer = playState.Layer, inEnableBlend = playState.MainStateInfo.InStateInfo.EnableFade, inBlendSec = playState.MainStateInfo.InStateInfo.FadeSecond, inFadeOutTime = playState.MainStateInfo.FadeOutTime, outEnableBlend = playState.MainStateInfo.OutStateInfo.EnableFade, outBlendSec = playState.MainStateInfo.OutStateInfo.FadeSecond, directionType = playState.DirectionType, endEnableBlend = playState.EndEnableBlend, endBlendSec = playState.EndBlendRate, isLoop = playState.MainStateInfo.IsLoop, loopMinTime = playState.MainStateInfo.LoopMin, loopMaxTime = playState.MainStateInfo.LoopMax, hasAction = playState.ActionInfo.hasAction, loopStateName = playState.MainStateInfo.InStateInfo.StateInfos.GetElement <PlayState.Info>(playState.MainStateInfo.InStateInfo.StateInfos.Length - 1).stateName, randomCount = playState.ActionInfo.randomCount, oldNormalizedTime = 0.0f }; agent.Animation.AnimInfo = actorAnimInfo1; ActorAnimInfo actorAnimInfo2 = actorAnimInfo1; if (!playState.MainStateInfo.InStateInfo.StateInfos.IsNullOrEmpty <PlayState.Info>()) { foreach (PlayState.Info stateInfo in playState.MainStateInfo.InStateInfo.StateInfos) { agent.Animation.InStates.Enqueue(stateInfo); } } agent.Animation.OutStates.Clear(); agent.Animation.StopAllAnimCoroutine(); agent.Animation.PlayInAnimation(actorAnimInfo2.inEnableBlend, actorAnimInfo2.inBlendSec, actorAnimInfo2.inFadeOutTime, actorAnimInfo2.layer); agent.SleepTrigger = false; agent.AgentData.YobaiTrigger = false; agent.CurrentPoint.SetSlot((Actor)agent); agent.SetStand(t, playState.MainStateInfo.InStateInfo.EnableFade, playState.MainStateInfo.InStateInfo.FadeSecond, playState.DirectionType); }
public virtual void OnStart() { ((Task)this).OnStart(); AgentActor agent = this.Agent; agent.EventKey = EventType.Sleep; agent.CurrentPoint = agent.TargetInSightActionPoint; agent.SetActiveOnEquipedItem(false); agent.ChaControl.setAllLayerWeight(0.0f); agent.ElectNextPoint(); agent.CurrentPoint.SetActiveMapItemObjs(false); ActionPointInfo actionPointInfo1 = agent.TargetInSightActionPoint.GetActionPointInfo(agent); agent.Animation.ActionPointInfo = actionPointInfo1; ActionPointInfo actionPointInfo2 = actionPointInfo1; Transform t = ((Component)agent.CurrentPoint).get_transform().FindLoop(actionPointInfo2.baseNullName)?.get_transform() ?? ((Component)agent.CurrentPoint).get_transform(); GameObject loop = ((Component)agent.CurrentPoint).get_transform().FindLoop(actionPointInfo2.recoveryNullName); agent.Animation.RecoveryPoint = loop?.get_transform(); int eventId = actionPointInfo2.eventID; agent.ActionID = eventId; int index = eventId; int poseId = actionPointInfo2.poseID; agent.PoseID = poseId; int poseID = poseId; PlayState info = Singleton <Resources> .Instance.Animation.AgentActionAnimTable[index][poseID]; ValueTuple <int, string> valueTuple; if (AIProject.Definitions.Action.NameTable.TryGetValue(agent.EventKey, out valueTuple) && (int)valueTuple.Item1 != agent.ActionID) { return; } ActorAnimInfo animInfo = agent.Animation.LoadActionState(index, poseID, info); agent.LoadActionFlag(index, poseID); agent.DeactivateNavMeshAgent(); agent.Animation.StopAllAnimCoroutine(); agent.Animation.PlayInAnimation(animInfo.inEnableBlend, animInfo.inBlendSec, info.MainStateInfo.FadeOutTime, animInfo.layer); this._onActionPlayDisposable = ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>)agent.AnimationAgent.OnEndActionAsObservable(), 1), (System.Action <M0>)(_ => { agent.Animation.StopAllAnimCoroutine(); agent.Animation.PlayOutAnimation(animInfo.outEnableBlend, animInfo.outBlendSec, animInfo.layer); })); if (animInfo.hasAction) { this._onActionPlayDisposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)agent.AnimationAgent.OnActionPlayAsObservable(), (System.Action <M0>)(_ => agent.Animation.PlayActionAnimation(animInfo.layer))); } this._onCompleteActionDisposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)agent.AnimationAgent.OnCompleteActionAsObservable(), (System.Action <M0>)(_ => this.Complete())); agent.CurrentPoint.SetSlot((Actor)agent); agent.SetStand(t, info.MainStateInfo.InStateInfo.EnableFade, info.MainStateInfo.InStateInfo.FadeSecond, info.DirectionType); if (!animInfo.isLoop) { return; } ThresholdInt sleepDurationMinMax = Singleton <Resources> .Instance.AgentProfile.SecondSleepDurationMinMax; agent.SetCurrentSchedule(animInfo.isLoop, actionPointInfo2.actionName, sleepDurationMinMax.min, sleepDurationMinMax.max, animInfo.hasAction, true); if (!agent.AgentData.ScheduleEnabled) { return; } Actor.BehaviorSchedule schedule = agent.Schedule; schedule.enabled = agent.AgentData.ScheduleEnabled; schedule.elapsedTime = agent.AgentData.ScheduleElapsedTime; schedule.duration = agent.AgentData.ScheduleDuration; agent.Schedule = schedule; agent.AgentData.ScheduleEnabled = false; }
public virtual void OnStart() { ((Task)this).OnStart(); this._isReleased = true; AgentActor agent = this.Agent; agent.EventKey = EventType.Lesbian; agent.CurrentPoint = agent.TargetInSightActionPoint; agent.SetActiveOnEquipedItem(false); agent.ChaControl.setAllLayerWeight(0.0f); Actor partner = agent.Partner; if (Object.op_Equality((Object)partner, (Object)null)) { return; } agent.DeactivateNavMeshAgent(); agent.IsKinematic = true; partner.SetActiveOnEquipedItem(false); partner.ChaControl.setAllLayerWeight(0.0f); partner.DeactivateNavMeshAgent(); partner.IsKinematic = true; DateActionPointInfo dateActionPointInfo1 = agent.TargetInSightActionPoint.GetDateActionPointInfo(agent); agent.Animation.DateActionPointInfo = dateActionPointInfo1; DateActionPointInfo dateActionPointInfo2 = dateActionPointInfo1; Transform basePointA = ((Component)agent.CurrentPoint).get_transform().FindLoop(dateActionPointInfo2.baseNullNameA)?.get_transform() ?? ((Component)agent.CurrentPoint).get_transform(); GameObject loop1 = ((Component)agent.CurrentPoint).get_transform().FindLoop(dateActionPointInfo2.recoveryNullNameA); agent.Animation.RecoveryPoint = loop1?.get_transform() ?? ((Component)agent.CurrentPoint).get_transform(); Transform basePointB = ((Component)agent.CurrentPoint).get_transform().FindLoop(dateActionPointInfo2.baseNullNameB)?.get_transform() ?? ((Component)agent.CurrentPoint).get_transform(); GameObject loop2 = ((Component)agent.CurrentPoint).get_transform().FindLoop(dateActionPointInfo2.recoveryNullNameB); partner.Animation.RecoveryPoint = loop2?.get_transform() ?? ((Component)agent.CurrentPoint).get_transform(); int eventId = dateActionPointInfo2.eventID; agent.ActionID = eventId; int actionID = eventId; int poseIda = dateActionPointInfo2.poseIDA; agent.PoseID = poseIda; int poseID1 = poseIda; int poseIdb = dateActionPointInfo2.poseIDB; partner.PoseID = poseIdb; int poseID2 = poseIdb; PlayState playState1 = Singleton <Resources> .Instance.Animation.AgentActionAnimTable[actionID][poseID1]; agent.LoadActionFlag(actionID, poseID1); if (partner is AgentActor) { (partner as AgentActor).LoadActionFlag(actionID, poseID2); } PlayState playState2 = Singleton <Resources> .Instance.Animation.AgentActionAnimTable[actionID][poseID2]; HScene.AnimationListInfo info = Singleton <Resources> .Instance.HSceneTable.lstAnimInfo[4][dateActionPointInfo2.poseIDA]; agent.Animation.BeginIgnoreEvent(); partner.Animation.BeginIgnoreEvent(); AssetBundleInfo assetBundleInfo1 = playState1.MainStateInfo.AssetBundleInfo; RuntimeAnimatorController rac1 = AssetUtility.LoadAsset <RuntimeAnimatorController>((string)assetBundleInfo1.assetbundle, (string)assetBundleInfo1.asset, string.Empty); agent.Animation.SetAnimatorController(rac1); AssetBundleInfo assetBundleInfo2 = playState2.MainStateInfo.AssetBundleInfo; RuntimeAnimatorController rac2 = AssetUtility.LoadAsset <RuntimeAnimatorController>((string)assetBundleInfo2.assetbundle, (string)assetBundleInfo2.asset, string.Empty); partner.Animation.SetAnimatorController(rac2); agent.StartLesbianSequence(partner, info); agent.CurrentPoint.SetSlot((Actor)agent); agent.SetStand(basePointA, false, 0.0f, 0); partner.SetStand(basePointB, false, 0.0f, 0); ObservableExtensions.Subscribe <long>(Observable.Take <long>(Observable.Skip <long>((IObservable <M0>)Observable.EveryLateUpdate(), 1), 5), (System.Action <M0>)(_ => { agent.SetStand(basePointA, false, 0.0f, 0); partner.SetStand(basePointB, false, 0.0f, 0); })); agent.UpdateMotivation = true; this._isReleased = false; }
public virtual void OnStart() { AgentActor agent = this.Agent; agent.EventKey = EventType.StorageIn; agent.CurrentPoint = agent.TargetInSightActionPoint; agent.SetActiveOnEquipedItem(false); agent.ChaControl.setAllLayerWeight(0.0f); agent.ElectNextPoint(); ValueTuple <int, string> valueTuple; AIProject.Definitions.Action.NameTable.TryGetValue(agent.EventKey, out valueTuple); agent.ActionID = (int)valueTuple.Item1; ActionPointInfo actionPointInfo1 = agent.TargetInSightActionPoint.GetActionPointInfo(agent); agent.Animation.ActionPointInfo = actionPointInfo1; ActionPointInfo actionPointInfo2 = actionPointInfo1; Transform t = ((Component)agent.CurrentPoint).get_transform().FindLoop(actionPointInfo2.baseNullName)?.get_transform() ?? ((Component)agent.CurrentPoint).get_transform(); GameObject loop = ((Component)agent.CurrentPoint).get_transform().FindLoop(actionPointInfo2.recoveryNullName); agent.Animation.RecoveryPoint = loop?.get_transform(); agent.PoseID = actionPointInfo2.poseID; PlayState playState = Singleton <Resources> .Instance.Animation.AgentActionAnimTable[agent.ActionID][actionPointInfo2.poseID]; agent.Animation.LoadEventKeyTable(agent.ActionID, actionPointInfo2.poseID); agent.LoadEventItems(playState); agent.LoadEventParticles(agent.ActionID, actionPointInfo2.poseID); agent.Animation.InitializeStates(playState); ActorAnimInfo actorAnimInfo = new ActorAnimInfo() { inEnableBlend = playState.MainStateInfo.InStateInfo.EnableFade, inBlendSec = playState.MainStateInfo.InStateInfo.FadeSecond, inFadeOutTime = playState.MainStateInfo.FadeOutTime, outEnableBlend = playState.MainStateInfo.OutStateInfo.EnableFade, outBlendSec = playState.MainStateInfo.OutStateInfo.FadeSecond, directionType = playState.DirectionType, endEnableBlend = playState.EndEnableBlend, endBlendSec = playState.EndBlendRate, isLoop = playState.MainStateInfo.IsLoop, loopMinTime = playState.MainStateInfo.LoopMin, loopMaxTime = playState.MainStateInfo.LoopMax, hasAction = playState.ActionInfo.hasAction, layer = playState.MainStateInfo.InStateInfo.StateInfos[0].layer }; agent.Animation.AnimInfo = actorAnimInfo; ActorAnimInfo animInfo = actorAnimInfo; Resources instance = Singleton <Resources> .Instance; agent.LoadActionFlag(actionPointInfo2.eventID, actionPointInfo2.poseID); agent.DeactivateNavMeshAgent(); ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onStartChestAction, 1), (System.Action <M0>)(_ => { if (!Object.op_Inequality((Object)this._chestAnimation, (Object)null)) { return; } this._chestAnimation.PlayInAnimation(); })); ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onStartAction, 1), (System.Action <M0>)(_ => agent.Animation.PlayInAnimation(animInfo.inEnableBlend, animInfo.inBlendSec, animInfo.inFadeOutTime, animInfo.layer))); ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndAction, 1), (System.Action <M0>)(_ => { agent.Animation.StopAllAnimCoroutine(); agent.Animation.PlayOutAnimation(animInfo.outEnableBlend, animInfo.outBlendSec, animInfo.layer); })); if (animInfo.hasAction) { ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onActionPlay, 1), (System.Action <M0>)(_ => agent.Animation.PlayActionAnimation(animInfo.layer))); } agent.CurrentPoint.SetSlot((Actor)agent); agent.SetStand(t, playState.MainStateInfo.InStateInfo.EnableFade, playState.MainStateInfo.InStateInfo.FadeSecond, playState.DirectionType); if (animInfo.isLoop) { this.Agent.SetCurrentSchedule(animInfo.isLoop, (string)valueTuple.Item2, animInfo.loopMinTime, animInfo.loopMaxTime, animInfo.hasAction, false); } if (!Object.op_Inequality((Object)this.Agent.CurrentPoint, (Object)null)) { return; } this._chestAnimation = (ChestAnimation)((Component)this.Agent.CurrentPoint).GetComponent <ChestAnimation>(); }
public virtual void OnStart() { AgentActor agent = this.Agent; agent.EventKey = EventType.Play; agent.CurrentPoint = agent.TargetInSightActionPoint; agent.SetActiveOnEquipedItem(false); agent.ChaControl.setAllLayerWeight(0.0f); agent.ElectNextPoint(); agent.CurrentPoint.SetActiveMapItemObjs(false); DateActionPointInfo outInfo; agent.CurrentPoint.TryGetAgentDateActionPointInfo(EventType.Play, out outInfo); Transform t1 = ((Component)agent.CurrentPoint).get_transform().FindLoop(outInfo.baseNullNameA)?.get_transform() ?? ((Component)agent.CurrentPoint).get_transform(); Transform t2 = ((Component)agent.CurrentPoint).get_transform().FindLoop(outInfo.baseNullNameB)?.get_transform() ?? ((Component)agent.CurrentPoint).get_transform(); GameObject loop1 = ((Component)agent.CurrentPoint).get_transform().FindLoop(outInfo.recoveryNullNameA); agent.Animation.RecoveryPoint = loop1?.get_transform(); GameObject loop2 = ((Component)agent.CurrentPoint).get_transform().FindLoop(outInfo.recoveryNullNameB); agent.Animation.RecoveryPoint = loop2?.get_transform(); int eventId = outInfo.eventID; agent.ActionID = eventId; int eventID = eventId; int poseIda = outInfo.poseIDA; agent.PoseID = poseIda; int poseID1 = poseIda; PlayState playState1 = Singleton <Resources> .Instance.Animation.AgentActionAnimTable[eventID][poseID1]; agent.Animation.LoadEventKeyTable(eventID, poseID1); agent.LoadEventItems(playState1); agent.LoadEventParticles(eventID, poseID1); agent.Animation.InitializeStates(playState1); AgentActor partner = agent.Partner as AgentActor; partner.BehaviorResources.ChangeMode(Desire.ActionType.Idle); partner.Mode = Desire.ActionType.Idle; partner.ActionID = eventID; int poseIdb = outInfo.poseIDB; partner.PoseID = poseIdb; int poseID2 = poseIdb; partner.Animation.LoadEventKeyTable(eventID, poseID2); PlayState playState2 = Singleton <Resources> .Instance.Animation.AgentActionAnimTable[eventID][poseID2]; partner.LoadEventItems(playState2); partner.LoadEventParticles(eventID, poseID2); partner.Animation.InitializeStates(playState2); ActorAnimInfo actorAnimInfo1 = new ActorAnimInfo() { inEnableBlend = playState1.MainStateInfo.InStateInfo.EnableFade, inBlendSec = playState1.MainStateInfo.InStateInfo.FadeSecond, inFadeOutTime = playState1.MainStateInfo.FadeOutTime, outEnableBlend = playState1.MainStateInfo.OutStateInfo.EnableFade, outBlendSec = playState1.MainStateInfo.OutStateInfo.FadeSecond, directionType = playState1.DirectionType, endEnableBlend = playState1.EndEnableBlend, endBlendSec = playState1.EndBlendRate, isLoop = playState1.MainStateInfo.IsLoop, loopMinTime = playState1.MainStateInfo.LoopMin, loopMaxTime = playState1.MainStateInfo.LoopMax, hasAction = playState1.ActionInfo.hasAction, loopStateName = playState1.MainStateInfo.InStateInfo.StateInfos.GetElement <PlayState.Info>(playState1.MainStateInfo.InStateInfo.StateInfos.Length - 1).stateName, randomCount = playState1.ActionInfo.randomCount, oldNormalizedTime = 0.0f, layer = playState1.MainStateInfo.InStateInfo.StateInfos[0].layer }; agent.Animation.AnimInfo = actorAnimInfo1; ActorAnimInfo animInfo = actorAnimInfo1; ActorAnimInfo actorAnimInfo2 = new ActorAnimInfo() { layer = playState2.Layer, inEnableBlend = playState2.MainStateInfo.InStateInfo.EnableFade, inBlendSec = playState2.MainStateInfo.InStateInfo.FadeSecond, outEnableBlend = playState2.MainStateInfo.OutStateInfo.EnableFade, outBlendSec = playState2.MainStateInfo.OutStateInfo.FadeSecond, directionType = playState1.DirectionType, isLoop = playState1.MainStateInfo.IsLoop, endEnableBlend = playState1.EndEnableBlend, endBlendSec = playState1.EndBlendRate }; partner.Animation.AnimInfo = actorAnimInfo2; ActorAnimInfo actorAnimInfo3 = actorAnimInfo2; agent.DisableActionFlag(); partner.DisableActionFlag(); agent.DeactivateNavMeshAgent(); agent.IsKinematic = true; partner.SetActiveOnEquipedItem(false); partner.ChaControl.setAllLayerWeight(0.0f); partner.DeactivateNavMeshAgent(); partner.IsKinematic = true; agent.CurrentPoint.SetSlot((Actor)agent); agent.Animation.StopAllAnimCoroutine(); agent.Animation.PlayInAnimation(animInfo.inEnableBlend, animInfo.inBlendSec, playState1.MainStateInfo.FadeOutTime, animInfo.layer); agent.SetStand(t1, playState1.MainStateInfo.InStateInfo.EnableFade, playState1.MainStateInfo.InStateInfo.FadeSecond, animInfo.layer); partner.Animation.PlayInAnimation(actorAnimInfo3.inEnableBlend, actorAnimInfo3.inBlendSec, playState2.MainStateInfo.FadeOutTime, actorAnimInfo3.layer); partner.SetStand(t2, playState2.MainStateInfo.InStateInfo.EnableFade, playState2.MainStateInfo.InStateInfo.FadeSecond, actorAnimInfo3.layer); ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this._onEndAction, 1), (System.Action <M0>)(_ => { agent.Animation.PlayOutAnimation(animInfo.outEnableBlend, animInfo.outBlendSec, animInfo.layer); partner.Animation.PlayOutAnimation(animInfo.outEnableBlend, animInfo.outBlendSec, animInfo.layer); })); if (animInfo.hasAction) { ObservableExtensions.Subscribe <Unit>((IObservable <M0>) this._onActionPlay, (System.Action <M0>)(_ => { agent.Animation.PlayActionAnimation(animInfo.layer); partner.Animation.PlayActionAnimation(animInfo.layer); })); } if (!animInfo.isLoop) { return; } agent.SetCurrentSchedule(animInfo.isLoop, outInfo.actionName, animInfo.loopMinTime, animInfo.loopMaxTime, animInfo.hasAction, false); }
public virtual void OnStart() { ((Task)this).OnStart(); this.Agent.StopNavMeshAgent(); this.Agent.AnimalFovAngleOffsetY = 0.0f; int id = this.Agent.AgentData.SickState.ID; PlayState playState1 = new PlayState(); Dictionary <int, Dictionary <int, PlayState> > agentActionAnimTable = Singleton <Resources> .Instance.Animation.AgentActionAnimTable; AgentProfile.PoseIDCollection poseIdTable = Singleton <Resources> .Instance.AgentProfile.PoseIDTable; this.isSick = -1 < id; this.isCold = false; PlayState playState2; if (this.isSick) { if (id == 0) { this.isCold = true; PoseKeyPair coughId = poseIdTable.CoughID; playState2 = agentActionAnimTable[coughId.postureID][coughId.poseID]; } else { PoseKeyPair[] normalIdList = poseIdTable.NormalIDList; PoseKeyPair element = normalIdList.GetElement <PoseKeyPair>(Random.Range(0, normalIdList.Length)); playState2 = agentActionAnimTable[element.postureID][element.poseID]; } } else { List <PoseKeyPair> poseKeyPairList = ListPool <PoseKeyPair> .Get(); poseKeyPairList.AddRange((IEnumerable <PoseKeyPair>)poseIdTable.NormalIDList); switch (Singleton <Manager.Map> .Instance.Simulator.Weather) { case Weather.Clear: case Weather.Cloud1: poseKeyPairList.Add(poseIdTable.ClearPoseID); break; } PoseKeyPair element = poseKeyPairList.GetElement <PoseKeyPair>(Random.Range(0, poseKeyPairList.Count)); ListPool <PoseKeyPair> .Release(poseKeyPairList); playState2 = agentActionAnimTable[element.postureID][element.poseID]; } this.layer = playState2.Layer; this.inEnableFade = playState2.MainStateInfo.InStateInfo.EnableFade; this.inFadeTime = playState2.MainStateInfo.InStateInfo.FadeSecond; this.Agent.Animation.OnceActionStates.Clear(); if (!playState2.MainStateInfo.InStateInfo.StateInfos.IsNullOrEmpty <PlayState.Info>()) { foreach (PlayState.Info stateInfo in playState2.MainStateInfo.InStateInfo.StateInfos) { this.Agent.Animation.OnceActionStates.Add(stateInfo); } } this.Agent.Animation.OutStates.Clear(); if (!playState2.MainStateInfo.OutStateInfo.StateInfos.IsNullOrEmpty <PlayState.Info>()) { foreach (PlayState.Info stateInfo in playState2.MainStateInfo.OutStateInfo.StateInfos) { this.Agent.Animation.OutStates.Enqueue(stateInfo); } } this.duration = Singleton <Resources> .Instance.AgentProfile.StandDurationMinMax.RandomValue; this.onEndEvent = new Subject <Unit>(); ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>) this.onEndEvent, 1), (Action <M0>)(_ => this.Agent.Animation.PlayOutAnimation(this.outEnableFade, this.outFadeTime, this.layer))); this.onStartEvent = (Action)(() => this.Agent.Animation.PlayOnceActionAnimation(this.inEnableFade, this.inFadeTime, this.layer)); }