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; }
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; }
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; }