Ejemplo n.º 1
0
        public override void OnStart()
        {
            AgentActor agent = this.Agent;

            agent.EventKey = EventType.DoorOpen;
            OffMeshLinkData currentOffMeshLinkData = agent.NavMeshAgent.get_currentOffMeshLinkData();
            DoorPoint       component1             = (DoorPoint)((Component)((OffMeshLinkData) ref currentOffMeshLinkData).get_offMeshLink()).GetComponent <DoorPoint>();

            agent.TargetInSightActionPoint = (ActionPoint)component1;
            this._actionMotion             = new PoseKeyPair()
            {
                postureID = -1,
                poseID    = -1
            };
            base.OnStart();
            if (!Object.op_Inequality((Object)agent.CurrentPoint, (Object)null))
            {
                return;
            }
            DoorAnimation component2 = (DoorAnimation)((Component)agent.CurrentPoint).GetComponent <DoorAnimation>();

            if (!Object.op_Inequality((Object)component2, (Object)null))
            {
                return;
            }
            ActionPointInfo actionPointInfo = agent.Animation.ActionPointInfo;
            PlayState       playState       = Singleton <Resources> .Instance.Animation.AgentActionAnimTable[actionPointInfo.eventID][actionPointInfo.poseID];

            component2.Load(playState.MainStateInfo.InStateInfo.StateInfos);
            ActorAnimInfo animInfo = agent.Animation.AnimInfo;

            component2.PlayAnimation(animInfo.inEnableBlend, animInfo.inBlendSec, playState.MainStateInfo.FadeOutTime, animInfo.layer);
        }
Ejemplo n.º 2
0
        public virtual void OnStart()
        {
            ((Task)this).OnStart();
            AgentActor agent = this.Agent;

            agent.CurrentPoint = agent.TargetInSightActionPoint;
            agent.SetActiveOnEquipedItem(false);
            agent.ChaControl.setAllLayerWeight(0.0f);
            agent.ElectNextPoint();
            if (Object.op_Equality((Object)agent.CurrentPoint, (Object)null))
            {
                return;
            }
            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];

            agent.CurrentPoint.DestroyByproduct(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._onEndActionDisposable = ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>)agent.AnimationAgent.OnEndActionAsObservable(), 1), (System.Action <M0>)(_ => 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;
            }
            agent.SetCurrentSchedule(animInfo.isLoop, actionPointInfo2.actionName, animInfo.loopMinTime, animInfo.loopMaxTime, animInfo.hasAction, false);
        }
Ejemplo n.º 3
0
        public virtual void OnStart()
        {
            AgentActor agent = this.Agent;

            agent.EventKey = EventType.Masturbation;
            ((Task)this).OnStart();
            agent.CurrentPoint = this.Agent.TargetInSightActionPoint;
            agent.SetActiveOnEquipedItem(false);
            agent.ChaControl.setAllLayerWeight(0.0f);
            agent.ElectNextPoint();
            if (Object.op_Equality((Object)agent.CurrentPoint, (Object)null))
            {
                return;
            }
            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 actionID = eventId;
            int poseId   = actionPointInfo2.poseID;

            agent.PoseID = poseId;
            int       poseID    = poseId;
            PlayState playState = Singleton <Resources> .Instance.Animation.AgentActionAnimTable[actionID][poseID];

            agent.LoadActionFlag(actionID, poseID);
            agent.DeactivateNavMeshAgent();
            agent.Animation.StopAllAnimCoroutine();
            HScene.AnimationListInfo info = Singleton <Resources> .Instance.HSceneTable.lstAnimInfo[3][actionPointInfo2.poseID];
            agent.Animation.BeginIgnoreEvent();
            AssetBundleInfo           assetBundleInfo = playState.MainStateInfo.AssetBundleInfo;
            RuntimeAnimatorController rac             = AssetUtility.LoadAsset <RuntimeAnimatorController>((string)assetBundleInfo.assetbundle, (string)assetBundleInfo.asset, string.Empty);

            agent.Animation.SetAnimatorController(rac);
            agent.StartMasturbationSequence(info);
            agent.CurrentPoint.SetSlot((Actor)agent);
            agent.SetStand(t, false, 0.0f, 0);
            agent.SurprisePoseID   = new PoseKeyPair?(Singleton <Resources> .Instance.AgentProfile.PoseIDTable.SurpriseMasturbationID);
            agent.UpdateMotivation = true;
        }
Ejemplo n.º 4
0
        public virtual TaskStatus OnUpdate()
        {
            AgentActor  agent            = this.Agent;
            ActionPoint sightActionPoint = agent.TargetInSightActionPoint;

            agent.CurrentPoint = sightActionPoint;
            ActionPoint actionPoint = sightActionPoint;

            actionPoint.SetSlot((Actor)agent);
            PoseKeyPair     sleepTogetherRight = Singleton <Resources> .Instance.AgentProfile.PoseIDTable.SleepTogetherRight;
            PoseKeyPair     sleepTogetherLeft  = Singleton <Resources> .Instance.AgentProfile.PoseIDTable.SleepTogetherLeft;
            bool            flag    = false;
            ActionPointInfo outInfo = new ActionPointInfo();

            if (Object.op_Inequality((Object)actionPoint, (Object)null))
            {
                flag = actionPoint.FindAgentActionPointInfo(EventType.Sleep, sleepTogetherRight.poseID, out outInfo) || actionPoint.FindAgentActionPointInfo(EventType.Sleep, sleepTogetherLeft.poseID, out outInfo);
            }
            if (!flag)
            {
                agent.ChangeBehavior(Desire.ActionType.Normal);
                return((TaskStatus)1);
            }
            Transform  t    = ((Component)actionPoint).get_transform().FindLoop(outInfo.baseNullName)?.get_transform() ?? ((Component)actionPoint).get_transform();
            GameObject loop = ((Component)actionPoint).get_transform().FindLoop(outInfo.recoveryNullName);

            agent.Animation.RecoveryPoint = loop?.get_transform();
            PlayState     info          = Singleton <Resources> .Instance.Animation.AgentActionAnimTable[outInfo.eventID][outInfo.poseID];
            ActorAnimInfo actorAnimInfo = agent.Animation.LoadActionState(outInfo.eventID, outInfo.poseID, info);

            agent.SetActiveOnEquipedItem(false);
            agent.ChaControl.setAllLayerWeight(0.0f);
            agent.DisableActionFlag();
            agent.DeactivateNavMeshAgent();
            agent.IsKinematic = true;
            agent.Animation.PlayInAnimation(actorAnimInfo.inEnableBlend, actorAnimInfo.inBlendSec, info.MainStateInfo.FadeOutTime, actorAnimInfo.layer);
            agent.SetStand(t, info.MainStateInfo.InStateInfo.EnableFade, info.MainStateInfo.InStateInfo.FadeSecond, info.DirectionType);
            agent.SetCurrentSchedule(actorAnimInfo.isLoop, "添い寝", actorAnimInfo.loopMinTime, actorAnimInfo.loopMaxTime, actorAnimInfo.hasAction, true);
            agent.ChangeBehavior(Desire.ActionType.EndTaskSleepAfterDate);
            return((TaskStatus)2);
        }
Ejemplo n.º 5
0
        public override void OnStart()
        {
            this._unchangeParamState = true;
            AgentActor agent = this.Agent;

            this._prevEventKey = agent.EventKey;
            agent.EventKey     = EventType.DoorOpen;
            OffMeshLinkData currentOffMeshLinkData = agent.NavMeshAgent.get_currentOffMeshLinkData();
            DoorPoint       component1             = (DoorPoint)((Component)((OffMeshLinkData) ref currentOffMeshLinkData).get_offMeshLink()).GetComponent <DoorPoint>();

            this._prevTargetPoint = agent.TargetInSightActionPoint;
            this._isDoorOpen      = !((OffMeshLinkData) ref currentOffMeshLinkData).get_activated() || Object.op_Equality((Object)component1, (Object)null) || component1.IsOpen;
            if (this._isDoorOpen)
            {
                agent.EventKey = this._prevEventKey;
            }
            else
            {
                agent.TargetInSightActionPoint = (ActionPoint)component1;
                base.OnStart();
                if (!Object.op_Inequality((Object)agent.CurrentPoint, (Object)null))
                {
                    return;
                }
                DoorAnimation component2 = (DoorAnimation)((Component)agent.CurrentPoint).GetComponent <DoorAnimation>();
                if (!Object.op_Inequality((Object)component2, (Object)null))
                {
                    return;
                }
                ActionPointInfo actionPointInfo = agent.Animation.ActionPointInfo;
                PlayState       playState       = Singleton <Resources> .Instance.Animation.AgentActionAnimTable[actionPointInfo.eventID][actionPointInfo.poseID];
                component2.Load(playState.MainStateInfo.InStateInfo.StateInfos);
                ActorAnimInfo animInfo = agent.Animation.AnimInfo;
                component2.PlayAnimation(animInfo.inEnableBlend, animInfo.inBlendSec, playState.MainStateInfo.FadeOutTime, animInfo.layer);
            }
        }
Ejemplo n.º 6
0
        public virtual void OnStart()
        {
            AgentActor agent = this.Agent;

            agent.EventKey     = EventType.Wash;
            agent.CurrentPoint = agent.TargetInSightActionPoint;
            agent.SetActiveOnEquipedItem(false);
            agent.ChaControl.setAllLayerWeight(0.0f);
            agent.ElectNextPoint();
            Resources       instance         = Singleton <Resources> .Instance;
            PoseKeyPair     handWash         = instance.AgentProfile.PoseIDTable.HandWash;
            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.ActionID = handWash.postureID;
            agent.PoseID   = handWash.poseID;
            PlayState playState = instance.Animation.AgentActionAnimTable[agent.ActionID][agent.PoseID];

            agent.Animation.LoadEventKeyTable(agent.ActionID, agent.PoseID);
            agent.LoadEventItems(playState);
            agent.LoadEventParticles(agent.ActionID, agent.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;

            agent.LoadActionFlag(agent.ActionID, agent.PoseID);
            agent.DeactivateNavMeshAgent();
            agent.Animation.StopAllAnimCoroutine();
            agent.Animation.PlayInAnimation(animInfo.inEnableBlend, animInfo.inBlendSec, playState.MainStateInfo.FadeOutTime, animInfo.layer);
            this._onEndActionDisposable = ObservableExtensions.Subscribe <Unit>(Observable.Take <Unit>((IObservable <M0>)agent.AnimationAgent.OnEndActionAsObservable(), 1), (Action <M0>)(_ => agent.Animation.PlayOutAnimation(animInfo.outEnableBlend, animInfo.outBlendSec, animInfo.layer)));
            if (animInfo.hasAction)
            {
                this._onActionPlayDisposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)agent.AnimationAgent.OnActionPlayAsObservable(), (Action <M0>)(_ => agent.Animation.PlayActionAnimation(animInfo.layer)));
            }
            this._onCompleteActionDisposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)agent.AnimationAgent.OnCompleteActionAsObservable(), (Action <M0>)(_ => this.Complete()));
            agent.CurrentPoint.SetSlot((Actor)agent);
            agent.SetStand(t, playState.MainStateInfo.InStateInfo.EnableFade, playState.MainStateInfo.InStateInfo.FadeSecond, playState.DirectionType);
            if (!animInfo.isLoop)
            {
                return;
            }
            agent.SetCurrentSchedule(animInfo.isLoop, actionPointInfo2.actionName, animInfo.loopMinTime, animInfo.loopMaxTime, animInfo.hasAction, false);
        }
Ejemplo n.º 7
0
        public virtual void 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];

            agent.CurrentPoint.DestroyByproduct(index, poseID);
            ActorAnimInfo animInfo = agent.Animation.LoadActionState(index, poseID, info);

            agent.LoadActionFlag(index, poseID);
            agent.DeactivateNavMeshAgent();
            agent.Animation.StopAllAnimCoroutine();
            agent.Animation.PlayInAnimation(animInfo.inEnableBlend, animInfo.inBlendSec, animInfo.inFadeOutTime, 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)
            {
                agent.SetCurrentSchedule(animInfo.isLoop, actionPointInfo2.actionName, 100, 200, animInfo.hasAction, true);
                if (agent.AgentData.ScheduleEnabled)
                {
                    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;
                }
            }
            MapUIContainer.AddSystemLog(string.Format("{0}が寝ました", (object)MapUIContainer.CharaNameColor((Actor)agent)), true);
        }
Ejemplo n.º 8
0
        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);
        }
Ejemplo n.º 9
0
        protected override void InitSub()
        {
            CommonDefine.CommonIconGroup icon          = Singleton <Resources> .Instance.CommonDefine.Icon;
            EventType playerEventMask                  = Singleton <Resources> .Instance.DefinePack.MapDefines.PlayerEventMask;
            List <CommandLabel.CommandInfo> toRelease1 = ListPool <CommandLabel.CommandInfo> .Get();

            foreach (KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > keyValuePair in ActionPoint.LabelTable)
            {
                KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > pair = keyValuePair;
                WarpPoint warpPoint = this;
                if (this._playerEventType.Contains(pair.Key) && playerEventMask.Contains(pair.Key) && AIProject.Definitions.Action.NameTable.TryGetValue(pair.Key, out ValueTuple <int, string> _))
                {
                    ActionPointInfo actionPointInfo = this._playerInfos.Find((Predicate <ActionPointInfo>)(x => x.eventTypeMask == pair.Key));
                    string          actionName      = actionPointInfo.actionName;
                    Sprite          sprite;
                    Singleton <Resources> .Instance.itemIconTables.ActionIconTable.TryGetValue(actionPointInfo.iconID, out sprite);

                    this._tableID = actionPointInfo.searchAreaID;
                    Transform transform = ((Component)this).get_transform().FindLoop(actionPointInfo.labelNullName)?.get_transform() ?? ((Component)this).get_transform();
                    toRelease1.Add(new CommandLabel.CommandInfo()
                    {
                        Text             = actionName,
                        Icon             = sprite,
                        IsHold           = true,
                        TargetSpriteInfo = icon.ActionSpriteInfo,
                        Transform        = transform,
                        Condition        = (Func <PlayerActor, bool>)(x => warpPoint.CanAccess()),
                        ErrorText        = (Func <PlayerActor, string>)(x => warpPoint.ErrorText()),
                        Event            = (System.Action)(() => pair.Value.Item3(Singleton <Manager.Map> .Instance.Player, (ActionPoint)warpPoint))
                    });
                }
            }
            this._labels = toRelease1.ToArray();
            ListPool <CommandLabel.CommandInfo> .Release(toRelease1);

            for (int key = 0; key < 2; ++key)
            {
                List <CommandLabel.CommandInfo> toRelease2 = ListPool <CommandLabel.CommandInfo> .Get();

                foreach (KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > keyValuePair in ActionPoint.DateLabelTable)
                {
                    KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > pair = keyValuePair;
                    WarpPoint warpPoint = this;
                    List <DateActionPointInfo> dateActionPointInfoList;
                    if (this._playerDateEventType[key].Contains(pair.Key) && AIProject.Definitions.Action.NameTable.TryGetValue(pair.Key, out ValueTuple <int, string> _) && this._playerDateInfos.TryGetValue(key, out dateActionPointInfoList))
                    {
                        DateActionPointInfo dateActionPointInfo = dateActionPointInfoList.Find((Predicate <DateActionPointInfo>)(x => x.eventTypeMask == pair.Key));
                        string actionName = dateActionPointInfo.actionName;
                        Sprite sprite;
                        Singleton <Resources> .Instance.itemIconTables.ActionIconTable.TryGetValue(dateActionPointInfo.iconID, out sprite);

                        Transform transform = ((Component)this).get_transform().FindLoop(dateActionPointInfo.labelNullName)?.get_transform() ?? ((Component)this).get_transform();
                        toRelease2.Add(new CommandLabel.CommandInfo()
                        {
                            Text             = actionName,
                            Icon             = sprite,
                            IsHold           = true,
                            TargetSpriteInfo = icon.ActionSpriteInfo,
                            Transform        = transform,
                            Condition        = (Func <PlayerActor, bool>)(x => warpPoint.CanAccess()),
                            ErrorText        = (Func <PlayerActor, string>)(x => warpPoint.ErrorText()),
                            Event            = (System.Action)(() => pair.Value.Item3(Singleton <Manager.Map> .Instance.Player, (ActionPoint)warpPoint))
                        });
                    }
                }
                this._dateLabels[key] = toRelease2.ToArray();
                ListPool <CommandLabel.CommandInfo> .Release(toRelease2);
            }
            List <CommandLabel.CommandInfo> toRelease3 = ListPool <CommandLabel.CommandInfo> .Get();

            foreach (KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > keyValuePair in ActionPoint.SickLabelTable)
            {
                KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > pair = keyValuePair;
                WarpPoint warpPoint = this;
                if (this._playerEventType.Contains(pair.Key) && playerEventMask.Contains(pair.Key) && AIProject.Definitions.Action.NameTable.TryGetValue(pair.Key, out ValueTuple <int, string> _))
                {
                    ActionPointInfo actionPointInfo = this._playerInfos.Find((Predicate <ActionPointInfo>)(x => x.eventTypeMask == pair.Key));
                    string          actionName      = actionPointInfo.actionName;
                    Sprite          sprite;
                    Singleton <Resources> .Instance.itemIconTables.ActionIconTable.TryGetValue(actionPointInfo.iconID, out sprite);

                    Transform transform = ((Component)this).get_transform().FindLoop(actionPointInfo.labelNullName)?.get_transform() ?? ((Component)this).get_transform();
                    toRelease3.Add(new CommandLabel.CommandInfo()
                    {
                        Text             = pair.Value.Item2,
                        Icon             = sprite,
                        IsHold           = true,
                        TargetSpriteInfo = icon.ActionSpriteInfo,
                        Transform        = transform,
                        Condition        = (Func <PlayerActor, bool>)(x => warpPoint.CanAccess()),
                        ErrorText        = (Func <PlayerActor, string>)(x => warpPoint.ErrorText()),
                        Event            = (System.Action)(() => pair.Value.Item3(Singleton <Manager.Map> .Instance.Player, (ActionPoint)warpPoint))
                    });
                }
            }
            this._sickLabels = toRelease3.ToArray();
            ListPool <CommandLabel.CommandInfo> .Release(toRelease3);

            if (!this._playerInfos.IsNullOrEmpty <ActionPointInfo>() && this._playerInfos.Exists((Predicate <ActionPointInfo>)(x => x.eventTypeMask == EventType.Warp)) || !this._agentEventType.Contains(EventType.Warp))
            {
                return;
            }
            this._tableID = this._agentInfos.Find((Predicate <ActionPointInfo>)(x => x.eventTypeMask == EventType.Warp)).searchAreaID;
        }
Ejemplo n.º 10
0
        protected override void InitSub()
        {
            CommonDefine.CommonIconGroup icon          = Singleton <Resources> .Instance.CommonDefine.Icon;
            EventType playerEventMask                  = Singleton <Resources> .Instance.DefinePack.MapDefines.PlayerEventMask;
            List <CommandLabel.CommandInfo> toRelease1 = ListPool <CommandLabel.CommandInfo> .Get();

            foreach (KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > keyValuePair in ActionPoint.LabelTable)
            {
                KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > pair = keyValuePair;
                SearchActionPoint searchActionPoint = this;
                if (this._playerEventType.Contains(pair.Key) && playerEventMask.Contains(pair.Key) && AIProject.Definitions.Action.NameTable.TryGetValue(pair.Key, out ValueTuple <int, string> _))
                {
                    ActionPointInfo actionPointInfo = this._playerInfos.Find((Predicate <ActionPointInfo>)(x => x.eventTypeMask == pair.Key));
                    string          actionName      = actionPointInfo.actionName;
                    Sprite          sprite;
                    if (pair.Key == EventType.Search)
                    {
                        if (actionPointInfo.searchAreaID > -1)
                        {
                            this._tableID = actionPointInfo.searchAreaID;
                        }
                        if (actionPointInfo.gradeValue > -1 && actionPointInfo.gradeValue > this._grade)
                        {
                            this._grade = actionPointInfo.gradeValue;
                        }
                        Dictionary <int, int> dictionary;
                        if (Singleton <Resources> .Instance.itemIconTables.EquipmentIconTable.TryGetValue(this._tableID, out dictionary))
                        {
                            int key;
                            if (dictionary.TryGetValue(this._grade, out key))
                            {
                                Singleton <Resources> .Instance.itemIconTables.ActionIconTable.TryGetValue(key, out sprite);
                            }
                            else
                            {
                                sprite = (Sprite)null;
                            }
                        }
                        else
                        {
                            sprite = (Sprite)null;
                        }
                    }
                    else
                    {
                        Singleton <Resources> .Instance.itemIconTables.ActionIconTable.TryGetValue(actionPointInfo.iconID, out sprite);
                    }
                    Transform transform = ((Component)this).get_transform().FindLoop(actionPointInfo.labelNullName)?.get_transform() ?? ((Component)this).get_transform();
                    toRelease1.Add(new CommandLabel.CommandInfo()
                    {
                        Text             = actionName,
                        Icon             = sprite,
                        IsHold           = pair.Key == EventType.Search,
                        TargetSpriteInfo = icon.ActionSpriteInfo,
                        Transform        = transform,
                        Condition        = (Func <PlayerActor, bool>)(x => closure_0.CanAction(x, pair.Key, actionPointInfo.searchAreaID)),
                        ErrorText        = (Func <PlayerActor, string>)(x => closure_0.ErrorText(x, pair.Key, actionPointInfo.searchAreaID)),
                        CoolTimeFillRate = (Func <float>)(() =>
                        {
                            AIProject.SaveData.Environment.SearchActionInfo searchActionInfo;
                            if (!Singleton <Game> .Instance.Environment.SearchActionLockTable.TryGetValue(closure_0.RegisterID, out searchActionInfo))
                            {
                                return(0.0f);
                            }
                            EnvironmentProfile environmentProfile = Singleton <Manager.Map> .Instance.EnvironmentProfile;
                            return(searchActionInfo.Count < environmentProfile.SearchCount ? 0.0f : 1f - searchActionInfo.ElapsedTime / environmentProfile.SearchCoolTimeDuration);
                        }),
                        Event = (System.Action)(() => pair.Value.Item3(Singleton <Manager.Map> .Instance.Player, (ActionPoint)closure_0))
                    });
                }
            }
            this._labels = toRelease1.ToArray();
            ListPool <CommandLabel.CommandInfo> .Release(toRelease1);

            for (int key1 = 0; key1 < 2; ++key1)
            {
                List <CommandLabel.CommandInfo> toRelease2 = ListPool <CommandLabel.CommandInfo> .Get();

                foreach (KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > keyValuePair in ActionPoint.DateLabelTable)
                {
                    KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > pair = keyValuePair;
                    SearchActionPoint          searchActionPoint = this;
                    List <DateActionPointInfo> dateActionPointInfoList;
                    if (this._playerDateEventType[key1].Contains(pair.Key) && AIProject.Definitions.Action.NameTable.TryGetValue(pair.Key, out ValueTuple <int, string> _) && this._playerDateInfos.TryGetValue(key1, out dateActionPointInfoList))
                    {
                        DateActionPointInfo actionPointInfo = dateActionPointInfoList.Find((Predicate <DateActionPointInfo>)(x => x.eventTypeMask == pair.Key));
                        string actionName = actionPointInfo.actionName;
                        Sprite sprite;
                        if (pair.Key == EventType.Search)
                        {
                            if (actionPointInfo.searchAreaID > -1)
                            {
                                this._tableID = actionPointInfo.searchAreaID;
                            }
                            if (actionPointInfo.gradeValue > -1 && actionPointInfo.gradeValue > this._grade)
                            {
                                this._grade = actionPointInfo.gradeValue;
                            }
                            Dictionary <int, int> dictionary;
                            if (Singleton <Resources> .Instance.itemIconTables.EquipmentIconTable.TryGetValue(this._tableID, out dictionary))
                            {
                                int key2;
                                if (dictionary.TryGetValue(this._grade, out key2))
                                {
                                    Singleton <Resources> .Instance.itemIconTables.ActionIconTable.TryGetValue(key2, out sprite);
                                }
                                else
                                {
                                    sprite = (Sprite)null;
                                }
                            }
                            else
                            {
                                sprite = (Sprite)null;
                            }
                        }
                        else
                        {
                            Singleton <Resources> .Instance.itemIconTables.ActionIconTable.TryGetValue(actionPointInfo.iconID, out sprite);
                        }
                        Transform transform = ((Component)this).get_transform().FindLoop(actionPointInfo.labelNullName)?.get_transform() ?? ((Component)this).get_transform();
                        toRelease2.Add(new CommandLabel.CommandInfo()
                        {
                            Text             = actionName,
                            Icon             = sprite,
                            IsHold           = pair.Key == EventType.Search,
                            TargetSpriteInfo = icon.ActionSpriteInfo,
                            Transform        = transform,
                            Condition        = (Func <PlayerActor, bool>)(x => closure_1.CanAction(x, pair.Key, actionPointInfo.searchAreaID)),
                            ErrorText        = (Func <PlayerActor, string>)(x => closure_1.ErrorText(x, pair.Key, actionPointInfo.searchAreaID)),
                            CoolTimeFillRate = (Func <float>)(() =>
                            {
                                AIProject.SaveData.Environment.SearchActionInfo searchActionInfo;
                                if (!Singleton <Game> .Instance.Environment.SearchActionLockTable.TryGetValue(closure_1.RegisterID, out searchActionInfo))
                                {
                                    return(0.0f);
                                }
                                EnvironmentProfile environmentProfile = Singleton <Manager.Map> .Instance.EnvironmentProfile;
                                return(searchActionInfo.Count < environmentProfile.SearchCount ? 0.0f : 1f - searchActionInfo.ElapsedTime / environmentProfile.SearchCoolTimeDuration);
                            }),
                            Event = (System.Action)(() => pair.Value.Item3(Singleton <Manager.Map> .Instance.Player, (ActionPoint)closure_1))
                        });
                    }
                }
                this._dateLabels[key1] = toRelease2.ToArray();
                ListPool <CommandLabel.CommandInfo> .Release(toRelease2);
            }
            List <CommandLabel.CommandInfo> toRelease3 = ListPool <CommandLabel.CommandInfo> .Get();

            foreach (KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > keyValuePair in ActionPoint.SickLabelTable)
            {
                KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > pair = keyValuePair;
                SearchActionPoint searchActionPoint = this;
                if (this._playerEventType.Contains(pair.Key) && playerEventMask.Contains(pair.Key) && AIProject.Definitions.Action.NameTable.TryGetValue(pair.Key, out ValueTuple <int, string> _))
                {
                    toRelease3.Add(new CommandLabel.CommandInfo()
                    {
                        Text             = pair.Value.Item2,
                        Icon             = (Sprite)null,
                        IsHold           = false,
                        TargetSpriteInfo = icon.ActionSpriteInfo,
                        Transform        = ((Component)this).get_transform(),
                        Event            = (System.Action)(() => pair.Value.Item3(Singleton <Manager.Map> .Instance.Player, (ActionPoint)searchActionPoint))
                    });
                }
            }
            this._sickLabels = toRelease3.ToArray();
            ListPool <CommandLabel.CommandInfo> .Release(toRelease3);

            if (!this._playerInfos.IsNullOrEmpty <ActionPointInfo>() && this._playerInfos.Exists((Predicate <ActionPointInfo>)(x => x.eventTypeMask == EventType.Search)) || !this._agentEventType.Contains(EventType.Search))
            {
                return;
            }
            this._tableID = this._agentInfos.Find((Predicate <ActionPointInfo>)(x => x.eventTypeMask == EventType.Search)).searchAreaID;
        }
Ejemplo n.º 11
0
        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>();
        }
Ejemplo n.º 12
0
        protected override void InitSub()
        {
            this._offMeshLink  = (OffMeshLink)((Component)this).GetComponent <OffMeshLink>();
            this.DoorAnimation = (DoorAnimation)((Component)this).GetComponent <DoorAnimation>();
            CommonDefine.CommonIconGroup icon          = Singleton <Resources> .Instance.CommonDefine.Icon;
            EventType playerEventMask                  = Singleton <Resources> .Instance.DefinePack.MapDefines.PlayerEventMask;
            List <CommandLabel.CommandInfo> toRelease1 = ListPool <CommandLabel.CommandInfo> .Get();

            List <CommandLabel.CommandInfo> toRelease2 = ListPool <CommandLabel.CommandInfo> .Get();

            foreach (KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > keyValuePair in ActionPoint.LabelTable)
            {
                KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > pair = keyValuePair;
                DoorPoint doorPoint = this;
                if (this._playerEventType.Contains(pair.Key) && playerEventMask.Contains(pair.Key) && AIProject.Definitions.Action.NameTable.TryGetValue(pair.Key, out ValueTuple <int, string> _))
                {
                    ActionPointInfo actionPointInfo = this._playerInfos.Find((Predicate <ActionPointInfo>)(x => x.eventTypeMask == pair.Key));
                    string          actionName      = actionPointInfo.actionName;
                    Sprite          sprite;
                    Singleton <Resources> .Instance.itemIconTables.ActionIconTable.TryGetValue(actionPointInfo.iconID, out sprite);

                    Transform transform = ((Component)this).get_transform().FindLoop(actionPointInfo.labelNullName)?.get_transform() ?? ((Component)this).get_transform();
                    if (pair.Key == EventType.DoorOpen)
                    {
                        toRelease1.Add(new CommandLabel.CommandInfo()
                        {
                            Text             = actionName,
                            Icon             = sprite,
                            IsHold           = false,
                            TargetSpriteInfo = icon.ActionSpriteInfo,
                            Transform        = transform,
                            Event            = (System.Action)(() => pair.Value.Item3(Singleton <Manager.Map> .Instance.Player, (ActionPoint)doorPoint))
                        });
                        if (actionPointInfo.doorOpenType > -1)
                        {
                            this._openType = (DoorPoint.OpenTypeState)actionPointInfo.doorOpenType;
                        }
                    }
                    else if (pair.Key == EventType.DoorClose)
                    {
                        toRelease2.Add(new CommandLabel.CommandInfo()
                        {
                            Text             = actionName,
                            Icon             = sprite,
                            IsHold           = false,
                            TargetSpriteInfo = icon.ActionSpriteInfo,
                            Transform        = transform,
                            Event            = (System.Action)(() => pair.Value.Item3(Singleton <Manager.Map> .Instance.Player, (ActionPoint)doorPoint))
                        });
                        if (actionPointInfo.doorOpenType > -1)
                        {
                            this._openType = (DoorPoint.OpenTypeState)actionPointInfo.doorOpenType;
                        }
                    }
                }
            }
            this._openingLabels = toRelease1.ToArray();
            this._closingLabels = toRelease2.ToArray();
            ListPool <CommandLabel.CommandInfo> .Release(toRelease1);

            ListPool <CommandLabel.CommandInfo> .Release(toRelease2);

            List <CommandLabel.CommandInfo> toRelease3 = ListPool <CommandLabel.CommandInfo> .Get();

            List <CommandLabel.CommandInfo> toRelease4 = ListPool <CommandLabel.CommandInfo> .Get();

            foreach (KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > keyValuePair in ActionPoint.SickLabelTable)
            {
                KeyValuePair <EventType, Tuple <int, string, System.Action <PlayerActor, ActionPoint> > > pair = keyValuePair;
                DoorPoint doorPoint = this;
                if (this._playerEventType.Contains(pair.Key) && AIProject.Definitions.Action.NameTable.TryGetValue(pair.Key, out ValueTuple <int, string> _))
                {
                    ActionPointInfo actionPointInfo = this._playerInfos.Find((Predicate <ActionPointInfo>)(x => x.eventTypeMask == pair.Key));
                    string          actionName      = actionPointInfo.actionName;
                    Sprite          sprite;
                    Singleton <Resources> .Instance.itemIconTables.ActionIconTable.TryGetValue(actionPointInfo.iconID, out sprite);

                    Transform transform = ((Component)this).get_transform().FindLoop(actionPointInfo.labelNullName)?.get_transform() ?? ((Component)this).get_transform();
                    if (pair.Key == EventType.DoorOpen)
                    {
                        toRelease3.Add(new CommandLabel.CommandInfo()
                        {
                            Text             = actionName,
                            Icon             = sprite,
                            IsHold           = false,
                            TargetSpriteInfo = icon.ActionSpriteInfo,
                            Transform        = transform,
                            Event            = (System.Action)(() => pair.Value.Item3(Singleton <Manager.Map> .Instance.Player, (ActionPoint)doorPoint))
                        });
                        if (actionPointInfo.doorOpenType > -1)
                        {
                            this._openType = (DoorPoint.OpenTypeState)actionPointInfo.doorOpenType;
                        }
                    }
                    else if (pair.Key == EventType.DoorClose)
                    {
                        toRelease4.Add(new CommandLabel.CommandInfo()
                        {
                            Text             = actionName,
                            Icon             = sprite,
                            IsHold           = false,
                            TargetSpriteInfo = icon.ActionSpriteInfo,
                            Transform        = transform,
                            Event            = (System.Action)(() => pair.Value.Item3(Singleton <Manager.Map> .Instance.Player, (ActionPoint)doorPoint))
                        });
                        if (actionPointInfo.doorOpenType > -1)
                        {
                            this._openType = (DoorPoint.OpenTypeState)actionPointInfo.doorOpenType;
                        }
                    }
                }
            }
            this._sickOpeningLabels = toRelease3.ToArray();
            this._sickClosingLabels = toRelease4.ToArray();
            ListPool <CommandLabel.CommandInfo> .Release(toRelease3);

            ListPool <CommandLabel.CommandInfo> .Release(toRelease4);
        }