using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using AnySilkBoss.Source.Actions; using AnySilkBoss.Source.Behaviours.Common; using AnySilkBoss.Source.Behaviours.Memory; using AnySilkBoss.Source.Behaviours.Normal; using AnySilkBoss.Source.Handlers; using AnySilkBoss.Source.Managers; using AnySilkBoss.Source.Patches; using AnySilkBoss.Source.Tools; using BepInEx; using BepInEx.Logging; using GlobalEnums; using GlobalSettings; using HarmonyLib; using HutongGames.PlayMaker; using HutongGames.PlayMaker.Actions; using Microsoft.CodeAnalysis; using TMProOld; using TeamCherry.Localization; using TeamCherry.SharedUtils; using UnityEngine; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("AnySilkBoss")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("0.2.2.0")] [assembly: AssemblyInformationalVersion("0.2.2+cfe610e7b6873c430a5eca4f987ab57a6eb0994d")] [assembly: AssemblyProduct("AnySilkBoss")] [assembly: AssemblyTitle("AnySilkBoss")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.2.2.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace AnySilkBoss { public static class MyPluginInfo { public const string PLUGIN_GUID = "AnySilkBoss"; public const string PLUGIN_NAME = "AnySilkBoss"; public const string PLUGIN_VERSION = "0.2.2"; } } namespace AnySilkBoss.Source { [BepInPlugin("AnySilkBoss", "AnySilkBoss", "0.2.2")] public class Plugin : BaseUnityPlugin { [CompilerGenerated] private sealed class d__27 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Plugin <>4__this; private Exception 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__27(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; case 1: <>1__state = -1; try { _harmony = new Harmony("AnySilkBoss"); _harmony.PatchAll(typeof(BossPatches)); _harmony.PatchAll(typeof(I18nPatches)); _harmony.PatchAll(typeof(DamageReductionPatches)); _harmony.PatchAll(typeof(MemoryCustomSceneManagerPatch)); _harmony.PatchAll(typeof(MemorySceneTransitionPatch)); _harmony.PatchAll(typeof(MemoryClashTinkPatch)); _harmony.PatchAll(typeof(MemoryParryDownspikePatch)); _harmony.PatchAll(typeof(HeroDamageStackPatch)); _harmony.PatchAll(typeof(HeroControllerDeathPatches)); _harmony.PatchAll(typeof(GameManagerRespawnPatches)); _harmony.PatchAll(typeof(ToolItemPatches)); AudioHandler.Initialize(); AudioHandler.ApplyPatches(_harmony); Log.Info("Harmony patches applied successfully"); } catch (Exception ex) { 5__1 = ex; Log.Error("Failed to apply Harmony patches: " + 5__1.Message); Log.Error("Stack trace: " + 5__1.StackTrace); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__29 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Plugin <>4__this; private SilkBallManager 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__29(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: { <>1__state = -1; GameObject anySilkBossManager = <>4__this.AnySilkBossManager; 5__1 = ((anySilkBossManager != null) ? anySilkBossManager.GetComponent() : null); if ((Object)(object)5__1 != (Object)null) { 5__1.ReinitializeOnEnterGame(); } return false; } } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__31 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__31(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(2.5f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.ResetBossPlatforms(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private static Harmony _harmony; private GameObject AnySilkBossManager = null; public static Plugin Instance { get; private set; } public static bool IsBossSaveLoaded { get; set; } public static string OriginalSaveBackupPath { get; set; } public static bool IsInBossRoom { get; set; } public static string CurrentSaveFileName { get; set; } public static Texture2D? BoulderTexture { get; private set; } private void Awake() { Log.Init(((BaseUnityPlugin)this).Logger); Instance = this; LoadEmbeddedTextures(); SceneManager.activeSceneChanged += OnSceneChange; ((MonoBehaviour)this).StartCoroutine(DelayedPatchApplication()); Log.Info("AnySilkBoss plugin loaded!"); } [IteratorStateMachine(typeof(d__27))] private IEnumerator DelayedPatchApplication() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__27(0) { <>4__this = this }; } private void OnSceneChange(Scene oldScene, Scene newScene) { IsInBossRoom = ((Scene)(ref newScene)).name == "Cradle_03"; if (((Scene)(ref newScene)).name == "Menu_Title") { Log.Info("[Plugin] 切换到主菜单,清空丝球池和缓存..."); GameObject anySilkBossManager = AnySilkBossManager; SilkBallManager silkBallManager = ((anySilkBossManager != null) ? anySilkBossManager.GetComponent() : null); if ((Object)(object)silkBallManager != (Object)null) { silkBallManager.ResetOnReturnToMenu(); } return; } if (((Scene)(ref newScene)).name == "Cradle_03") { ((MonoBehaviour)this).StartCoroutine(ResetBossPlatformsDelay()); DamageStackManager.Reset(); } if (((Scene)(ref oldScene)).name == "Menu_Title") { CreateManager(); ((MonoBehaviour)this).StartCoroutine(ReinitializeSilkBallManagerDelayed()); } } [IteratorStateMachine(typeof(d__29))] private IEnumerator ReinitializeSilkBallManagerDelayed() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__29(0) { <>4__this = this }; } private void CreateManager() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown AnySilkBossManager = GameObject.Find("AnySilkBossManager"); if ((Object)(object)AnySilkBossManager == (Object)null) { AnySilkBossManager = new GameObject("AnySilkBossManager"); Object.DontDestroyOnLoad((Object)(object)AnySilkBossManager); AssetManager assetManager = AnySilkBossManager.AddComponent(); AnySilkBossManager.AddComponent(); AnySilkBossManager.AddComponent(); AnySilkBossManager.AddComponent(); AnySilkBossManager.AddComponent(); AnySilkBossManager.AddComponent(); AnySilkBossManager.AddComponent(); AnySilkBossManager.AddComponent(); AnySilkBossManager.AddComponent(); AnySilkBossManager.AddComponent(); Log.Info("创建持久化管理器和所有组件"); ((MonoBehaviour)this).StartCoroutine(assetManager.PreloadAllExternalAssets()); } else { Log.Info("找到已存在的持久化管理器"); } } [IteratorStateMachine(typeof(d__31))] private IEnumerator ResetBossPlatformsDelay() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__31(0) { <>4__this = this }; } private void ResetBossPlatforms() { //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) try { if (IsInBossRoom) { GameObject[] source = Resources.FindObjectsOfTypeAll(); List list = source.Where((GameObject x) => ((Object)x).name.Contains("cradle_plat") && !((Object)x).name.Contains("spike")).ToList(); List list2 = source.Where((GameObject x) => ((Object)x).name.Contains("cradle_spike_plat")).ToList(); foreach (GameObject item in list) { Transform val = item.transform.Find("crank_hit"); if ((Object)(object)val != (Object)null) { ((Component)val).gameObject.SetActive(false); } switch (((Object)item).name) { case "cradle_plat (6)": item.transform.position = new Vector3(39.81f, 58.35f, -0.2602f); Log.Info("重置 " + ((Object)item).name + " 的位置"); break; case "cradle_plat (1)": item.transform.position = new Vector3(49.01f, 64.94f, -0.2602f); Log.Info("重置 " + ((Object)item).name + " 的位置"); break; case "cradle_plat (7)": item.transform.position = new Vector3(31.81f, 80.87f, -0.2602f); Log.Info("重置 " + ((Object)item).name + " 的位置"); break; case "cradle_plat (8)": item.transform.position = new Vector3(48.9f, 93.74f, -0.2602f); Log.Info("重置 " + ((Object)item).name + " 的位置"); break; case "cradle_plat": item.transform.position = new Vector3(31.27f, 108.25f, -0.2602f); Log.Info("重置 " + ((Object)item).name + " 的位置"); break; } } foreach (GameObject item2 in list2) { Transform val2 = item2.transform.Find("spikes hit"); if ((Object)(object)val2 != (Object)null) { DamageHero component = ((Component)val2).GetComponent(); if ((Object)(object)component != (Object)null) { component.damageDealt = 2; component.hazardType = (HazardType)0; } } else { Log.Warn(((Object)item2).name + " 没有找到子物品 spikes hit"); } } } if ((Object)(object)GameManager.instance == (Object)null) { Log.Warn("GameManager.instance 为 null,无法重置平台"); return; } SceneData sceneData = GameManager.instance.sceneData; if (sceneData == null) { Log.Warn("sceneData 为 null,无法重置平台"); return; } if (sceneData.persistentBools == null) { Log.Warn("persistentBools 为 null,无法重置平台"); return; } if (((PersistentItemDataCollection)(object)sceneData.persistentBools).serializedList == null) { Log.Warn("serializedList 为 null,无法重置平台"); return; } List list3 = ((PersistentItemDataCollection)(object)sceneData.persistentBools).serializedList.FindAll((SerializableBoolData x) => ((SerializableItemData)(object)x).SceneName == "Cradle_03" && ((SerializableItemData)(object)x).ID.Contains("plat")); if (list3.Count == 0) { return; } int num = 0; foreach (SerializableBoolData item3 in list3) { bool value = ((SerializableItemData)(object)item3).Value; ((SerializableItemData)(object)item3).Value = false; num++; } } catch (Exception ex) { Log.Error("重置平台失败: " + ex.Message); Log.Error("堆栈跟踪: " + ex.StackTrace); } } private void LoadEmbeddedTextures() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown Assembly executingAssembly = Assembly.GetExecutingAssembly(); string[] manifestResourceNames = executingAssembly.GetManifestResourceNames(); foreach (string text in manifestResourceNames) { using Stream stream = executingAssembly.GetManifestResourceStream(text); if (stream != null && text.Contains("SLIK")) { byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); BoulderTexture = new Texture2D(2, 2); ImageConversion.LoadImage(BoulderTexture, array); ((Texture)BoulderTexture).filterMode = (FilterMode)0; ((Texture)BoulderTexture).wrapMode = (TextureWrapMode)1; Log.Info("成功加载 Boulder 贴图: " + text); } } } private void OnDestroy() { _harmony.UnpatchSelf(); } } } namespace AnySilkBoss.Source.Tools { internal static class FsmAnalyzer { public static void WriteFsmReport(PlayMakerFSM fsm, string outputPath) { if ((Object)(object)fsm == (Object)null) { return; } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendLine("=== FSM 报告: " + fsm.FsmName + " ==="); stringBuilder.AppendLine("当前状态: " + fsm.ActiveStateName); FsmState[] fsmStates = fsm.FsmStates; stringBuilder.AppendLine($"\n--- 所有状态 ({fsmStates.Length}个) ---"); FsmState[] array = fsmStates; foreach (FsmState val in array) { stringBuilder.AppendLine("状态: " + val.Name); } FsmEvent[] fsmEvents = fsm.FsmEvents; stringBuilder.AppendLine($"\n--- 所有事件 ({fsmEvents.Length}个) ---"); FsmEvent[] array2 = fsmEvents; foreach (FsmEvent val2 in array2) { stringBuilder.AppendLine("事件: " + val2.Name); } FsmTransition[] fsmGlobalTransitions = fsm.FsmGlobalTransitions; stringBuilder.AppendLine($"\n--- 所有全局转换 ({fsmGlobalTransitions.Length}个) ---"); FsmTransition[] array3 = fsmGlobalTransitions; foreach (FsmTransition val3 in array3) { FsmEvent fsmEvent = val3.FsmEvent; stringBuilder.AppendLine("全局转换: " + ((fsmEvent != null) ? fsmEvent.Name : null) + " -> " + val3.toState); } stringBuilder.AppendLine("\n--- 各状态转换与动作 ---"); FsmState[] array4 = fsmStates; foreach (FsmState val4 in array4) { stringBuilder.AppendLine("状态 " + val4.Name + " 的转换:"); if (val4.Transitions != null && val4.Transitions.Length != 0) { FsmTransition[] transitions = val4.Transitions; foreach (FsmTransition val5 in transitions) { FsmEvent fsmEvent2 = val5.FsmEvent; stringBuilder.AppendLine(" " + ((fsmEvent2 != null) ? fsmEvent2.Name : null) + " -> " + val5.toState); } } else { stringBuilder.AppendLine(" (无转换)"); } if (val4.Actions != null && val4.Actions.Length != 0) { stringBuilder.AppendLine($"动作 ({val4.Actions.Length}个):"); for (int n = 0; n < val4.Actions.Length; n++) { FsmStateAction val6 = val4.Actions[n]; stringBuilder.AppendLine($" [{n}] {((object)val6).GetType().Name}"); AnalyzeActionVariables(stringBuilder, val6, n); } } else { stringBuilder.AppendLine("动作: 无"); } } FsmVariables fsmVariables = fsm.FsmVariables; stringBuilder.AppendLine("\n--- 变量 ---"); stringBuilder.AppendLine($"Bool: {fsmVariables.BoolVariables.Length}, Int: {fsmVariables.IntVariables.Length}, Float: {fsmVariables.FloatVariables.Length}, String: {fsmVariables.StringVariables.Length}"); FsmFloat[] floatVariables = fsmVariables.FloatVariables; foreach (FsmFloat val7 in floatVariables) { stringBuilder.AppendLine($"Float {((NamedVariable)val7).Name} = {val7.Value}"); } FsmBool[] boolVariables = fsmVariables.BoolVariables; foreach (FsmBool val8 in boolVariables) { stringBuilder.AppendLine($"Bool {((NamedVariable)val8).Name} = {val8.Value}"); } FsmInt[] intVariables = fsmVariables.IntVariables; foreach (FsmInt val9 in intVariables) { stringBuilder.AppendLine($"Int {((NamedVariable)val9).Name} = {val9.Value}"); } FsmString[] stringVariables = fsmVariables.StringVariables; foreach (FsmString val10 in stringVariables) { stringBuilder.AppendLine("String " + ((NamedVariable)val10).Name + " = " + val10.Value); } Directory.CreateDirectory(Path.GetDirectoryName(outputPath) ?? "."); File.WriteAllText(outputPath, stringBuilder.ToString(), Encoding.UTF8); } private static void AnalyzeActionVariables(StringBuilder sb, FsmStateAction action, int actionIndex) { try { Type type = ((object)action).GetType(); FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public); sb.AppendLine($" 行为 {actionIndex} 的变量:"); FieldInfo[] array = fields; foreach (FieldInfo fieldInfo in array) { object value = fieldInfo.GetValue(action); if (value == null) { continue; } sb.AppendLine($" {fieldInfo.Name}: {value} ({value.GetType().Name})"); FsmFloat val = (FsmFloat)((value is FsmFloat) ? value : null); if (val != null) { sb.AppendLine($" -> FsmFloat值: {val.Value}"); if (((NamedVariable)val).UseVariable && ((NamedVariable)val).Name != null) { sb.AppendLine(" -> 使用变量: " + ((NamedVariable)val).Name); } continue; } FsmString val2 = (FsmString)((value is FsmString) ? value : null); if (val2 != null) { sb.AppendLine(" -> FsmString值: " + val2.Value); if (((NamedVariable)val2).UseVariable && ((NamedVariable)val2).Name != null) { sb.AppendLine(" -> 使用变量: " + ((NamedVariable)val2).Name); } continue; } FsmBool val3 = (FsmBool)((value is FsmBool) ? value : null); if (val3 != null) { sb.AppendLine($" -> FsmBool值: {val3.Value}"); if (((NamedVariable)val3).UseVariable && ((NamedVariable)val3).Name != null) { sb.AppendLine(" -> 使用变量: " + ((NamedVariable)val3).Name); } continue; } FsmInt val4 = (FsmInt)((value is FsmInt) ? value : null); if (val4 != null) { sb.AppendLine($" -> FsmInt值: {val4.Value}"); if (((NamedVariable)val4).UseVariable && ((NamedVariable)val4).Name != null) { sb.AppendLine(" -> 使用变量: " + ((NamedVariable)val4).Name); } continue; } FsmGameObject val5 = (FsmGameObject)((value is FsmGameObject) ? value : null); if (val5 != null) { AnalyzeFsmGameObject(sb, val5, action); continue; } FsmOwnerDefault val6 = (FsmOwnerDefault)((value is FsmOwnerDefault) ? value : null); if (val6 != null) { AnalyzeFsmOwnerDefault(sb, val6, action); continue; } FsmEvent val7 = (FsmEvent)((value is FsmEvent) ? value : null); if (val7 != null) { sb.AppendLine(" -> FsmEvent: " + val7.Name); continue; } GameObject val8 = (GameObject)((value is GameObject) ? value : null); if (val8 != null) { sb.AppendLine(" -> GameObject名称: " + ((Object)val8).name); sb.AppendLine(" -> GameObject路径: " + GetGameObjectPath(val8)); } } } catch (Exception ex) { sb.AppendLine($" 分析行为 {actionIndex} 变量时出错: {ex.Message}"); } } private static void AnalyzeFsmGameObject(StringBuilder sb, FsmGameObject fsmGameObject, FsmStateAction action) { sb.AppendLine(" -> FsmGameObject详情:"); if (((NamedVariable)fsmGameObject).UseVariable) { sb.AppendLine(" 使用变量: " + ((NamedVariable)fsmGameObject).Name); } GameObject value = fsmGameObject.Value; if ((Object)(object)value != (Object)null) { sb.AppendLine(" GameObject名称: " + ((Object)value).name); sb.AppendLine(" GameObject路径: " + GetGameObjectPath(value)); sb.AppendLine($" 是否激活: {value.activeSelf}"); Component[] components = value.GetComponents(); if (components.Length != 0) { sb.AppendLine(" 组件列表: " + string.Join(", ", components.Select((Component c) => ((object)c).GetType().Name))); } } else { sb.AppendLine(" GameObject值: null (可能在运行时设置)"); } } private static void AnalyzeFsmOwnerDefault(StringBuilder sb, FsmOwnerDefault fsmOwnerDefault, FsmStateAction action) { sb.AppendLine(" -> FsmOwnerDefault详情:"); try { FieldInfo field = ((object)fsmOwnerDefault).GetType().GetField("OwnerOption"); if (field != null) { object value = field.GetValue(fsmOwnerDefault); sb.AppendLine($" OwnerOption: {value}"); } } catch { } try { PropertyInfo property = ((object)fsmOwnerDefault).GetType().GetProperty("GameObject"); if (property != null) { object? value2 = property.GetValue(fsmOwnerDefault); FsmGameObject val = (FsmGameObject)((value2 is FsmGameObject) ? value2 : null); if (val != null && (Object)(object)val.Value != (Object)null) { sb.AppendLine(" 指定GameObject名称: " + ((Object)val.Value).name); sb.AppendLine(" 指定GameObject路径: " + GetGameObjectPath(val.Value)); } } } catch { } if (action.Fsm != null && (Object)(object)action.Fsm.GameObject != (Object)null) { sb.AppendLine(" Owner(FSM宿主)名称: " + ((Object)action.Fsm.GameObject).name); sb.AppendLine(" Owner(FSM宿主)路径: " + GetGameObjectPath(action.Fsm.GameObject)); } } private static string GetGameObjectPath(GameObject obj) { if ((Object)(object)obj == (Object)null) { return "null"; } string text = ((Object)obj).name; Transform parent = obj.transform.parent; while ((Object)(object)parent != (Object)null) { text = ((Object)parent).name + "/" + text; parent = parent.parent; } return text; } } public static class FsmStateBuilder { public struct StateDefinition { public string Name; public string Description; public StateDefinition(string name, string description = "") { Name = name; Description = description; } } public static FsmState CreateState(Fsm fsm, string name, string description = "") { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown return new FsmState(fsm) { Name = name, Description = description }; } public static FsmState CreateState(PlayMakerFSM pmFsm, string name, string description = "") { return CreateState(pmFsm.Fsm, name, description); } public static FsmState CreateAndAddState(PlayMakerFSM pmFsm, string name, string description = "") { FsmState val = CreateState(pmFsm.Fsm, name, description); AddStateToFsm(pmFsm, val); return val; } public static void AddStateToFsm(PlayMakerFSM pmFsm, FsmState state) { List list = pmFsm.Fsm.States.ToList(); list.Add(state); pmFsm.Fsm.States = list.ToArray(); } public static void AddStatesToFsm(PlayMakerFSM pmFsm, params FsmState[] statesToAdd) { List list = pmFsm.Fsm.States.ToList(); list.AddRange(statesToAdd); pmFsm.Fsm.States = list.ToArray(); } public static FsmState[] CreateStates(Fsm fsm, params StateDefinition[] definitions) { FsmState[] array = (FsmState[])(object)new FsmState[definitions.Length]; for (int i = 0; i < definitions.Length; i++) { array[i] = CreateState(fsm, definitions[i].Name, definitions[i].Description); } return array; } public static FsmState[] CreateStates(Fsm fsm, params (string name, string description)[] definitions) { FsmState[] array = (FsmState[])(object)new FsmState[definitions.Length]; for (int i = 0; i < definitions.Length; i++) { array[i] = CreateState(fsm, definitions[i].name, definitions[i].description); } return array; } public static FsmState[] CreateAndAddStates(PlayMakerFSM pmFsm, params (string name, string description)[] definitions) { FsmState[] array = CreateStates(pmFsm.Fsm, definitions); AddStatesToFsm(pmFsm, array); return array; } public static FsmState? FindState(PlayMakerFSM pmFsm, string stateName) { string stateName2 = stateName; return ((IEnumerable)pmFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == stateName2)); } public static bool StateExists(PlayMakerFSM pmFsm, string stateName) { string stateName2 = stateName; return pmFsm.FsmStates.Any((FsmState s) => s.Name == stateName2); } public static FsmState GetOrCreateState(PlayMakerFSM pmFsm, string name, string description = "") { FsmState val = FindState(pmFsm, name); if (val != null) { return val; } return CreateAndAddState(pmFsm, name, description); } public static FsmTransition CreateFinishedTransition(FsmState targetState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown return new FsmTransition { FsmEvent = FsmEvent.Finished, toState = targetState.Name, toFsmState = targetState }; } public static FsmTransition CreateTransition(FsmEvent fsmEvent, FsmState targetState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown return new FsmTransition { FsmEvent = fsmEvent, toState = targetState.Name, toFsmState = targetState }; } public static void SetFinishedTransition(FsmState state, FsmState targetState) { state.Transitions = (FsmTransition[])(object)new FsmTransition[1] { CreateFinishedTransition(targetState) }; } public static void AddTransition(FsmState state, FsmTransition transition) { List list = state.Transitions?.ToList() ?? new List(); list.Add(transition); state.Transitions = list.ToArray(); } public static FsmEvent GetOrCreateEvent(PlayMakerFSM pmFsm, string eventName) { FsmEvent fsmEvent = FsmEvent.GetFsmEvent(eventName); List list = pmFsm.Fsm.Events.ToList(); if (!list.Contains(fsmEvent)) { list.Add(fsmEvent); pmFsm.Fsm.Events = list.ToArray(); } return fsmEvent; } public static FsmEvent[] RegisterEvents(PlayMakerFSM pmFsm, params string[] eventNames) { List list = pmFsm.Fsm.Events.ToList(); FsmEvent[] array = (FsmEvent[])(object)new FsmEvent[eventNames.Length]; for (int i = 0; i < eventNames.Length; i++) { array[i] = FsmEvent.GetFsmEvent(eventNames[i]); if (!list.Contains(array[i])) { list.Add(array[i]); } } pmFsm.Fsm.Events = list.ToArray(); return array; } public static void ReinitializeFsm(PlayMakerFSM pmFsm) { } public static void ReinitializeFsmVariables(PlayMakerFSM pmFsm) { pmFsm.FsmVariables.Init(); } } internal static class Log { private static ManualLogSource? _logSource; private static string LogPrefix => $"[{Assembly.GetExecutingAssembly().GetName().Version}] "; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object debug) { ManualLogSource? logSource = _logSource; if (logSource != null) { logSource.LogDebug((object)(LogPrefix + debug)); } } internal static void Error(object error) { ManualLogSource? logSource = _logSource; if (logSource != null) { logSource.LogError((object)(LogPrefix + error)); } } internal static void Fatal(object fatal) { ManualLogSource? logSource = _logSource; if (logSource != null) { logSource.LogFatal((object)(LogPrefix + fatal)); } } internal static void Info(object info) { ManualLogSource? logSource = _logSource; if (logSource != null) { logSource.LogInfo((object)(LogPrefix + info)); } } internal static void Message(object message) { ManualLogSource? logSource = _logSource; if (logSource != null) { logSource.LogMessage((object)(LogPrefix + message)); } } internal static void Warn(object warning) { ManualLogSource? logSource = _logSource; if (logSource != null) { logSource.LogWarning((object)(LogPrefix + warning)); } } } } namespace AnySilkBoss.Source.Patches { internal static class BossPatches { [HarmonyPrefix] [HarmonyPatch(typeof(PlayMakerFSM), "Start")] private static void ModifyBoss(PlayMakerFSM __instance) { if (((Object)__instance).name == "Silk Boss" && __instance.FsmName == "Control") { HandleBossControl(__instance); } else if (((Object)__instance).name == "Silk Boss" && __instance.FsmName == "Stun Control") { HandleStunControl(__instance); } else if (((Object)__instance).name == "Silk Boss" && __instance.FsmName == "Phase Control") { HandlePhaseControl(__instance); } else if (((Object)__instance).name == "Silk Boss" && __instance.FsmName == "Attack Control") { HandleAttackControl(__instance); } else if ((((Object)__instance).name == "Rubble Field M" || ((Object)__instance).name == "Rubble Field L" || ((Object)__instance).name == "Rubble Field R") && __instance.FsmName == "FSM") { HandleRubbleField(__instance); } else if (((Object)__instance).name.Contains("Silk Boulder") && __instance.FsmName == "Control") { HandleSilkBoulder(__instance); } } private static void HandleBossControl(PlayMakerFSM __instance) { if (MemoryManager.IsInMemoryMode) { BossBehavior component = ((Component)__instance).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); Log.Info("[Memory模式] 移除普通BossBehavior组件"); } if ((Object)(object)((Component)__instance).gameObject.GetComponent() == (Object)null) { ((Component)__instance).gameObject.AddComponent(); Log.Info("[Memory模式] 添加梦境版 MemoryBossBehavior 组件"); } DamageReductionManager component2 = ((Component)__instance).gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { Object.Destroy((Object)(object)component2); Log.Info("[Memory模式] 移除普通DamageReductionManager组件"); } if ((Object)(object)((Component)__instance).gameObject.GetComponent() == (Object)null) { ((Component)__instance).gameObject.AddComponent(); Log.Info("[Memory模式] 添加梦境版 MemoryDamageReductionManager 组件"); } } else { MemoryBossBehavior component3 = ((Component)__instance).gameObject.GetComponent(); if ((Object)(object)component3 != (Object)null) { Object.Destroy((Object)(object)component3); Log.Info("[普通模式] 移除梦境版 MemoryBossBehavior 组件"); } if ((Object)(object)((Component)__instance).gameObject.GetComponent() == (Object)null) { ((Component)__instance).gameObject.AddComponent(); Log.Info("检测到没有BossBehavior组件,添加BossBehavior组件"); } MemoryDamageReductionManager component4 = ((Component)__instance).gameObject.GetComponent(); if ((Object)(object)component4 != (Object)null) { Object.Destroy((Object)(object)component4); Log.Info("[普通模式] 移除梦境版 MemoryDamageReductionManager 组件"); } if ((Object)(object)((Component)__instance).gameObject.GetComponent() == (Object)null) { ((Component)__instance).gameObject.AddComponent(); Log.Info("添加DamageReductionManager组件,启用动态减伤系统"); } } } private static void HandleStunControl(PlayMakerFSM __instance) { if (MemoryManager.IsInMemoryMode) { StunControlBehavior component = ((Component)__instance).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); Log.Info("[Memory模式] 移除普通StunControlBehavior组件"); } if ((Object)(object)((Component)__instance).gameObject.GetComponent() == (Object)null) { ((Component)__instance).gameObject.AddComponent(); Log.Info("[Memory模式] 添加梦境版 MemoryStunControlBehavior 组件"); } } else { MemoryStunControlBehavior component2 = ((Component)__instance).gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { Object.Destroy((Object)(object)component2); Log.Info("[普通模式] 移除梦境版 MemoryStunControlBehavior 组件"); } if ((Object)(object)((Component)__instance).gameObject.GetComponent() == (Object)null) { ((Component)__instance).gameObject.AddComponent(); Log.Info("检测到没有StunControlBehavior组件,添加StunControlBehavior组件"); } } } private static void HandlePhaseControl(PlayMakerFSM __instance) { if (MemoryManager.IsInMemoryMode) { PhaseControlBehavior component = ((Component)__instance).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); Log.Info("[Memory模式] 移除普通 PhaseControlBehavior 组件"); } if ((Object)(object)((Component)__instance).gameObject.GetComponent() == (Object)null) { ((Component)__instance).gameObject.AddComponent(); Log.Info("[Memory模式] 添加梦境版 MemoryPhaseControl 组件"); } } else { MemoryPhaseControlBehavior component2 = ((Component)__instance).gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { Object.Destroy((Object)(object)component2); Log.Info("[普通模式] 移除梦境版 MemoryPhaseControl 组件"); } if ((Object)(object)((Component)__instance).gameObject.GetComponent() == (Object)null) { ((Component)__instance).gameObject.AddComponent(); Log.Info("[普通模式] 添加 PhaseControlBehavior 组件"); } } } private static void HandleAttackControl(PlayMakerFSM __instance) { if (MemoryManager.IsInMemoryMode) { AttackControlBehavior component = ((Component)__instance).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); Log.Info("[Memory模式] 移除普通 AttackControlBehavior 组件"); } if ((Object)(object)((Component)__instance).gameObject.GetComponent() == (Object)null) { ((Component)__instance).gameObject.AddComponent(); Log.Info("[Memory模式] 添加梦境版 MemoryAttackControlBehavior 组件"); } } else { MemoryAttackControlBehavior component2 = ((Component)__instance).gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { Object.Destroy((Object)(object)component2); Log.Info("[普通模式] 移除梦境版 MemoryAttackControlBehavior 组件"); } if ((Object)(object)((Component)__instance).gameObject.GetComponent() == (Object)null) { ((Component)__instance).gameObject.AddComponent(); Log.Info("检测到没有AttackControlBehavior组件,添加AttackControlBehavior组件"); } } } private static void HandleRubbleField(PlayMakerFSM __instance) { if ((Object)(object)((Component)__instance).gameObject.GetComponent() == (Object)null) { ((Component)__instance).gameObject.AddComponent(); Log.Info("检测到没有RubbleFieldBehavior组件,添加RubbleFieldBehavior组件"); } } private static void HandleSilkBoulder(PlayMakerFSM __instance) { if ((Object)(object)((Component)__instance).gameObject.GetComponent() == (Object)null) { ((Component)__instance).gameObject.AddComponent(); } } } internal static class DamageReductionPatches { [HarmonyPrefix] [HarmonyPatch(typeof(HealthManager), "TakeDamage")] public static void Prefix(HealthManager __instance, ref HitInstance hitInstance) { if (((Object)((Component)__instance).gameObject).name != "Silk Boss") { return; } DamageReductionManager component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null) { Log.Error("[减伤系统] ❌ 未找到DamageReductionManager组件!"); return; } int damageDealt = hitInstance.DamageDealt; float num = component.CalculateReductionForIncomingDamage(damageDealt); if (num <= 0f) { component.RecordReducedDamage(damageDealt); return; } float num2 = DamageReductionManager.ApplyReductionRatio(damageDealt, num); int num3 = (hitInstance.DamageDealt = Mathf.Max(1, Mathf.RoundToInt(num2))); component.RecordReducedDamage(num3); Log.Info($"[减伤系统] 原始伤害: {damageDealt} → 减伤后: {num3} (减伤率: {num:P0})"); } } [HarmonyPatch(typeof(HeroController))] internal static class HeroControllerDeathPatches { [HarmonyPostfix] [HarmonyPatch("Die")] private static void OnPlayerDiePostfix(bool nonLethal) { try { BigSilkBallManager.Instance?.ResetBigSilkBallPhaseEffects("hero death"); if ((Object)(object)DeathManager.Instance != (Object)null && MemoryManager.IsInMemoryMode && MemoryManager.IsCurrentPlayerHornet()) { Log.Info($"[DeathManager] 梦境中死亡,nonLethal={nonLethal},设置等待重生标志"); DeathManager.Instance.SetWaitingForMemoryRespawn(); } } catch (Exception ex) { Log.Error("[DeathManager] Die 补丁失败: " + ex.Message); } } } [HarmonyPatch(typeof(GameManager))] internal static class GameManagerRespawnPatches { [HarmonyPostfix] [HarmonyPatch("GetRespawnInfo")] private static void OnGetRespawnInfoPostfix(ref string scene, ref string marker) { try { if (MemoryManager.IsInMemoryMode) { if (!MemoryManager.IsCurrentPlayerHornet()) { Log.Info("[DeathManager] 非大黄蜂玩家梦境死亡,保留原重生信息: " + scene + "/" + marker); return; } string text = scene; string text2 = marker; scene = "Cradle_03"; marker = "MemoryRespawnMarker"; Log.Info("[DeathManager] 梦境模式修改重生信息: " + text + "/" + text2 + " → " + scene + "/" + marker); } } catch (Exception ex) { Log.Error("[DeathManager] GetRespawnInfo 补丁失败: " + ex.Message); } } } internal static class I18nPatches { [HarmonyPostfix] [HarmonyPatch(typeof(Language), "Get", new Type[] { typeof(string), typeof(string) })] private static void ChangeBossTitle(string key, string sheetTitle, ref string __result) { //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Invalid comparison between Unknown and I4 //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Invalid comparison between Unknown and I4 //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Invalid comparison between Unknown and I4 //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Invalid comparison between Unknown and I4 //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Invalid comparison between Unknown and I4 //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Invalid comparison between Unknown and I4 //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Invalid comparison between Unknown and I4 try { if (new Func(Language.CurrentLanguage) == null || !Plugin.IsInBossRoom) { return; } string text2; if (MemoryManager.IsInMemoryMode) { if (1 == 0) { } if (!(key == "SILK_SUPER")) { if (key == "SILK_MAIN") { LanguageCode val = Language.CurrentLanguage(); if (1 == 0) { } string text = (((int)val == 44) ? "Dawn" : (((int)val != 199) ? __result : "破晓")); if (1 == 0) { } text2 = text; } else { text2 = __result; } } else { LanguageCode val2 = Language.CurrentLanguage(); if (1 == 0) { } string text = (((int)val2 == 44) ? "Astral Oblivion" : (((int)val2 != 199) ? __result : "苍耀归墟")); if (1 == 0) { } text2 = text; } if (1 == 0) { } __result = text2; return; } if (1 == 0) { } if (!(key == "SILK_SUPER")) { if (key == "SILK_MAIN") { LanguageCode val3 = Language.CurrentLanguage(); if (1 == 0) { } string text = (((int)val3 == 44) ? "Silk" : (((int)val3 != 199) ? __result : "灵丝")); if (1 == 0) { } text2 = text; } else { text2 = __result; } } else { LanguageCode val4 = Language.CurrentLanguage(); if (1 == 0) { } string text = (((int)val4 == 44) ? "Loombinder Matriarch" : (((int)val4 != 199) ? __result : "织狱圣母")); if (1 == 0) { } text2 = text; } if (1 == 0) { } __result = text2; } catch (Exception ex) { Log.Error("Language.Get补丁执行失败: " + ex.Message); } } } [HarmonyPatch(typeof(CustomSceneManager), "UpdateSceneSettings")] internal static class MemoryCustomSceneManagerPatch { private const string TargetScene = "Cradle_03"; [HarmonyPostfix] private static void Postfix(CustomSceneManager __instance) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Invalid comparison between Unknown and I4 //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance == (Object)null || !MemoryManager.IsInMemoryMode || (Object)(object)((Component)__instance).gameObject == (Object)null) { return; } Scene scene = ((Component)__instance).gameObject.scene; if (!(((Scene)(ref scene)).name != "Cradle_03")) { if ((int)__instance.mapZone == 33) { MemoryManager.SetForceCurrentSceneMemoryFlag(value: true); return; } MapZone mapZone = __instance.mapZone; __instance.mapZone = (MapZone)33; MemoryManager.SetForceCurrentSceneMemoryFlag(value: true); CustomSceneManager.IncrementVersion(); Log.Info(string.Format("[MemoryCustomSceneManagerPatch] {0} mapZone: {1} -> {2}", "Cradle_03", mapZone, (object)(MapZone)33)); } } } [HarmonyPatch(typeof(GameManager))] internal static class MemorySceneTransitionPatch { private const string TARGET_SCENE = "Cradle_03"; private const string TRIGGER_SCENE = "Cradle_03_Destroyed"; [HarmonyPrefix] [HarmonyPatch("BeginSceneTransition")] private static bool OnBeginSceneTransition(GameManager __instance, SceneLoadInfo info) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) if (!MemoryManager.IsInMemoryMode) { return true; } Scene activeScene = SceneManager.GetActiveScene(); string name = ((Scene)(ref activeScene)).name; if (name != "Cradle_03") { return true; } if (!MemoryManager.IsCurrentPlayerHornet()) { Log.Info("[MemoryPatch] 非大黄蜂玩家允许梦境场景切换: " + name + " → " + info.SceneName); return true; } if (info.SceneName == "Menu_Title" || info.SceneName == "Quit_To_Menu" || info.SceneName == "PermaDeath" || string.IsNullOrEmpty(info.SceneName)) { return true; } if (info.SceneName == "Cradle_03_Destroyed") { return true; } if (info.SceneName == name) { Log.Info("[MemoryPatch] 允许同场景重生: " + name); return true; } Log.Info("[MemoryPatch] 拦截梦境中的场景切换: " + name + " → " + info.SceneName + ",改为退出梦境"); MemoryManager.Instance?.TriggerExitMemory(); return false; } } [HarmonyPatch(typeof(DamageEnemies), "HasBeenDamaged", new Type[] { typeof(IHitResponder) })] internal static class MemoryClashTinkPatch { [HarmonyPrefix] private static bool Prefix(DamageEnemies __instance, IHitResponder hitResponder, ref bool __result) { if (!MemoryManager.IsInMemoryMode) { return true; } HealthManager val = (HealthManager)(object)((hitResponder is HealthManager) ? hitResponder : null); if ((Object)(object)val == (Object)null) { return true; } if (((Object)((Component)val).gameObject).name != "Silk Boss") { return true; } __result = false; return false; } } [HarmonyPatch(typeof(HeroController), "NailParryRecover")] internal static class MemoryParryDownspikePatch { [HarmonyPostfix] private static void Postfix(HeroController __instance) { if (MemoryManager.IsInMemoryMode) { FieldInfo field = typeof(HeroController).GetField("allowAttackCancellingDownspikeRecovery", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { field.SetValue(__instance, true); Log.Info("[MemoryParryDownspikePatch] 梦境模式下拼刀刷新下劈"); } } } } [HarmonyPatch(typeof(HeroController), "TakeDamage", new Type[] { typeof(GameObject), typeof(CollisionSide), typeof(int), typeof(HazardType), typeof(DamagePropertyFlags) })] internal static class HeroDamageStackPatch { [HarmonyPrefix] private static void Prefix(GameObject go, CollisionSide damageSide, ref int damageAmount, HazardType hazardType, DamagePropertyFlags damagePropertyFlags) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 if (MemoryManager.IsInMemoryMode && (int)hazardType == 1 && !((Object)(object)go == (Object)null)) { DamageStackManager.DamageSourceType damageSourceType = DamageStackManager.IdentifyDamageSource(go); if (damageSourceType != 0) { int damageMultiplier = DamageStackManager.GetDamageMultiplier(damageSourceType); int num = damageAmount * damageMultiplier; DamageStackManager.RecordDamage(damageSourceType); damageAmount = num; } } } } [HarmonyPatch(typeof(ToolItemManager))] internal static class ToolItemPatches { [HarmonyPatch("SetEquippedCrest")] [HarmonyPostfix] private static void SetEquippedCrest_Postfix(string crestId) { Log.Info("[ToolItemPatches] 护符装备状态已改变: " + crestId); SilkBallManager.UpdateReaperCrestState(); } [HarmonyPatch("RefreshEquippedState")] [HarmonyPostfix] private static void RefreshEquippedState_Postfix() { Log.Info("[ToolItemPatches] 护符装备状态已刷新"); SilkBallManager.UpdateReaperCrestState(); } [HarmonyPatch("SendEquippedChangedEvent")] [HarmonyPostfix] private static void SendEquippedChangedEvent_Postfix(bool force) { Log.Info("[ToolItemPatches] 护符装备变更事件已发送"); SilkBallManager.UpdateReaperCrestState(); } } } namespace AnySilkBoss.Source.Managers { internal sealed class AssetManager : MonoBehaviour { private class AssetConfig { public string? BundleName { get; set; } public string? ObjectPath { get; set; } } [CompilerGenerated] private sealed class d__26 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public string assetName; public AssetManager <>4__this; private AssetConfig 5__1; private Object 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__26(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (string.IsNullOrEmpty(assetName)) { Log.Error("[AssetManager] 资源名称不能为空"); return false; } if (!_assetConfig.TryGetValue(assetName, out 5__1)) { Log.Error("[AssetManager] 未配置的资源: '" + assetName + "'。请在 AssetManager._assetConfig 中显式声明。"); return false; } if (5__1.BundleName == null) { Log.Debug("[AssetManager] '" + assetName + "' 是全局资源,直接同步获取"); return false; } if (<>4__this._externalAssetCache.TryGetValue(assetName, out 5__2) && 5__2 != (Object)null) { Log.Debug("[AssetManager] 资源 '" + assetName + "' 已在缓存中"); return false; } if (<>4__this._loadingAssets.Contains(assetName)) { Log.Debug("[AssetManager] 资源 '" + assetName + "' 正在加载中,等待完成..."); goto IL_0166; } <>4__this._loadingAssets.Add(assetName); if (5__1.ObjectPath == null) { <>2__current = <>4__this.LoadFromExternalBundle(assetName, 5__1.BundleName); <>1__state = 2; return true; } <>2__current = <>4__this.LoadFromSceneBundle(assetName, 5__1.BundleName, 5__1.ObjectPath); <>1__state = 3; return true; case 1: <>1__state = -1; goto IL_0166; case 2: <>1__state = -1; break; case 3: { <>1__state = -1; break; } IL_0166: if (<>4__this._loadingAssets.Contains(assetName)) { <>2__current = null; <>1__state = 1; return true; } return false; } <>4__this._loadingAssets.Remove(assetName); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__28 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public string[] assetNames; public AssetManager <>4__this; private Dictionary> 5__1; private string[] <>s__2; private int <>s__3; private string 5__4; private AssetConfig 5__5; private Dictionary>.Enumerator <>s__6; private KeyValuePair> 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__28(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } 5__1 = null; <>s__2 = null; 5__4 = null; 5__5 = null; <>s__6 = default(Dictionary>.Enumerator); 5__7 = default(KeyValuePair>); <>1__state = -2; } private bool MoveNext() { try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = new Dictionary>(); <>s__2 = assetNames; for (<>s__3 = 0; <>s__3 < <>s__2.Length; <>s__3++) { 5__4 = <>s__2[<>s__3]; if (_assetConfig.TryGetValue(5__4, out 5__5) && 5__5.BundleName != null && !<>4__this.IsAssetLoaded(5__4) && !<>4__this.IsAssetLoading(5__4)) { if (!5__1.ContainsKey(5__5.BundleName)) { 5__1[5__5.BundleName] = new List(); } 5__1[5__5.BundleName].Add(5__4); 5__5 = null; 5__4 = null; } } <>s__2 = null; <>s__6 = 5__1.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; 5__7 = default(KeyValuePair>); break; } if (<>s__6.MoveNext()) { 5__7 = <>s__6.Current; <>2__current = <>4__this.LoadFromBundleBatch(5__7.Key, 5__7.Value); <>1__state = 1; return true; } <>m__Finally1(); <>s__6 = default(Dictionary>.Enumerator); return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; ((IDisposable)<>s__6).Dispose(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__34 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public string bundleName; public List assetNames; public AssetManager <>4__this; private List 5__1; private List 5__2; private string 5__3; private AssetBundle 5__4; private List.Enumerator <>s__5; private string 5__6; private List.Enumerator <>s__7; private string 5__8; private AssetConfig 5__9; private List.Enumerator <>s__10; private string 5__11; private List.Enumerator <>s__12; private string 5__13; private string[] 5__14; private List.Enumerator <>s__15; private string 5__16; private string[] <>s__17; private int <>s__18; private string 5__19; private string 5__20; private Object 5__21; private GameObject 5__22; private bool 5__23; private GameObject 5__24; private string 5__25; private string[] 5__26; private string 5__27; private GameObject 5__28; private AsyncOperation 5__29; private Scene 5__30; private AsyncOperation 5__31; private List.Enumerator <>s__32; private string 5__33; private AssetConfig 5__34; private GameObject 5__35; private GameObject 5__36; private List.Enumerator <>s__37; private string 5__38; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__34(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; 5__4 = null; <>s__5 = default(List.Enumerator); 5__6 = null; <>s__7 = default(List.Enumerator); 5__8 = null; 5__9 = null; <>s__10 = default(List.Enumerator); 5__11 = null; <>s__12 = default(List.Enumerator); 5__13 = null; 5__14 = null; <>s__15 = default(List.Enumerator); 5__16 = null; <>s__17 = null; 5__19 = null; 5__20 = null; 5__21 = null; 5__22 = null; 5__24 = null; 5__25 = null; 5__26 = null; 5__27 = null; 5__28 = null; 5__29 = null; 5__31 = null; <>s__32 = default(List.Enumerator); 5__33 = null; 5__34 = null; 5__35 = null; 5__36 = null; <>s__37 = default(List.Enumerator); 5__38 = null; <>1__state = -2; } private bool MoveNext() { //IL_064d: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_067d: Unknown result type (might be due to invalid IL or missing references) //IL_06da: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>s__5 = assetNames.GetEnumerator(); try { while (<>s__5.MoveNext()) { 5__6 = <>s__5.Current; <>4__this._loadingAssets.Add(5__6); 5__6 = null; } } finally { ((IDisposable)<>s__5).Dispose(); } <>s__5 = default(List.Enumerator); 5__1 = new List(); 5__2 = new List(); <>s__7 = assetNames.GetEnumerator(); try { while (<>s__7.MoveNext()) { 5__8 = <>s__7.Current; 5__9 = _assetConfig[5__8]; if (5__9.ObjectPath == null) { 5__1.Add(5__8); } else { 5__2.Add(5__8); } 5__9 = null; 5__8 = null; } } finally { ((IDisposable)<>s__7).Dispose(); } <>s__7 = default(List.Enumerator); 5__3 = Path.Combine(BundleRootFolder, bundleName); if (!File.Exists(5__3)) { Log.Error("[AssetManager] Bundle 文件不存在: " + 5__3); <>s__10 = assetNames.GetEnumerator(); try { while (<>s__10.MoveNext()) { 5__11 = <>s__10.Current; <>4__this._loadingAssets.Remove(5__11); 5__11 = null; } } finally { ((IDisposable)<>s__10).Dispose(); } <>s__10 = default(List.Enumerator); return false; } 5__4 = AssetBundle.LoadFromFile(5__3); if ((Object)(object)5__4 == (Object)null) { Log.Error("[AssetManager] 无法加载 Bundle: " + 5__3); <>s__12 = assetNames.GetEnumerator(); try { while (<>s__12.MoveNext()) { 5__13 = <>s__12.Current; <>4__this._loadingAssets.Remove(5__13); 5__13 = null; } } finally { ((IDisposable)<>s__12).Dispose(); } <>s__12 = default(List.Enumerator); return false; } if (5__1.Count > 0) { Log.Info($"[AssetManager] 从 Bundle '{bundleName}' 批量加载 {5__1.Count} 个精确匹配资源..."); 5__14 = 5__4.GetAllAssetNames(); <>s__15 = 5__1.GetEnumerator(); try { while (<>s__15.MoveNext()) { 5__16 = <>s__15.Current; <>s__17 = 5__14; for (<>s__18 = 0; <>s__18 < <>s__17.Length; <>s__18++) { 5__19 = <>s__17[<>s__18]; 5__20 = Path.GetFileNameWithoutExtension(5__19); if (5__20.Equals(5__16, StringComparison.OrdinalIgnoreCase)) { 5__21 = 5__4.LoadAsset(5__19); if (5__21 != (Object)null) { ref GameObject reference = ref 5__22; Object obj = 5__21; reference = (GameObject)(object)((obj is GameObject) ? obj : null); if (5__22 != null && (Object)(object)<>4__this._assetPool != (Object)null) { 5__23 = 5__22.activeSelf; 5__22.SetActive(false); 5__24 = Object.Instantiate(5__22); ((Object)5__24).name = 5__16 + " (Prefab)"; 5__22.SetActive(5__23); <>4__this.DisableAutoDestructComponents(5__24); 5__24.transform.SetParent(<>4__this._assetPool.transform); <>4__this._externalAssetCache[5__16] = (Object)(object)5__24; 5__24 = null; } else { <>4__this._externalAssetCache[5__16] = 5__21; } Log.Info("[AssetManager] 资源 '" + 5__16 + "' 加载成功"); 5__22 = null; } break; } 5__20 = null; 5__19 = null; } <>s__17 = null; 5__16 = null; } } finally { ((IDisposable)<>s__15).Dispose(); } <>s__15 = default(List.Enumerator); 5__14 = null; } if (5__2.Count > 0) { Log.Info($"[AssetManager] 从场景 Bundle '{bundleName}' 批量加载 {5__2.Count} 个场景对象..."); 5__25 = Path.GetFileNameWithoutExtension(bundleName); 5__26 = 5__4.GetAllScenePaths(); 5__27 = 5__25; if (5__26.Length != 0) { 5__27 = 5__26[0]; } 5__28 = <>4__this.CreateTempCamera(); 5__29 = SceneManager.LoadSceneAsync(5__27, (LoadSceneMode)1); <>2__current = 5__29; <>1__state = 1; return true; } break; case 1: <>1__state = -1; 5__30 = SceneManager.GetSceneByPath(5__27); if (!((Scene)(ref 5__30)).IsValid()) { 5__30 = SceneManager.GetSceneByName(Path.GetFileNameWithoutExtension(5__27)); } if (!((Scene)(ref 5__30)).isLoaded) { Log.Error("[AssetManager] 场景加载失败: " + 5__27); if ((Object)(object)5__28 != (Object)null) { Object.Destroy((Object)(object)5__28); } goto IL_08f0; } <>4__this.DisableProblematicComponents(5__30); <>s__32 = 5__2.GetEnumerator(); try { while (<>s__32.MoveNext()) { 5__33 = <>s__32.Current; 5__34 = _assetConfig[5__33]; 5__35 = <>4__this.FindObjectInScene(5__30, 5__34.ObjectPath); if ((Object)(object)5__35 == (Object)null) { Log.Error("[AssetManager] 在场景 '" + 5__25 + "' 中未找到对象 '" + 5__34.ObjectPath + "'"); continue; } 5__36 = Object.Instantiate(5__35); ((Object)5__36).name = 5__33 + " (Prefab)"; 5__36.SetActive(false); if ((Object)(object)<>4__this._assetPool != (Object)null) { 5__36.transform.SetParent(<>4__this._assetPool.transform); } <>4__this._externalAssetCache[5__33] = (Object)(object)5__36; Log.Info("[AssetManager] 场景对象 '" + 5__33 + "' 加载成功"); 5__34 = null; 5__35 = null; 5__36 = null; 5__33 = null; } } finally { ((IDisposable)<>s__32).Dispose(); } <>s__32 = default(List.Enumerator); 5__31 = SceneManager.UnloadSceneAsync(((Scene)(ref 5__30)).name); <>2__current = 5__31; <>1__state = 2; return true; case 2: { <>1__state = -1; if ((Object)(object)5__28 != (Object)null) { Object.Destroy((Object)(object)5__28); } 5__31 = null; goto IL_08f0; } IL_08f0: 5__25 = null; 5__26 = null; 5__27 = null; 5__28 = null; 5__29 = null; break; } 5__4.Unload(false); <>s__37 = assetNames.GetEnumerator(); try { while (<>s__37.MoveNext()) { 5__38 = <>s__37.Current; <>4__this._loadingAssets.Remove(5__38); 5__38 = null; } } finally { ((IDisposable)<>s__37).Dispose(); } <>s__37 = default(List.Enumerator); Log.Info("[AssetManager] Bundle '" + bundleName + "' 批量加载完成"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__32 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public string assetName; public string bundleName; public AssetManager <>4__this; private string 5__1; private AssetBundle 5__2; private string[] 5__3; private string[] <>s__4; private int <>s__5; private string 5__6; private string 5__7; private Object 5__8; private GameObject 5__9; private bool 5__10; private GameObject 5__11; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__32(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; <>s__4 = null; 5__6 = null; 5__7 = null; 5__8 = null; 5__9 = null; 5__11 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("[AssetManager] 从 Bundle '" + bundleName + "' 加载资源: " + assetName); 5__1 = Path.Combine(BundleRootFolder, bundleName); if (!File.Exists(5__1)) { Log.Error("[AssetManager] Bundle 文件不存在: " + 5__1); return false; } 5__2 = AssetBundle.LoadFromFile(5__1); if ((Object)(object)5__2 == (Object)null) { Log.Error("[AssetManager] 无法加载 Bundle: " + 5__1); return false; } try { 5__3 = 5__2.GetAllAssetNames(); <>s__4 = 5__3; for (<>s__5 = 0; <>s__5 < <>s__4.Length; <>s__5++) { 5__6 = <>s__4[<>s__5]; 5__7 = Path.GetFileNameWithoutExtension(5__6); if (5__7.Equals(assetName, StringComparison.OrdinalIgnoreCase)) { 5__8 = 5__2.LoadAsset(5__6); if (5__8 != (Object)null) { ref GameObject reference = ref 5__9; Object obj = 5__8; reference = (GameObject)(object)((obj is GameObject) ? obj : null); if (5__9 != null && (Object)(object)<>4__this._assetPool != (Object)null) { 5__10 = 5__9.activeSelf; 5__9.SetActive(false); 5__11 = Object.Instantiate(5__9); ((Object)5__11).name = assetName + " (Prefab)"; 5__9.SetActive(5__10); <>4__this.DisableAutoDestructComponents(5__11); 5__11.transform.SetParent(<>4__this._assetPool.transform); <>4__this._externalAssetCache[assetName] = (Object)(object)5__11; 5__11 = null; } else { <>4__this._externalAssetCache[assetName] = 5__8; } Log.Info("[AssetManager] 资源 '" + assetName + "' 加载成功并已持久化"); break; } 5__8 = null; } 5__7 = null; 5__6 = null; } <>s__4 = null; 5__3 = null; } finally { 5__2.Unload(false); } <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__33 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public string assetName; public string bundleName; public string objectPath; public AssetManager <>4__this; private string 5__1; private AssetBundle 5__2; private string 5__3; private string[] 5__4; private string 5__5; private GameObject 5__6; private AsyncOperation 5__7; private Scene 5__8; private GameObject 5__9; private AsyncOperation 5__10; private GameObject 5__11; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__33(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; 5__4 = null; 5__5 = null; 5__6 = null; 5__7 = null; 5__9 = null; 5__10 = null; 5__11 = null; <>1__state = -2; } private bool MoveNext() { //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("[AssetManager] 从场景 Bundle '" + bundleName + "' 加载对象: " + assetName + " (路径: " + objectPath + ")"); 5__1 = Path.Combine(BundleRootFolder, bundleName); if (!File.Exists(5__1)) { Log.Error("[AssetManager] 场景 Bundle 文件不存在: " + 5__1); return false; } 5__2 = AssetBundle.LoadFromFile(5__1); if ((Object)(object)5__2 == (Object)null) { Log.Error("[AssetManager] 无法加载场景 Bundle: " + 5__1); return false; } 5__3 = Path.GetFileNameWithoutExtension(bundleName); 5__4 = 5__2.GetAllScenePaths(); 5__5 = 5__3; if (5__4.Length != 0) { 5__5 = 5__4[0]; } 5__6 = <>4__this.CreateTempCamera(); 5__7 = SceneManager.LoadSceneAsync(5__5, (LoadSceneMode)1); <>2__current = 5__7; <>1__state = 1; return true; case 1: <>1__state = -1; 5__8 = SceneManager.GetSceneByPath(5__5); if (!((Scene)(ref 5__8)).IsValid()) { 5__8 = SceneManager.GetSceneByName(Path.GetFileNameWithoutExtension(5__5)); } if (!((Scene)(ref 5__8)).isLoaded) { Log.Error("[AssetManager] 场景加载失败: " + 5__5); 5__2.Unload(true); if ((Object)(object)5__6 != (Object)null) { Object.Destroy((Object)(object)5__6); } return false; } <>4__this.DisableProblematicComponents(5__8); 5__9 = <>4__this.FindObjectInScene(5__8, objectPath); if ((Object)(object)5__9 != (Object)null) { 5__11 = Object.Instantiate(5__9); ((Object)5__11).name = assetName + " (Prefab)"; 5__11.SetActive(false); if ((Object)(object)<>4__this._assetPool != (Object)null) { 5__11.transform.SetParent(<>4__this._assetPool.transform); } <>4__this._externalAssetCache[assetName] = (Object)(object)5__11; Log.Info("[AssetManager] 场景对象 '" + assetName + "' 加载成功并已持久化"); 5__11 = null; } else { Log.Error("[AssetManager] 在场景 '" + 5__3 + "' 中未找到对象 '" + objectPath + "'"); } 5__10 = SceneManager.UnloadSceneAsync(((Scene)(ref 5__8)).name); <>2__current = 5__10; <>1__state = 2; return true; case 2: <>1__state = -1; 5__2.Unload(false); if ((Object)(object)5__6 != (Object)null) { Object.Destroy((Object)(object)5__6); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__27 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public string assetName; public AssetManager <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__27(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = <>4__this.LoadAssetAsync(assetName); <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__29 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public string[] assetNames; public AssetManager <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__29(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = <>4__this.LoadAssetsAsync(assetNames); <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__13 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AssetManager <>4__this; private List 5__1; private int 5__2; private int 5__3; private Dictionary.Enumerator <>s__4; private KeyValuePair 5__5; private List.Enumerator <>s__6; private string 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>s__4 = default(Dictionary.Enumerator); 5__5 = default(KeyValuePair); <>s__6 = default(List.Enumerator); 5__7 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (<>4__this._externalAssetsPreloaded || <>4__this._preloadingExternalAssets) { Log.Debug("[AssetManager] 外部资源已预加载或正在预加载,跳过"); goto IL_0074; } <>4__this._preloadingExternalAssets = true; Log.Info("[AssetManager] 开始预加载所有外部资源..."); 5__1 = new List(); <>s__4 = _assetConfig.GetEnumerator(); try { while (<>s__4.MoveNext()) { 5__5 = <>s__4.Current; if (5__5.Value.BundleName != null) { 5__1.Add(5__5.Key); } 5__5 = default(KeyValuePair); } } finally { ((IDisposable)<>s__4).Dispose(); } <>s__4 = default(Dictionary.Enumerator); if (5__1.Count == 0) { Log.Info("[AssetManager] 没有需要预加载的外部资源"); <>4__this._externalAssetsPreloaded = true; <>4__this._preloadingExternalAssets = false; return false; } Log.Info(string.Format("[AssetManager] 需要预加载 {0} 个外部资源: {1}", 5__1.Count, string.Join(", ", 5__1))); <>2__current = <>4__this.LoadAssetsAsync(5__1.ToArray()); <>1__state = 2; return true; case 1: <>1__state = -1; goto IL_0074; case 2: { <>1__state = -1; 5__2 = 0; 5__3 = 0; <>s__6 = 5__1.GetEnumerator(); try { while (<>s__6.MoveNext()) { 5__7 = <>s__6.Current; if (<>4__this.IsAssetLoaded(5__7)) { 5__2++; } else { 5__3++; Log.Warn("[AssetManager] 预加载失败: " + 5__7); } 5__7 = null; } } finally { ((IDisposable)<>s__6).Dispose(); } <>s__6 = default(List.Enumerator); <>4__this._externalAssetsPreloaded = true; <>4__this._preloadingExternalAssets = false; Log.Info($"[AssetManager] 外部资源预加载完成: 成功 {5__2},失败 {5__3}"); return false; } IL_0074: if (<>4__this._preloadingExternalAssets) { <>2__current = null; <>1__state = 1; return true; } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__14 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AssetManager <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if (!<>4__this._externalAssetsPreloaded) { <>2__current = null; <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private static readonly Dictionary _assetConfig = new Dictionary { { "Reaper Silk Bundle", new AssetConfig { BundleName = null } }, { "Abyss Bullet", new AssetConfig { BundleName = null } }, { "lace_circle_slash", new AssetConfig { BundleName = "localpoolprefabs_assets_laceboss.bundle" } }, { "First Weaver Anim", new AssetConfig { BundleName = "tk2danimations_assets_areaslab.bundle" } }, { "First Weaver Cln", new AssetConfig { BundleName = "tk2dcollections_assets_areaslab.bundle" } }, { "First Weaver Bomb Blast", new AssetConfig { BundleName = "localpoolprefabs_assets_areaslab.bundle" } }, { "focus_blast_first_weaver", new AssetConfig { BundleName = "animations_assets_areaslab.bundle" } }, { "FW Pin Projectile", new AssetConfig { BundleName = "scenes_scenes_scenes/slab_10b.bundle", ObjectPath = "Boss Scene/Pin Projectiles/FW Pin Projectile (3)" } } }; private static readonly string BundleRootFolder; private readonly Dictionary<(Type, string), Object> _globalBundleCache = new Dictionary<(Type, string), Object>(); private readonly Dictionary _externalAssetCache = new Dictionary(); private GameObject? _assetPool; private bool _initialized = false; private readonly HashSet _loadingAssets = new HashSet(); private bool _externalAssetsPreloaded = false; private bool _preloadingExternalAssets = false; public bool IsExternalAssetsPreloaded => _externalAssetsPreloaded; private void Awake() { CreateAssetPool(); _initialized = true; Log.Info("[AssetManager] 已初始化(统一持久化缓存架构)"); } [IteratorStateMachine(typeof(d__13))] public IEnumerator PreloadAllExternalAssets() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__13(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__14))] public IEnumerator WaitForPreload() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__14(0) { <>4__this = this }; } private void CreateAssetPool() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown if ((Object)(object)_assetPool == (Object)null) { _assetPool = new GameObject("AssetPool"); _assetPool.transform.SetParent(((Component)this).transform); _assetPool.SetActive(false); Log.Info("[AssetManager] AssetPool 容器已创建"); } } private void OnEnable() { SceneManager.sceneLoaded += OnSceneLoaded; } private void OnDisable() { SceneManager.sceneLoaded -= OnSceneLoaded; } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Invalid comparison between Unknown and I4 if (_preloadingExternalAssets) { Log.Debug("[AssetManager] 场景切换: " + ((Scene)(ref scene)).name + ",预加载中,跳过缓存清理"); return; } if ((int)mode == 1) { Log.Debug("[AssetManager] 场景切换: " + ((Scene)(ref scene)).name + "(Additive),跳过缓存清理"); return; } Log.Debug("[AssetManager] 场景切换: " + ((Scene)(ref scene)).name + ",检查缓存有效性"); CleanupInvalidCaches(); } private void CleanupInvalidCaches() { List<(Type, string)> list = new List<(Type, string)>(); foreach (KeyValuePair<(Type, string), Object> item in _globalBundleCache) { if (item.Value == (Object)null) { list.Add(item.Key); } } foreach (var item2 in list) { _globalBundleCache.Remove(item2); Log.Debug("[AssetManager] 移除失效的全局缓存: " + item2.Item2); } List list2 = new List(); foreach (KeyValuePair item3 in _externalAssetCache) { if (item3.Value == (Object)null) { list2.Add(item3.Key); } } foreach (string item4 in list2) { _externalAssetCache.Remove(item4); Log.Debug("[AssetManager] 移除失效的外部资源缓存: " + item4); } int num = list.Count + list2.Count; if (num > 0) { Log.Info($"[AssetManager] 清理了 {num} 个失效的缓存引用"); } } public T? Get(string assetName) where T : Object { if (string.IsNullOrEmpty(assetName)) { Log.Error("[AssetManager] 资源名称不能为空"); return default(T); } if (!_assetConfig.TryGetValue(assetName, out AssetConfig value)) { Log.Error("[AssetManager] 未配置的资源: '" + assetName + "'。请在 AssetManager._assetConfig 中显式声明。"); return default(T); } if (value.BundleName == null) { return GetFromGlobalBundle(assetName); } return GetFromExternalCache(assetName); } public GameObject? GetSceneObject(string assetName) { return this.Get(assetName); } public bool IsAssetLoaded(string assetName) { string assetName2 = assetName; if (!_assetConfig.TryGetValue(assetName2, out AssetConfig value)) { return false; } if (value.BundleName == null) { return _globalBundleCache.Keys.Any<(Type, string)>(((Type, string) k) => k.Item2 == assetName2); } Object value2; return _externalAssetCache.TryGetValue(assetName2, out value2) && value2 != (Object)null; } public bool IsSceneObjectLoaded(string assetName) { return IsAssetLoaded(assetName); } public bool IsAssetLoading(string assetName) { return _loadingAssets.Contains(assetName); } public bool IsSceneObjectLoading(string assetName) { return IsAssetLoading(assetName); } [IteratorStateMachine(typeof(d__26))] public IEnumerator LoadAssetAsync(string assetName) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__26(0) { <>4__this = this, assetName = assetName }; } [IteratorStateMachine(typeof(d__27))] public IEnumerator LoadSceneObjectAsync(string assetName) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__27(0) { <>4__this = this, assetName = assetName }; } [IteratorStateMachine(typeof(d__28))] public IEnumerator LoadAssetsAsync(params string[] assetNames) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__28(0) { <>4__this = this, assetNames = assetNames }; } [IteratorStateMachine(typeof(d__29))] public IEnumerator LoadSceneObjectsAsync(params string[] assetNames) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__29(0) { <>4__this = this, assetNames = assetNames }; } private T? GetFromGlobalBundle(string assetName) where T : Object { (Type, string) key = (typeof(T), assetName); if (_globalBundleCache.TryGetValue(key, out Object value)) { if (value != (Object)null) { Log.Debug("[AssetManager] 从全局缓存中找到资源: " + assetName); return (T)(object)((value is T) ? value : null); } _globalBundleCache.Remove(key); } foreach (AssetBundle allLoadedAssetBundle in AssetBundle.GetAllLoadedAssetBundles()) { if ((Object)(object)allLoadedAssetBundle == (Object)null) { continue; } try { string[] allAssetNames = allLoadedAssetBundle.GetAllAssetNames(); string[] array = allAssetNames; foreach (string text in array) { string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(text); if (fileNameWithoutExtension.Equals(assetName, StringComparison.OrdinalIgnoreCase)) { T val = allLoadedAssetBundle.LoadAsset(text); if ((Object)(object)val != (Object)null) { _globalBundleCache[key] = (Object)(object)val; Log.Info("[AssetManager] 从全局 Bundle '" + ((Object)allLoadedAssetBundle).name + "' 加载资源: " + assetName); return val; } } } } catch (Exception ex) { Log.Error("[AssetManager] 从 Bundle '" + ((Object)allLoadedAssetBundle).name + "' 查找资源时出错: " + ex.Message); } } Log.Error("[AssetManager] 未找到全局资源: '" + assetName + "' (" + typeof(T).Name + ")"); return default(T); } private T? GetFromExternalCache(string assetName) where T : Object { if (_externalAssetCache.TryGetValue(assetName, out Object value) && value != (Object)null) { T val = (T)(object)((value is T) ? value : null); if (val != null) { return val; } Log.Warn("[AssetManager] 资源 '" + assetName + "' 类型不匹配: 期望 " + typeof(T).Name + ",实际 " + ((object)value).GetType().Name); return default(T); } Log.Warn("[AssetManager] 资源 '" + assetName + "' 尚未加载,请先调用 LoadAssetAsync"); return default(T); } [IteratorStateMachine(typeof(d__32))] private IEnumerator LoadFromExternalBundle(string assetName, string bundleName) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__32(0) { <>4__this = this, assetName = assetName, bundleName = bundleName }; } [IteratorStateMachine(typeof(d__33))] private IEnumerator LoadFromSceneBundle(string assetName, string bundleName, string objectPath) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__33(0) { <>4__this = this, assetName = assetName, bundleName = bundleName, objectPath = objectPath }; } [IteratorStateMachine(typeof(d__34))] private IEnumerator LoadFromBundleBatch(string bundleName, List assetNames) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__34(0) { <>4__this = this, bundleName = bundleName, assetNames = assetNames }; } private GameObject CreateTempCamera() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown GameObject val = new GameObject("AssetManager_TempCamera") { hideFlags = (HideFlags)61, tag = "MainCamera" }; val.AddComponent(); val.AddComponent(); return val; } private void DisableProblematicComponents(Scene scene) { Behaviour[] array = (from b in ((Scene)(ref scene)).GetRootGameObjects().SelectMany((GameObject o) => o.GetComponentsInChildren(true)) where (Object)(object)b != (Object)null select b).ToArray(); Behaviour[] array2 = array; foreach (Behaviour val in array2) { string name = ((object)val).GetType().Name; if (val.enabled && (name == "TintRendererGroup" || name == "CustomSceneManager")) { val.enabled = false; } } } private void DisableAutoDestructComponents(GameObject obj) { if ((Object)(object)obj == (Object)null) { return; } HashSet hashSet = new HashSet { "AutoRecycleSelf", "ActiveRecycler", "ObjectBounce", "DropRecycle", "RecycleResetHandler", "EventRegister" }; Component[] componentsInChildren = obj.GetComponentsInChildren(true); int num = 0; Component[] array = componentsInChildren; foreach (Component val in array) { if ((Object)(object)val == (Object)null) { continue; } string name = ((object)val).GetType().Name; if (hashSet.Contains(name)) { Behaviour val2 = (Behaviour)(object)((val is Behaviour) ? val : null); if (val2 != null) { val2.enabled = false; num++; } else { Object.Destroy((Object)(object)val); num++; } } } if (num > 0) { Log.Debug($"[AssetManager] 禁用了 {((Object)obj).name} 的 {num} 个自毁相关组件"); } } public void ClearAssetCache(string assetName) { string assetName2 = assetName; List<(Type, string)> list = _globalBundleCache.Keys.Where<(Type, string)>(((Type, string) k) => k.Item2 == assetName2).ToList(); foreach (var item in list) { _globalBundleCache.Remove(item); } if (_externalAssetCache.TryGetValue(assetName2, out Object value)) { if (value != (Object)null) { GameObject val = (GameObject)(object)((value is GameObject) ? value : null); if (val != null) { Object.Destroy((Object)(object)val); } } _externalAssetCache.Remove(assetName2); } Log.Info("[AssetManager] 已清空资源缓存: " + assetName2); } public void ClearSceneObjectCache(string assetName) { ClearAssetCache(assetName); } public void ClearAllCache() { _globalBundleCache.Clear(); foreach (KeyValuePair item in _externalAssetCache) { if (item.Value != (Object)null) { Object value = item.Value; GameObject val = (GameObject)(object)((value is GameObject) ? value : null); if (val != null) { Object.Destroy((Object)(object)val); } } } _externalAssetCache.Clear(); _loadingAssets.Clear(); Log.Info("[AssetManager] 已清空所有资源缓存"); } public void UnloadAll() { Log.Info("[AssetManager] 开始卸载所有资源..."); ClearAllCache(); if ((Object)(object)_assetPool != (Object)null) { Object.Destroy((Object)(object)_assetPool); _assetPool = null; } _initialized = false; Log.Info("[AssetManager] 所有资源已卸载"); } private void OnDestroy() { UnloadAll(); } private GameObject? FindObjectInScene(Scene scene, string objectPath) { if (!((Scene)(ref scene)).IsValid()) { Log.Error("[AssetManager] 无效的场景"); return null; } string[] pathParts = objectPath.Split('/'); if (pathParts.Length == 0) { Log.Error("[AssetManager] 无效的对象路径: " + objectPath); return null; } GameObject val = null; GameObject[] rootGameObjects = ((Scene)(ref scene)).GetRootGameObjects(); foreach (GameObject val2 in rootGameObjects) { if (((Object)val2).name == pathParts[0]) { val = val2; break; } } if ((Object)(object)val == (Object)null) { Log.Error("[AssetManager] 未找到根对象: " + pathParts[0]); return null; } int i; for (i = 1; i < pathParts.Length; i++) { Transform val3 = ((IEnumerable)((Component)val.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == pathParts[i])); if ((Object)(object)val3 == (Object)null) { Log.Error("[AssetManager] 未找到子对象: " + pathParts[i] + " (路径: " + objectPath + ")"); return null; } val = ((Component)val3).gameObject; } Log.Debug("[AssetManager] 找到对象: " + ((Object)val).name); return val; } public static GameObject? FindObjectInCurrentScene(string objectPath) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); string[] pathParts = objectPath.Split('/'); if (pathParts.Length == 0) { return null; } GameObject val = null; GameObject[] rootGameObjects = ((Scene)(ref activeScene)).GetRootGameObjects(); foreach (GameObject val2 in rootGameObjects) { if (((Object)val2).name == pathParts[0]) { val = val2; break; } } if ((Object)(object)val == (Object)null) { return null; } int i; for (i = 1; i < pathParts.Length; i++) { Transform val3 = ((IEnumerable)((Component)val.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == pathParts[i])); if ((Object)(object)val3 == (Object)null) { return null; } val = ((Component)val3).gameObject; } return val; } public static GameObject? FindChildObject(GameObject parent, string childPath) { if ((Object)(object)parent == (Object)null) { return null; } string[] array = childPath.Split('/'); GameObject val = parent; string[] array2 = array; foreach (string partName in array2) { Transform val2 = ((IEnumerable)((Component)val.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == partName)); if ((Object)(object)val2 == (Object)null) { return null; } val = ((Component)val2).gameObject; } return val; } static AssetManager() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Invalid comparison between Unknown and I4 //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Invalid comparison between Unknown and I4 //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Invalid comparison between Unknown and I4 string streamingAssetsPath = Application.streamingAssetsPath; RuntimePlatform platform = Application.platform; if (1 == 0) { } string path = (((int)platform == 1) ? "StandaloneOSX" : (((int)platform == 2) ? "StandaloneWindows64" : (((int)platform != 13) ? "" : "StandaloneLinux64"))); if (1 == 0) { } BundleRootFolder = Path.Combine(streamingAssetsPath, "aa", path); } } internal class BigSilkBallManager : MonoBehaviour { [CompilerGenerated] private sealed class d__20 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public BigSilkBallManager <>4__this; private GameObject 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__20(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("=== 开始创建大丝球预制体 ==="); 5__1 = <>4__this.FindSilkCocoonCore(); if ((Object)(object)5__1 == (Object)null) { Log.Error("未找到 silk_cocoon_core 对象"); return false; } <>4__this._bigSilkBallPrefab = Object.Instantiate(5__1); ((Object)<>4__this._bigSilkBallPrefab).name = "Big Silk Ball Prefab"; <>4__this._bigSilkBallPrefab.transform.SetParent(((Component)<>4__this).transform); Log.Info("大丝球对象复制完成,开始处理组件..."); <>4__this.ProcessComponents(); <>4__this.ProcessChildObjects(); <>4__this._bigSilkBallPrefab.SetActive(false); Log.Info("=== 大丝球预制体创建完成: " + ((Object)<>4__this._bigSilkBallPrefab).name + " ==="); <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__19 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public BigSilkBallManager <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__19(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)<>4__this._bigSilkBallPrefab != (Object)null) { Log.Info("销毁旧的大丝球预制体..."); Object.Destroy((Object)(object)<>4__this._bigSilkBallPrefab); <>4__this._bigSilkBallPrefab = null; } <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = <>4__this.CreateBigSilkBallPrefab(); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this._initialized = true; Log.Info("BigSilkBallManager 初始化完成"); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private GameObject? _bigSilkBallPrefab; private bool _initialized = false; private bool _phaseFovActive = false; private Animator? _cachedAnimator; private const string BossSceneName = "Cradle_03"; private const float BigSilkBallFovOffset = 8f; private const float BigSilkBallFovInTime = 0.65f; private const float BigSilkBallFovOutTime = 0.5f; public static BigSilkBallManager? Instance { get; private set; } public GameObject? BigSilkBallPrefab => _bigSilkBallPrefab; private void Awake() { if ((Object)(object)Instance == (Object)null || (Object)(object)Instance == (Object)(object)this) { Instance = this; } else { Log.Warn("发现重复的 BigSilkBallManager,保留现有 Instance"); } } private void OnEnable() { SceneManager.sceneLoaded += OnSceneLoaded; SceneManager.activeSceneChanged += OnSceneChanged; } private void OnDisable() { SceneManager.sceneLoaded -= OnSceneLoaded; SceneManager.activeSceneChanged -= OnSceneChanged; ResetBigSilkBallPhaseEffects("BigSilkBallManager disabled"); } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { if (!(((Scene)(ref scene)).name != "Cradle_03")) { ResetBigSilkBallPhaseEffects("boss scene loaded"); ((MonoBehaviour)this).StartCoroutine(Initialize()); } } private void OnSceneChanged(Scene oldScene, Scene newScene) { if (((Scene)(ref oldScene)).name == "Cradle_03" && ((Scene)(ref newScene)).name != "Cradle_03") { Log.Info("离开 BOSS 场景 " + ((Scene)(ref oldScene)).name + ",清理 BigSilkBallManager 缓存"); ResetBigSilkBallPhaseEffects("leave Cradle_03"); CleanupPrefab(); } } [IteratorStateMachine(typeof(d__19))] private IEnumerator Initialize() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__19(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__20))] private IEnumerator CreateBigSilkBallPrefab() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__20(0) { <>4__this = this }; } private GameObject? FindSilkCocoonCore() { GameObject val = GameObject.Find("Boss Scene"); if ((Object)(object)val != (Object)null) { Transform val2 = val.transform.Find("silk_cocoon_core"); if ((Object)(object)val2 != (Object)null) { return ((Component)val2).gameObject; } } GameObject[] array = Object.FindObjectsByType((FindObjectsSortMode)0); GameObject[] array2 = array; foreach (GameObject val3 in array2) { if (((Object)val3).name == "silk_cocoon_core") { return val3; } } return null; } private void ProcessComponents() { if ((Object)(object)_bigSilkBallPrefab == (Object)null) { return; } Log.Info("--- 处理根物体组件 ---"); _cachedAnimator = _bigSilkBallPrefab.GetComponent(); if ((Object)(object)_cachedAnimator != (Object)null) { Log.Info("保留 Animator 组件(用于播放 Silk_Cocoon_Intro_Burst 动画)"); } else { Log.Warn("未找到 Animator 组件"); } PlayMakerFSM[] components = _bigSilkBallPrefab.GetComponents(); PlayMakerFSM[] array = components; foreach (PlayMakerFSM val in array) { if (val.FsmName == "Loop Beat Anim") { Log.Info("删除无用的 PlayMakerFSM: " + val.FsmName); Object.Destroy((Object)(object)val); } } Component component = _bigSilkBallPrefab.GetComponent("CameraControlAnimationEvents"); Component component2 = _bigSilkBallPrefab.GetComponent("CaptureAnimationEvent"); } private void ProcessChildObjects() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if ((Object)(object)_bigSilkBallPrefab == (Object)null) { return; } foreach (Transform item in _bigSilkBallPrefab.transform) { Transform val = item; if (((Object)val).name == "scene_dust") { Object.Destroy((Object)(object)((Component)val).gameObject); } else if (((Object)val).name == "tendrils") { Object.Destroy((Object)(object)((Component)val).gameObject); } else if (((Object)val).name == "loom_threads") { Object.Destroy((Object)(object)((Component)val).gameObject); } } Transform val2 = _bigSilkBallPrefab.transform.Find("heart"); if ((Object)(object)val2 != (Object)null) { Transform val3 = val2.Find("hanging_silk"); if ((Object)(object)val3 != (Object)null) { Object.Destroy((Object)(object)((Component)val3).gameObject); } } } public void BeginBigSilkBallPhase(string reason) { BigSilkBallPhaseGuard.Begin(reason); ApplyFovOffset(8f, 0.65f, reason); _phaseFovActive = true; } public void EndBigSilkBallPhase(string reason) { ResetBigSilkBallPhaseEffects(reason); } public void ResetBigSilkBallPhaseEffects(string reason) { bool flag = _phaseFovActive || BigSilkBallPhaseGuard.IsActive; BigSilkBallPhaseGuard.End(reason); if (flag) { ApplyFovOffset(0f, 0.5f, reason); _phaseFovActive = false; } } private void ApplyFovOffset(float offset, float duration, string reason) { try { GameCameras silentInstance = GameCameras.SilentInstance; ForceCameraAspect val = (((Object)(object)silentInstance != (Object)null) ? silentInstance.forceCameraAspect : null); if ((Object)(object)val == (Object)null) { Log.Warn($"无法设置大丝球 FOV offset={offset}: GameCameras.forceCameraAspect 为空"); return; } val.SetFovOffset(offset, duration, AnimationCurve.EaseInOut(0f, 0f, 1f, 1f)); Log.Info($"已设置大丝球 FOV offset={offset}, duration={duration}, reason={reason}"); } catch (Exception ex) { Log.Error($"设置大丝球 FOV offset={offset} 失败: {ex.Message}"); } } public GameObject? SpawnBigSilkBall(Vector3 position, GameObject bossObject) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_bigSilkBallPrefab == (Object)null) { Log.Error("大丝球预制体未初始化"); return null; } GameObject val = Object.Instantiate(_bigSilkBallPrefab); Vector3 val2 = position; val2.z = 57.4491f; val.transform.position = val2; Log.Info($"根物品Scale: {val.transform.localScale}(应保持原版)"); Transform val3 = val.transform.Find("heart"); if ((Object)(object)val3 != (Object)null) { Vector3 localPosition = val3.localPosition; Log.Info($"heart保持原版相对位置: ({localPosition.x:F4}, {localPosition.y:F4}, {localPosition.z:F4})"); } else { Log.Warn("未找到heart子物品"); } val.SetActive(true); Log.Info($"生成大丝球 - 根物品位置: {val2},heart将显示在Z≈0的位置"); BigSilkBallBehavior bigSilkBallBehavior = val.GetComponent(); if ((Object)(object)bigSilkBallBehavior == (Object)null) { bigSilkBallBehavior = val.AddComponent(); } bigSilkBallBehavior.Initialize(val, bossObject, val3); return val; } public GameObject? SpawnMemoryBigSilkBall(Vector3 position, GameObject bossObject) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_bigSilkBallPrefab == (Object)null) { Log.Error("大丝球预制体未初始化"); return null; } GameObject val = Object.Instantiate(_bigSilkBallPrefab); Vector3 val2 = position; val2.z = 57.4491f; val.transform.position = val2; Log.Info($"根物品Scale: {val.transform.localScale}(应保持原版)"); Transform val3 = val.transform.Find("heart"); if ((Object)(object)val3 != (Object)null) { Vector3 localPosition = val3.localPosition; Log.Info($"heart保持原版相对位置: ({localPosition.x:F4}, {localPosition.y:F4}, {localPosition.z:F4})"); } else { Log.Warn("未找到heart子物品"); } val.SetActive(true); Log.Info($"生成大丝球 - 根物品位置: {val2},heart将显示在Z≈0的位置"); MemoryBigSilkBallBehavior memoryBigSilkBallBehavior = val.GetComponent(); if ((Object)(object)memoryBigSilkBallBehavior == (Object)null) { memoryBigSilkBallBehavior = val.AddComponent(); } memoryBigSilkBallBehavior.Initialize(val, bossObject, val3); return val; } public bool IsInitialized() { return _initialized; } public void DestroyAllActiveBigSilkBalls() { if ((Object)(object)_bigSilkBallPrefab == (Object)null) { Log.Warn("大丝球预制体未初始化,仍尝试清理场景中的大丝球实例"); } int num = 0; BigSilkBallBehavior[] array = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (BigSilkBallBehavior bigSilkBallBehavior in array) { if ((Object)(object)bigSilkBallBehavior != (Object)null && (Object)(object)((Component)bigSilkBallBehavior).gameObject != (Object)null && (Object)(object)((Component)bigSilkBallBehavior).gameObject != (Object)(object)_bigSilkBallPrefab) { Object.Destroy((Object)(object)((Component)bigSilkBallBehavior).gameObject); num++; } } MemoryBigSilkBallBehavior[] array2 = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (MemoryBigSilkBallBehavior memoryBigSilkBallBehavior in array2) { if ((Object)(object)memoryBigSilkBallBehavior != (Object)null && (Object)(object)((Component)memoryBigSilkBallBehavior).gameObject != (Object)null && (Object)(object)((Component)memoryBigSilkBallBehavior).gameObject != (Object)(object)_bigSilkBallPrefab) { Object.Destroy((Object)(object)((Component)memoryBigSilkBallBehavior).gameObject); num++; } } Log.Info($"已清理场景中的大丝球实例,共销毁 {num} 个"); } public void CleanupPrefab() { Log.Info("=== 开始清理 BigSilkBallManager 缓存 ==="); ResetBigSilkBallPhaseEffects("cleanup prefab"); ((MonoBehaviour)this).StopAllCoroutines(); DestroyAllActiveBigSilkBalls(); if ((Object)(object)_bigSilkBallPrefab != (Object)null) { Object.Destroy((Object)(object)_bigSilkBallPrefab); _bigSilkBallPrefab = null; Log.Info("已销毁大丝球预制体"); } _cachedAnimator = null; _initialized = false; Log.Info("=== BigSilkBallManager 清理完成 ==="); } } internal static class BigSilkBallPhaseGuard { private static bool _isActive; public static bool IsActive => _isActive; public static int Generation { get; private set; } public static void Begin(string reason) { _isActive = true; Generation++; Log.Info($"[BigSilkBallPhaseGuard] 开启大丝球阶段: {reason}, generation={Generation}"); } public static void End(string reason) { if (_isActive) { _isActive = false; Generation++; Log.Info($"[BigSilkBallPhaseGuard] 关闭大丝球阶段: {reason}, generation={Generation}"); } } } internal class DamageHeroEventManager : MonoBehaviour { [CompilerGenerated] private sealed class d__7 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public DamageHeroEventManager <>4__this; private GameObject 5__1; private int 5__2; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Expected O, but got Unknown if (<>1__state != 0) { return false; } <>1__state = -1; 5__1 = <>4__this._assetManager?.Get("Abyss Bullet"); if ((Object)(object)5__1 == (Object)null) { Log.Error("无法获取 'Abyss Bullet' 预制体"); return false; } <>4__this._damageHero = 5__1.GetComponent(); if ((Object)(object)<>4__this._damageHero == (Object)null) { Log.Error("'Abyss Bullet' 预制体上未找到 DamageHero 组件"); return false; } if (<>4__this._damageHero.OnDamagedHero == null) { Log.Warn("DamageHero.OnDamagedHero 为 null,初始化为空事件"); <>4__this._damageHero.OnDamagedHero = new UnityEvent(); } 5__2 = ((UnityEventBase)<>4__this._damageHero.OnDamagedHero).GetPersistentEventCount(); Log.Info($"成功获取 DamageHero 组件,OnDamagedHero 监听器数量: {5__2}"); Log.Info("=== DamageHero 组件提取完成 ==="); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__6 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public DamageHeroEventManager <>4__this; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (<>4__this._initialized) { Log.Info("DamageHeroEventManager already initialized."); return false; } Log.Info("Starting DamageHeroEventManager initialization..."); <>4__this._assetManager = ((Component)<>4__this).GetComponent(); if ((Object)(object)<>4__this._assetManager == (Object)null) { Log.Error("无法找到 AssetManager 组件"); return false; } <>2__current = <>4__this.ExtractDamageHeroFromPrefab(); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this._initialized = true; Log.Info("DamageHeroEventManager initialization completed."); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private AssetManager? _assetManager; private bool _initialized = false; private DamageHero? _damageHero; public DamageHero? DamageHero => _damageHero; private void Start() { ((MonoBehaviour)this).StartCoroutine(Initialize()); } [IteratorStateMachine(typeof(d__6))] private IEnumerator Initialize() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__6(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__7))] private IEnumerator ExtractDamageHeroFromPrefab() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__7(0) { <>4__this = this }; } private Transform? FindChildRecursive(Transform parent, string childName) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown Transform val = parent.Find(childName); if ((Object)(object)val != (Object)null) { return val; } foreach (Transform item in parent) { Transform parent2 = item; val = FindChildRecursive(parent2, childName); if ((Object)(object)val != (Object)null) { return val; } } return null; } public bool HasDamageHero() { return (Object)(object)_damageHero != (Object)null; } public bool IsInitialized() { return _initialized; } } internal class DamageReductionManager : MonoBehaviour { private struct DamageRecord { public float Damage; public float Timestamp; public DamageRecord(float damage, float timestamp) { Damage = damage; Timestamp = timestamp; } } private const float DAMAGE_RECORD_LIFETIME = 10f; private const int DAMAGE_THRESHOLD = 100; private const float REDUCTION_PER_THRESHOLD = 0.1f; private const float MAX_REDUCTION = 0.9f; private int _baseReductionLevel = 0; private PlayMakerFSM? _attackControlFsm; private PlayMakerFSM? _phaseControlFsm; private static readonly HashSet Level5States = new HashSet { "Roar Antic", "Roar", "Roar End", "P6 Web Prepare", "P6 Web Cast", "P6 Web Attack 1", "P6 Web Attack 2", "P6 Web Attack 3", "P6 Web Recover", "P6 Domain Slash" }; private static readonly HashSet Level3States = new HashSet { "PinArray Roar", "PinArray Roar Wait", "PinArray Prepare", "PinArray Start", "PinArray Wait", "PinArray End" }; private List _damageRecords = new List(); public int BaseReductionLevel => _baseReductionLevel; public int TotalReductionLevel => _baseReductionLevel + CurrentThresholdLevel; public float CurrentReduction { get; private set; } = 0f; public float TotalDamageInWindow { get; private set; } = 0f; public int CurrentThresholdLevel { get; private set; } = 0; public event Action? OnReductionChanged; public void SetBaseReductionLevel(int level) { int num = Mathf.Clamp(level, 0, 9); if (_baseReductionLevel != num) { int baseReductionLevel = _baseReductionLevel; _baseReductionLevel = num; Log.Info($"[减伤系统] 基础减伤层数: {baseReductionLevel} → {_baseReductionLevel} (基础减伤: {_baseReductionLevel * 10}%)"); } } public void InitializeFsmReferences(PlayMakerFSM attackControl, PlayMakerFSM? phaseControl) { _attackControlFsm = attackControl; _phaseControlFsm = phaseControl; Log.Info($"[减伤系统] FSM引用已初始化 (AttackControl: {(Object)(object)attackControl != (Object)null}, PhaseControl: {(Object)(object)phaseControl != (Object)null})"); } private void Update() { UpdateBaseReductionFromState(); } private void OnDestroy() { ClearAllRecords(); } public float CalculateReductionForIncomingDamage(float incomingOriginalDamage) { CleanExpiredRecords(); float num = _damageRecords.Sum((DamageRecord r) => r.Damage); float num2 = num + incomingOriginalDamage; int num3 = Mathf.FloorToInt(num2 / 100f); int num4 = _baseReductionLevel + num3; float num5 = (float)num4 * 0.1f; return Mathf.Min(num5, 0.9f); } public void RecordReducedDamage(float reducedDamage) { if (!(reducedDamage <= 0f)) { CleanExpiredRecords(); DamageRecord item = new DamageRecord(reducedDamage, Time.time); _damageRecords.Add(item); int currentThresholdLevel = CurrentThresholdLevel; UpdateReduction(); if (currentThresholdLevel != CurrentThresholdLevel) { this.OnReductionChanged?.Invoke(CurrentThresholdLevel, CurrentReduction); Log.Info($"[减伤系统] ⚡ 减伤档位变化: {currentThresholdLevel} → {CurrentThresholdLevel} (减伤: {CurrentReduction * 100f:F0}%)"); } } } public static float ApplyReductionRatio(float originalDamage, float reductionRatio) { if (reductionRatio <= 0f) { return originalDamage; } return originalDamage * (1f - reductionRatio); } public void ClearAllRecords() { _damageRecords.Clear(); CurrentReduction = 0f; TotalDamageInWindow = 0f; Log.Info("[减伤系统] 清除所有伤害记录"); } private void UpdateBaseReductionFromState() { string text = null; string text2 = null; if ((Object)(object)_attackControlFsm != (Object)null) { text = _attackControlFsm.ActiveStateName; } if ((Object)(object)_phaseControlFsm != (Object)null) { text2 = _phaseControlFsm.ActiveStateName; } int num = 0; if (text != null && Level5States.Contains(text)) { num = 5; } else if (text2 != null && Level3States.Contains(text2)) { num = 3; } if (_baseReductionLevel != num) { SetBaseReductionLevel(num); } } public void CleanExpiredRecords() { float time = Time.time; float expirationTime = time - 10f; int num = _damageRecords.RemoveAll((DamageRecord record) => record.Timestamp < expirationTime); } private void UpdateReduction() { TotalDamageInWindow = _damageRecords.Sum((DamageRecord r) => r.Damage); CurrentThresholdLevel = Mathf.FloorToInt(TotalDamageInWindow / 100f); float num = (float)CurrentThresholdLevel * 0.1f; CurrentReduction = Mathf.Min(num, 0.9f); } } internal static class DamageStackManager { public enum DamageSourceType { None, SilkBall, SpikeFloor } public static float StackWindow = 10f; public static int BaseDamage = 1; public static int StackMultiplier = 2; private static float _lastSilkBallDamageTime = -999f; private static float _lastSpikeFloorDamageTime = -999f; public static int GetDamageAmount(DamageSourceType sourceType) { float lastDamageTime = GetLastDamageTime(sourceType); float num = Time.time - lastDamageTime; if (num <= StackWindow) { return BaseDamage * StackMultiplier; } return BaseDamage; } public static int GetDamageMultiplier(DamageSourceType sourceType) { float lastDamageTime = GetLastDamageTime(sourceType); float num = Time.time - lastDamageTime; return (!(num <= StackWindow)) ? 1 : StackMultiplier; } public static void RecordDamage(DamageSourceType sourceType) { switch (sourceType) { case DamageSourceType.SilkBall: _lastSilkBallDamageTime = Time.time; break; case DamageSourceType.SpikeFloor: _lastSpikeFloorDamageTime = Time.time; break; } } private static float GetLastDamageTime(DamageSourceType sourceType) { if (1 == 0) { } float result = sourceType switch { DamageSourceType.SilkBall => _lastSilkBallDamageTime, DamageSourceType.SpikeFloor => _lastSpikeFloorDamageTime, _ => -999f, }; if (1 == 0) { } return result; } public static void Reset() { _lastSilkBallDamageTime = -999f; _lastSpikeFloorDamageTime = -999f; } public static DamageSourceType IdentifyDamageSource(GameObject damageSource) { if ((Object)(object)damageSource == (Object)null) { return DamageSourceType.None; } Transform val = damageSource.transform; while ((Object)(object)val != (Object)null) { if ((Object)(object)((Component)val).GetComponent() != (Object)null) { return DamageSourceType.SilkBall; } val = val.parent; } val = damageSource.transform; while ((Object)(object)val != (Object)null) { if ((Object)(object)((Component)val).GetComponent() != (Object)null) { return DamageSourceType.SpikeFloor; } val = val.parent; } return DamageSourceType.None; } } internal class DeathManager : MonoBehaviour { private bool _waitingForMemoryRespawn = false; public static DeathManager? Instance { get; private set; } public event Action? OnPlayerFullyRespawned; private void Awake() { if ((Object)(object)Instance != (Object)null && (Object)(object)Instance != (Object)(object)this) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } Instance = this; OnPlayerFullyRespawned += RestorePlayerTools; Log.Info("[DeathManager] 初始化完成"); } private void OnEnable() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if ((Object)(object)GameManager.instance != (Object)null) { GameManager.instance.OnFinishedEnteringScene += new EnterSceneEvent(OnSceneEntered); } } private void OnDisable() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if ((Object)(object)GameManager.instance != (Object)null) { GameManager.instance.OnFinishedEnteringScene -= new EnterSceneEvent(OnSceneEntered); } } private void OnDestroy() { OnPlayerFullyRespawned -= RestorePlayerTools; if ((Object)(object)Instance == (Object)(object)this) { Instance = null; } } private void OnSceneEntered() { if (_waitingForMemoryRespawn && MemoryManager.IsInMemoryMode) { _waitingForMemoryRespawn = false; Log.Info("[DeathManager] 梦境中玩家完全重生(通过 OnFinishedEnteringScene)"); this.OnPlayerFullyRespawned?.Invoke(); } } internal void SetWaitingForMemoryRespawn() { _waitingForMemoryRespawn = true; Log.Info("[DeathManager] 设置等待梦境重生标志"); } public void ManualTriggerRespawn() { Log.Info("[DeathManager] 手动触发重生事件"); this.OnPlayerFullyRespawned?.Invoke(); } public bool IsInMemoryMode() { return MemoryManager.IsInMemoryMode; } private void RestorePlayerTools() { try { Log.Info("[DeathManager] 开始恢复道具..."); ToolItemManager.TryReplenishTools(true, (ReplenishMethod)1); GameManager.instance.playerData.ShellShards = 700; Log.Info("[DeathManager] 道具恢复完成"); } catch (Exception ex) { Log.Error("[DeathManager] 恢复道具失败: " + ex.Message); } } public void ManualRestoreTools() { Log.Info("[DeathManager] 手动触发道具恢复"); RestorePlayerTools(); } } internal class FWBlastManager : MonoBehaviour { [CompilerGenerated] private sealed class d__19 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FWBlastManager <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__19(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (<>4__this._initialized || <>4__this._initializing) { Log.Info("[FWBlastManager] 已初始化或正在初始化,跳过"); return false; } <>4__this._initializing = true; Log.Info("[FWBlastManager] 开始初始化..."); <>2__current = (object)new WaitForSeconds(0.2f); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = <>4__this.LoadPrefabFromAssetManager(); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.CreatePoolContainer(); <>2__current = <>4__this.PrewarmPool(); <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this._initialized = true; <>4__this._initializing = false; Log.Info("[FWBlastManager] 初始化完成"); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__20 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FWBlastManager <>4__this; private GameObject 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__20(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("[FWBlastManager] 从 AssetManager 获取预制体..."); <>4__this._assetManager = ((Component)<>4__this).GetComponent(); if ((Object)(object)<>4__this._assetManager == (Object)null) { 5__1 = GameObject.Find("AnySilkBossManager"); if ((Object)(object)5__1 != (Object)null) { <>4__this._assetManager = 5__1.GetComponent(); } 5__1 = null; } if ((Object)(object)<>4__this._assetManager == (Object)null) { Log.Error("[FWBlastManager] 未找到 AssetManager,无法加载预制体"); return false; } if (!<>4__this._assetManager.IsExternalAssetsPreloaded) { Log.Info("[FWBlastManager] 等待 AssetManager 预加载完成..."); <>2__current = <>4__this._assetManager.WaitForPreload(); <>1__state = 1; return true; } break; case 1: <>1__state = -1; break; } <>4__this._bombBlastPrefab = <>4__this._assetManager.Get("First Weaver Bomb Blast"); if ((Object)(object)<>4__this._bombBlastPrefab != (Object)null) { Log.Info("[FWBlastManager] Bomb Blast 获取成功: " + ((Object)<>4__this._bombBlastPrefab).name); } else { Log.Error("[FWBlastManager] Bomb Blast 获取失败:返回 null"); } <>4__this._blastAnimatorController = <>4__this._assetManager.Get("focus_blast_first_weaver"); if ((Object)(object)<>4__this._blastAnimatorController != (Object)null) { Log.Info("[FWBlastManager] 动画控制器获取成功: " + ((Object)<>4__this._blastAnimatorController).name); } else { Log.Error("[FWBlastManager] 动画控制器获取失败"); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__22 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FWBlastManager <>4__this; private int 5__1; private GameObject 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__22(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>1__state = -2; } private bool MoveNext() { int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; goto IL_00b3; } <>1__state = -1; Log.Info("[FWBlastManager] 开始预生成对象池..."); if ((Object)(object)<>4__this._bombBlastPrefab != (Object)null) { 5__1 = 0; goto IL_00cd; } goto IL_0106; IL_0106: return false; IL_00cd: if (5__1 < 40) { 5__2 = <>4__this.CreateBombBlastInstance(); if ((Object)(object)5__2 != (Object)null) { <>4__this._bombBlastPool.Add(5__2); } if (5__1 % 2 == 0) { <>2__current = null; <>1__state = 1; return true; } goto IL_00b3; } Log.Info($"[FWBlastManager] Bomb Blast 池预生成完成: {<>4__this._bombBlastPool.Count} 个"); goto IL_0106; IL_00b3: 5__2 = null; 5__1++; goto IL_00cd; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__30 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject obj; public string eventName; public FWBlastManager <>4__this; private PlayMakerFSM 5__1; private int 5__2; private int 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__30(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)obj == (Object)null) { return false; } 5__1 = FSMUtility.LocateMyFSM(obj, "Control"); if ((Object)(object)5__1 == (Object)null) { return false; } 5__2 = 10; 5__3 = 0; break; case 1: <>1__state = -1; 5__3++; if ((Object)(object)obj == (Object)null || !obj.activeInHierarchy) { return false; } if (5__1.ActiveStateName == "Mode Select") { 5__1.SendEvent(eventName); Log.Debug("[FWBlastManager] FSM 已进入 Mode Select,发送事件: " + eventName); return false; } break; } if (5__3 < 5__2) { <>2__current = null; <>1__state = 1; return true; } if ((Object)(object)obj != (Object)null && obj.activeInHierarchy) { 5__1.SendEvent(eventName); Log.Warn("[FWBlastManager] 等待超时,强制发送事件: " + eventName + ", 当前状态: " + 5__1.ActiveStateName); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const string BOSS_SCENE_NAME = "Cradle_03"; private const string BOMB_BLAST_ASSET_NAME = "First Weaver Bomb Blast"; private const int BOMB_BLAST_POOL_SIZE = 40; private GameObject? _bombBlastPrefab; private readonly List _bombBlastPool = new List(); private GameObject? _poolContainer; private bool _initialized = false; private bool _initializing = false; private AssetManager? _assetManager; private RuntimeAnimatorController? _blastAnimatorController; public GameObject? BombBlastPrefab => _bombBlastPrefab; public bool IsInitialized => _initialized; private void OnEnable() { SceneManager.sceneLoaded += OnSceneLoaded; SceneManager.activeSceneChanged += OnSceneChanged; } private void OnDisable() { SceneManager.sceneLoaded -= OnSceneLoaded; SceneManager.activeSceneChanged -= OnSceneChanged; } private void OnDestroy() { CleanupPool(); } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { if (!(((Scene)(ref scene)).name != "Cradle_03")) { Log.Info("[FWBlastManager] 检测到 BOSS 场景 " + ((Scene)(ref scene)).name + ",开始初始化..."); ((MonoBehaviour)this).StartCoroutine(Initialize()); } } private void OnSceneChanged(Scene oldScene, Scene newScene) { if (((Scene)(ref oldScene)).name == "Cradle_03" && ((Scene)(ref newScene)).name != "Cradle_03") { Log.Info("[FWBlastManager] 离开 BOSS 场景 " + ((Scene)(ref oldScene)).name + ",清理缓存"); CleanupPool(); } else if (((Scene)(ref oldScene)).name == "Cradle_03" && ((Scene)(ref newScene)).name == "Cradle_03") { Log.Info("[FWBlastManager] 检测到场景重载(死亡复活),回收所有活跃的 Blast"); RecycleAllBombBlasts(); } } [IteratorStateMachine(typeof(d__19))] public IEnumerator Initialize() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__19(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__20))] private IEnumerator LoadPrefabFromAssetManager() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__20(0) { <>4__this = this }; } private void CreatePoolContainer() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown if ((Object)(object)_poolContainer == (Object)null) { _poolContainer = new GameObject("FWBombBlastPool"); _poolContainer.transform.SetParent(((Component)this).transform); Log.Info("[FWBlastManager] 对象池容器已创建"); } } [IteratorStateMachine(typeof(d__22))] private IEnumerator PrewarmPool() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__22(0) { <>4__this = this }; } private void SetBombBlastPooled(GameObject obj) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)obj == (Object)null)) { PlayMakerFSM val = FSMUtility.LocateMyFSM(obj, "Control"); if ((Object)(object)val != (Object)null) { ((Behaviour)val).enabled = false; } Rigidbody2D component = obj.GetComponent(); if ((Object)(object)component != (Object)null) { component.linearVelocity = Vector2.zero; component.angularVelocity = 0f; component.simulated = false; } Transform val2 = obj.transform.Find("Blast"); if ((Object)(object)val2 != (Object)null) { ((Component)val2).gameObject.SetActive(false); } obj.tag = "Untagged"; } } private void ActivateBombBlast(GameObject obj) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)obj == (Object)null)) { Rigidbody2D component = obj.GetComponent(); if ((Object)(object)component != (Object)null) { component.simulated = true; component.linearVelocity = Vector2.zero; component.angularVelocity = 0f; } PlayMakerFSM val = FSMUtility.LocateMyFSM(obj, "Control"); if ((Object)(object)val != (Object)null) { ((Behaviour)val).enabled = true; val.Fsm.SetState("Start"); } if (!obj.activeSelf) { obj.SetActive(true); } } } private GameObject? CreateBombBlastInstance() { if ((Object)(object)_bombBlastPrefab == (Object)null || (Object)(object)_poolContainer == (Object)null) { return null; } GameObject val = Object.Instantiate(_bombBlastPrefab, _poolContainer.transform); ((Object)val).name = "First Weaver Bomb Blast (Pool)"; val.SetActive(false); FixBlastAnimator(val); BombBlastBehavior bombBlastBehavior = val.AddComponent(); bombBlastBehavior.EnsureFsmPatched(); SetBombBlastPooled(val); if (!val.activeSelf) { val.SetActive(true); } return val; } private void FixBlastAnimator(GameObject bombBlastObj) { if ((Object)(object)_blastAnimatorController == (Object)null) { Log.Warn("[FWBlastManager] 动画控制器未加载,无法修复 Animator"); return; } Transform val = bombBlastObj.transform.Find("Blast"); if ((Object)(object)val == (Object)null) { Log.Warn("[FWBlastManager] 未找到 Blast 子物品"); return; } Animator component = ((Component)val).GetComponent(); if ((Object)(object)component == (Object)null) { Log.Warn("[FWBlastManager] Blast 子物品未找到 Animator 组件"); return; } component.runtimeAnimatorController = _blastAnimatorController; Log.Debug("[FWBlastManager] 已修复 Blast 的 Animator 控制器引用"); } public GameObject? GetAvailableBombBlast() { if (!_initialized) { Log.Warn("[FWBlastManager] 尚未初始化,无法获取 Bomb Blast"); return null; } GameObject val = null; if (_bombBlastPool.Count > 0) { val = _bombBlastPool[_bombBlastPool.Count - 1]; _bombBlastPool.RemoveAt(_bombBlastPool.Count - 1); } else { val = CreateBombBlastInstance(); Log.Debug("[FWBlastManager] Bomb Blast 池为空,创建新实例"); } return val; } public GameObject? SpawnBombBlast(Vector3 position, Transform? parent = null, float size = 0f, bool spawnSilkBallRing = false, int silkBallCount = 8, float initialOutwardSpeed = 12f, float reverseAcceleration = 25f, float maxInwardSpeed = 30f, float reverseAccelDuration = 5f, bool useReverseAccelMode = true, float radialBurstSpeed = 18f, float releaseDelay = 0.3f) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) if (!_initialized) { Log.Warn("[FWBlastManager] 尚未初始化,无法生成 Bomb Blast"); return null; } GameObject availableBombBlast = GetAvailableBombBlast(); if ((Object)(object)availableBombBlast == (Object)null) { return null; } availableBombBlast.transform.SetParent(parent); availableBombBlast.transform.position = position; BombBlastBehavior component = availableBombBlast.GetComponent(); if ((Object)(object)component != (Object)null) { component.customSize = size; component.Configure(spawnSilkBallRing, silkBallCount, initialOutwardSpeed, reverseAcceleration, maxInwardSpeed, reverseAccelDuration, useReverseAccelMode, radialBurstSpeed, releaseDelay); } ActivateBombBlast(availableBombBlast); ((MonoBehaviour)this).StartCoroutine(SendStartEventNextFrame(availableBombBlast, "START_NORMAL")); Log.Debug($"[FWBlastManager] Bomb Blast 已生成 at {position}, size={size}, ring={spawnSilkBallRing}, reverseAccel={useReverseAccelMode}"); return availableBombBlast; } public GameObject? SpawnMovingBombBlast(Vector3 position, Transform moveTarget, float moveAcceleration = 30f, float moveMaxSpeed = 7f, float reachDistance = 2f, float moveTimeout = 5f, float size = 1f) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) if (!_initialized) { Log.Warn("[FWBlastManager] 尚未初始化,无法生成移动模式 Bomb Blast"); return null; } GameObject availableBombBlast = GetAvailableBombBlast(); if ((Object)(object)availableBombBlast == (Object)null) { return null; } availableBombBlast.transform.SetParent((Transform)null); availableBombBlast.transform.position = position; BombBlastBehavior component = availableBombBlast.GetComponent(); if ((Object)(object)component != (Object)null) { component.customSize = size; component.Configure(spawnRing: false); component.ConfigureMoveMode(moveTarget, moveAcceleration, moveMaxSpeed, reachDistance, moveTimeout); } ActivateBombBlast(availableBombBlast); ((MonoBehaviour)this).StartCoroutine(SendStartEventNextFrame(availableBombBlast, "START_MOVE")); Log.Debug($"[FWBlastManager] 移动模式 Bomb Blast 已生成 at {position}, 目标={((moveTarget != null) ? ((Object)moveTarget).name : null)}, 速度={moveMaxSpeed}"); return availableBombBlast; } [IteratorStateMachine(typeof(d__30))] private IEnumerator SendStartEventNextFrame(GameObject obj, string eventName) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__30(0) { <>4__this = this, obj = obj, eventName = eventName }; } public void RecycleBombBlast(GameObject? obj) { if (!((Object)(object)obj == (Object)null) && !((Object)(object)_poolContainer == (Object)null)) { PlayMakerFSM val = FSMUtility.LocateMyFSM(obj, "Control"); if ((Object)(object)val != (Object)null) { ((Behaviour)val).enabled = false; } BombBlastBehavior component = obj.GetComponent(); if ((Object)(object)component != (Object)null) { ((MonoBehaviour)component).StopAllCoroutines(); component.ResetConfig(); } SetBombBlastPooled(obj); if (!obj.activeSelf) { obj.SetActive(true); } obj.transform.SetParent(_poolContainer.transform); if ((Object)(object)val != (Object)null) { val.Fsm.SetState("Start"); } if (!_bombBlastPool.Contains(obj)) { _bombBlastPool.Add(obj); } Log.Debug($"[FWBlastManager] Bomb Blast 已回收,池中数量: {_bombBlastPool.Count}"); } } public void RecycleAllBombBlasts() { GameObject[] array = Object.FindObjectsByType((FindObjectsSortMode)0); GameObject[] array2 = array; foreach (GameObject val in array2) { if (((Object)val).name.Contains("First Weaver Bomb Blast") && val.activeInHierarchy) { Transform parent = val.transform.parent; GameObject? poolContainer = _poolContainer; if ((Object)(object)parent != (Object)(object)((poolContainer != null) ? poolContainer.transform : null)) { RecycleBombBlast(val); } } } } public void CleanupPool() { Log.Info("[FWBlastManager] 开始清理对象池..."); ((MonoBehaviour)this).StopAllCoroutines(); foreach (GameObject item in _bombBlastPool) { if ((Object)(object)item != (Object)null) { Object.Destroy((Object)(object)item); } } _bombBlastPool.Clear(); if ((Object)(object)_poolContainer != (Object)null) { Object.Destroy((Object)(object)_poolContainer); _poolContainer = null; } _bombBlastPrefab = null; _initialized = false; _initializing = false; Log.Info("[FWBlastManager] 对象池清理完成"); } } internal class FWPinManager : MonoBehaviour { [CompilerGenerated] private sealed class d__21 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FWPinManager <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__21(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (<>4__this._initialized || <>4__this._initializing) { Log.Info("[FWPinManager] 已初始化或正在初始化,跳过"); return false; } <>4__this._initializing = true; Log.Info("[FWPinManager] 开始初始化..."); <>2__current = (object)new WaitForSeconds(0.2f); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = <>4__this.LoadPrefabFromAssetManager(); <>1__state = 2; return true; case 2: <>1__state = -1; <>2__current = <>4__this.LoadAndFixAnimationReferences(); <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this.CreatePoolContainer(); <>2__current = <>4__this.PrewarmPool(); <>1__state = 4; return true; case 4: <>1__state = -1; <>4__this._initialized = true; <>4__this._initializing = false; Log.Info("[FWPinManager] 初始化完成"); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__23 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FWPinManager <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__23(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("[FWPinManager] 开始加载动画资源..."); if ((Object)(object)<>4__this._assetManager == (Object)null) { Log.Error("[FWPinManager] AssetManager 为 null,无法加载动画资源"); return false; } if (!<>4__this._assetManager.IsExternalAssetsPreloaded) { Log.Info("[FWPinManager] 等待 AssetManager 预加载完成..."); <>2__current = <>4__this._assetManager.WaitForPreload(); <>1__state = 1; return true; } goto IL_00a6; case 1: <>1__state = -1; goto IL_00a6; case 2: { <>1__state = -1; <>4__this.FixPrefabAnimationReference(<>4__this._pinProjectilePrefab); return false; } IL_00a6: <>4__this._firstWeaverAnimGO = <>4__this._assetManager.Get("First Weaver Anim"); if ((Object)(object)<>4__this._firstWeaverAnimGO == (Object)null) { Log.Error("[FWPinManager] 无法加载 First Weaver Anim"); return false; } <>4__this._pinAnimation = <>4__this._firstWeaverAnimGO.GetComponent(); if ((Object)(object)<>4__this._pinAnimation == (Object)null) { Log.Error("[FWPinManager] First Weaver Anim 未包含 tk2dSpriteAnimation 组件"); return false; } <>2__current = <>4__this.LoadSpriteCollection(); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__22 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FWPinManager <>4__this; private GameObject 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__22(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("[FWPinManager] 从 AssetManager 获取预制体..."); <>4__this._assetManager = ((Component)<>4__this).GetComponent(); if ((Object)(object)<>4__this._assetManager == (Object)null) { 5__1 = GameObject.Find("AnySilkBossManager"); if ((Object)(object)5__1 != (Object)null) { <>4__this._assetManager = 5__1.GetComponent(); } 5__1 = null; } if ((Object)(object)<>4__this._assetManager == (Object)null) { Log.Error("[FWPinManager] 未找到 AssetManager,无法加载预制体"); return false; } if (!<>4__this._assetManager.IsExternalAssetsPreloaded) { Log.Info("[FWPinManager] 等待 AssetManager 预加载完成..."); <>2__current = <>4__this._assetManager.WaitForPreload(); <>1__state = 1; return true; } break; case 1: <>1__state = -1; break; } <>4__this._pinProjectilePrefab = <>4__this._assetManager.GetSceneObject("FW Pin Projectile"); if ((Object)(object)<>4__this._pinProjectilePrefab != (Object)null) { Log.Info("[FWPinManager] Pin Projectile 获取成功: " + ((Object)<>4__this._pinProjectilePrefab).name); } else { Log.Error("[FWPinManager] Pin Projectile 获取失败:返回 null"); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__24 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FWPinManager <>4__this; private GameObject 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__24(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; if ((Object)(object)<>4__this._assetManager == (Object)null) { return false; } Log.Info("[FWPinManager] 开始加载 sprite collection..."); 5__1 = <>4__this._assetManager.Get("First Weaver Cln"); if ((Object)(object)5__1 == (Object)null) { Log.Error("[FWPinManager] 无法加载 First Weaver Cln"); return false; } <>4__this._pinSpriteCollection = 5__1.GetComponent(); if ((Object)(object)<>4__this._pinSpriteCollection == (Object)null) { Log.Error("[FWPinManager] First Weaver Cln 未包含 tk2dSpriteCollectionData 组件"); return false; } Log.Info("[FWPinManager] sprite collection 加载成功: " + ((Object)<>4__this._pinSpriteCollection).name); <>4__this.FixAnimationFrameSpriteCollections(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__28 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FWPinManager <>4__this; private int 5__1; private GameObject 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__28(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>1__state = -2; } private bool MoveNext() { int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; goto IL_00b3; } <>1__state = -1; Log.Info("[FWPinManager] 开始预生成对象池..."); if ((Object)(object)<>4__this._pinProjectilePrefab != (Object)null) { 5__1 = 0; goto IL_00cd; } goto IL_0106; IL_0106: return false; IL_00cd: if (5__1 < 50) { 5__2 = <>4__this.CreatePinProjectileInstance(); if ((Object)(object)5__2 != (Object)null) { <>4__this._pinProjectilePool.Add(5__2); } if (5__1 % 2 == 0) { <>2__current = null; <>1__state = 1; return true; } goto IL_00b3; } Log.Info($"[FWPinManager] Pin Projectile 池预生成完成: {<>4__this._pinProjectilePool.Count} 个"); goto IL_0106; IL_00b3: 5__2 = null; 5__1++; goto IL_00cd; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const string BOSS_SCENE_NAME = "Cradle_03"; private const string PIN_PROJECTILE_ASSET_NAME = "FW Pin Projectile"; private const int PIN_POOL_SIZE = 50; private GameObject? _pinProjectilePrefab; private readonly List _pinProjectilePool = new List(); private GameObject? _poolContainer; private bool _initialized = false; private bool _initializing = false; private GameObject? _firstWeaverAnimGO; private tk2dSpriteAnimation? _pinAnimation; private tk2dSpriteCollectionData? _pinSpriteCollection; private AssetManager? _assetManager; public GameObject? PinProjectilePrefab => _pinProjectilePrefab; public bool IsInitialized => _initialized; private void OnEnable() { SceneManager.sceneLoaded += OnSceneLoaded; SceneManager.activeSceneChanged += OnSceneChanged; } private void OnDisable() { SceneManager.sceneLoaded -= OnSceneLoaded; SceneManager.activeSceneChanged -= OnSceneChanged; } private void OnDestroy() { CleanupPool(); } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { if (!(((Scene)(ref scene)).name != "Cradle_03")) { Log.Info("[FWPinManager] 检测到 BOSS 场景 " + ((Scene)(ref scene)).name + ",开始初始化..."); ((MonoBehaviour)this).StartCoroutine(Initialize()); } } private void OnSceneChanged(Scene oldScene, Scene newScene) { if (((Scene)(ref oldScene)).name == "Cradle_03" && ((Scene)(ref newScene)).name == "Cradle_03") { Log.Info("[FWPinManager] 同场景重载 " + ((Scene)(ref oldScene)).name + ",回收所有活跃 Pin"); RecycleAllPinProjectiles(); } else if (((Scene)(ref oldScene)).name == "Cradle_03" && ((Scene)(ref newScene)).name != "Cradle_03") { Log.Info("[FWPinManager] 离开 BOSS 场景 " + ((Scene)(ref oldScene)).name + ",清理缓存"); CleanupPool(); } } [IteratorStateMachine(typeof(d__21))] public IEnumerator Initialize() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__21(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__22))] private IEnumerator LoadPrefabFromAssetManager() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__22(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__23))] private IEnumerator LoadAndFixAnimationReferences() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__23(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__24))] private IEnumerator LoadSpriteCollection() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__24(0) { <>4__this = this }; } private void FixAnimationFrameSpriteCollections() { if ((Object)(object)_pinAnimation == (Object)null || (Object)(object)_pinSpriteCollection == (Object)null) { Log.Warn("[FWPinManager] 无法修复动画帧: _pinAnimation 或 _pinSpriteCollection 为 null"); return; } if (_pinAnimation.clips == null) { Log.Warn("[FWPinManager] 动画没有 clips"); return; } int num = 0; tk2dSpriteAnimationClip[] clips = _pinAnimation.clips; foreach (tk2dSpriteAnimationClip val in clips) { if (val == null || val.frames == null) { continue; } tk2dSpriteAnimationFrame[] frames = val.frames; foreach (tk2dSpriteAnimationFrame val2 in frames) { if (val2 != null) { val2.spriteCollection = _pinSpriteCollection; num++; } } } Log.Info($"[FWPinManager] 已修复 {_pinAnimation.clips.Length} 个动画 clip 中的 {num} 帧的 spriteCollection 引用"); } private void FixPrefabAnimationReference(GameObject? prefab) { if ((Object)(object)prefab == (Object)null || (Object)(object)_pinAnimation == (Object)null) { return; } tk2dSpriteCollectionData pinSpriteCollection = _pinSpriteCollection; tk2dSpriteAnimator component = prefab.GetComponent(); if ((Object)(object)component != (Object)null) { component.Library = _pinAnimation; Log.Debug("[FWPinManager] 已修复 " + ((Object)prefab).name + " tk2dSpriteAnimator.Library"); } tk2dSprite component2 = prefab.GetComponent(); if ((Object)(object)component2 != (Object)null && (Object)(object)pinSpriteCollection != (Object)null) { ((tk2dBaseSprite)component2).Collection = pinSpriteCollection; ((tk2dBaseSprite)component2).Build(); Log.Debug("[FWPinManager] 已修复并重建 " + ((Object)prefab).name + " tk2dSprite"); } else if ((Object)(object)component2 != (Object)null && (Object)(object)pinSpriteCollection == (Object)null) { Log.Warn("[FWPinManager] 无法修复 " + ((Object)prefab).name + " tk2dSprite.Collection: spriteCollection 为 null"); } Transform val = prefab.transform.Find("Thread"); if ((Object)(object)val != (Object)null) { tk2dSpriteAnimator component3 = ((Component)val).GetComponent(); if ((Object)(object)component3 != (Object)null) { component3.Library = _pinAnimation; Log.Debug("[FWPinManager] 已修复 Thread tk2dSpriteAnimator.Library"); } tk2dSprite component4 = ((Component)val).GetComponent(); if ((Object)(object)component4 != (Object)null && (Object)(object)pinSpriteCollection != (Object)null) { ((tk2dBaseSprite)component4).Collection = pinSpriteCollection; ((tk2dBaseSprite)component4).Build(); Log.Debug("[FWPinManager] 已修复并重建 Thread tk2dSprite"); } } } private void CreatePoolContainer() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown if ((Object)(object)_poolContainer == (Object)null) { _poolContainer = new GameObject("FWPinPool"); _poolContainer.transform.SetParent(((Component)this).transform); Log.Info("[FWPinManager] 对象池容器已创建"); } } [IteratorStateMachine(typeof(d__28))] private IEnumerator PrewarmPool() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__28(0) { <>4__this = this }; } private GameObject? CreatePinProjectileInstance() { //IL_0074: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_pinProjectilePrefab == (Object)null || (Object)(object)_poolContainer == (Object)null) { return null; } GameObject val = Object.Instantiate(_pinProjectilePrefab, _poolContainer.transform); ((Object)val).name = "FW Pin Projectile (Pool)"; val.SetActive(true); PatchPinFsm(val); Rigidbody2D component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.linearVelocity = Vector2.zero; component.angularVelocity = 0f; component.bodyType = (RigidbodyType2D)1; } ResetPinVisualState(val); PlayMakerFSM val2 = FSMUtility.LocateMyFSM(val, "Control"); if ((Object)(object)val2 != (Object)null) { ResetPinFsmVariables(val2); val2.Fsm.InitData(); FsmState val3 = FsmStateBuilder.FindState(val2, "Managed Dormant"); if (val3 != null) { val2.SetState(val3.Name); } } val.SetActive(false); return val; } private void PatchPinFsm(GameObject pinObj) { //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Expected O, but got Unknown //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown //IL_0170: Expected O, but got Unknown //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Expected O, but got Unknown //IL_01a4: Expected O, but got Unknown //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Expected O, but got Unknown //IL_01b6: Expected O, but got Unknown //IL_05d1: Unknown result type (might be due to invalid IL or missing references) //IL_05d8: Expected O, but got Unknown //IL_0600: Unknown result type (might be due to invalid IL or missing references) //IL_0605: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0614: Expected O, but got Unknown PlayMakerFSM val = FSMUtility.LocateMyFSM(pinObj, "Control"); if ((Object)(object)val == (Object)null) { Log.Warn("[FWPinManager] Pin Projectile 未找到 Control FSM,无法补丁"); return; } FsmEvent orCreateEvent = FsmStateBuilder.GetOrCreateEvent(val, "DIRECT_FIRE"); FsmEvent orCreateEvent2 = FsmStateBuilder.GetOrCreateEvent(val, "PINARRAY_SLAM"); FsmEvent orCreateEvent3 = FsmStateBuilder.GetOrCreateEvent(val, "PINARRAY_LIFT"); FsmEvent orCreateEvent4 = FsmStateBuilder.GetOrCreateEvent(val, "PINARRAY_LAND"); FsmEvent fsmEvent = FsmEvent.GetFsmEvent("ATTACK"); FsmEvent orCreateEvent5 = FsmStateBuilder.GetOrCreateEvent(val, "IS_GROUND"); FsmEvent orCreateEvent6 = FsmStateBuilder.GetOrCreateEvent(val, "IS_AIR"); FsmEvent orCreateEvent7 = FsmStateBuilder.GetOrCreateEvent(val, "CLIMB_PIN_PREPARE"); FsmEvent orCreateEvent8 = FsmStateBuilder.GetOrCreateEvent(val, "CLIMB_PIN_AIM"); FsmEvent orCreateEvent9 = FsmStateBuilder.GetOrCreateEvent(val, "CLIMB_PIN_THREAD"); FsmEvent orCreateEvent10 = FsmStateBuilder.GetOrCreateEvent(val, "CLIMB_PIN_FIRE"); FsmEvent orCreateEvent11 = FsmStateBuilder.GetOrCreateEvent(val, "CLIMB_PIN_TIMEOUT"); AddPinArrayFsmVariables(val); FsmState val2 = FsmStateBuilder.FindState(val, "Antic"); FsmState val3 = FsmStateBuilder.FindState(val, "Release Pin"); FsmState val4 = FsmStateBuilder.FindState(val, "Attack Pause"); FsmState val5 = FsmStateBuilder.FindState(val, "Managed Dormant"); if (val2 == null) { Log.Warn("[FWPinManager] Pin FSM 未找到 Antic 状态"); return; } if (val5 == null) { val5 = FsmStateBuilder.CreateAndAddState(val, "Managed Dormant", "Managed dormant (no auto attack)"); val5.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)new SetMeshRenderer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, active = new FsmBool(FsmBool.op_Implicit(false)) }, (FsmStateAction)new SetMeshRenderer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = new FsmGameObject { Value = GetThreadGameObject(val) } }, active = new FsmBool(FsmBool.op_Implicit(false)) } }; if (val4 != null) { val5.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(fsmEvent, val4) }; } } FsmState val6 = FsmStateBuilder.CreateAndAddState(val, "PinArray Slam Prepare", "PinArray 砸地预备"); FsmState val7 = FsmStateBuilder.CreateAndAddState(val, "PinArray Slam PreFire", "PinArray 砸地发射前"); FsmState val8 = FsmStateBuilder.CreateAndAddState(val, "PinArray Slam Fire", "PinArray 砸地发射"); FsmState val9 = FsmStateBuilder.CreateAndAddState(val, "PinArray Slam Thunk", "PinArray 砸地落地"); FsmState val10 = FsmStateBuilder.CreateAndAddState(val, "PinArray Slam Recover", "PinArray 砸地恢复"); FsmState val11 = FsmStateBuilder.CreateAndAddState(val, "PinArray Lift", "PinArray 抬起"); FsmState val12 = FsmStateBuilder.CreateAndAddState(val, "PinArray PostLift", "PinArray 抬起后处理"); FsmState val13 = FsmStateBuilder.CreateAndAddState(val, "PinArray Scramble Check", "PinArray 检查位置"); FsmState val14 = FsmStateBuilder.CreateAndAddState(val, "PinArray Scramble Ground", "PinArray 地面基准角度"); FsmState val15 = FsmStateBuilder.CreateAndAddState(val, "PinArray Scramble Air", "PinArray 空中基准角度"); FsmState val16 = FsmStateBuilder.CreateAndAddState(val, "PinArray Scramble Calc", "PinArray 计算并旋转"); FsmState val17 = FsmStateBuilder.CreateAndAddState(val, "PinArray Ready", "PinArray 等待攻击"); AddPinArraySlamPrepareActions(val, val6); AddPinArraySlamPreFireActions(val, val7); AddPinArraySlamFireActions(val, val8, orCreateEvent4); AddPinArraySlamThunkActions(val, val9); AddPinArraySlamRecoverActions(val, val10); AddPinArrayLiftActions(val, val11, orCreateEvent3); AddPinArrayPostLiftActions(val, val12); AddPinArrayScrambleCheckActions(val, val13, orCreateEvent5, orCreateEvent6); AddPinArrayScrambleGroundActions(val, val14); AddPinArrayScrambleAirActions(val, val15); AddPinArrayScrambleCalcActions(val, val16); AddPinArrayReadyActions(val, val17); FsmStateBuilder.SetFinishedTransition(val6, val7); FsmStateBuilder.SetFinishedTransition(val7, val8); val8.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(orCreateEvent4, val9) }; FsmStateBuilder.SetFinishedTransition(val9, val10); FsmStateBuilder.SetFinishedTransition(val10, val11); FsmStateBuilder.SetFinishedTransition(val12, val13); val13.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(orCreateEvent5, val14), FsmStateBuilder.CreateTransition(orCreateEvent6, val15) }; FsmStateBuilder.SetFinishedTransition(val14, val16); FsmStateBuilder.SetFinishedTransition(val15, val16); FsmStateBuilder.SetFinishedTransition(val16, val17); val17.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(fsmEvent, val2) }; FsmState val18 = FsmStateBuilder.CreateAndAddState(val, "ClimbPin Prepare", "ClimbPin 准备阶段"); FsmState val19 = FsmStateBuilder.CreateAndAddState(val, "ClimbPin Follow", "ClimbPin 跟随阶段"); FsmState val20 = FsmStateBuilder.CreateAndAddState(val, "ClimbPin Aim", "ClimbPin 瞄准阶段"); FsmState val21 = FsmStateBuilder.CreateAndAddState(val, "ClimbPin Antic", "ClimbPin 预备动画"); FsmState val22 = FsmStateBuilder.CreateAndAddState(val, "ClimbPin WaitThread", "ClimbPin 等待发射命令"); FsmState val23 = FsmStateBuilder.CreateAndAddState(val, "ClimbPin Thread Pull", "ClimbPin 丝线拉动"); FsmState val24 = FsmStateBuilder.CreateAndAddState(val, "ClimbPin Fire", "ClimbPin 发射阶段"); FsmState val25 = FsmStateBuilder.CreateAndAddState(val, "ClimbPin Recycle", "ClimbPin 回收阶段"); AddClimbPinPrepareActions(val, val18); AddClimbPinFollowActions(val, val19); AddClimbPinAimActions(val, val20); AddClimbPinAnticActions(val, val21); AddClimbPinWaitThreadActions(val, val22); AddClimbPinThreadPullActions(val, val23, orCreateEvent10); AddClimbPinFireActions(val, val24, orCreateEvent11, pinObj); AddClimbPinRecycleActions(val, val25, pinObj); FsmStateBuilder.SetFinishedTransition(val18, val19); FsmStateBuilder.SetFinishedTransition(val20, val21); FsmStateBuilder.SetFinishedTransition(val21, val22); val22.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(orCreateEvent9, val23) }; val23.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(orCreateEvent10, val24) }; val24.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(orCreateEvent11, val25) }; FsmStateBuilder.SetFinishedTransition(val25, val5); List list = val.Fsm.globalTransitions.ToList(); list.Add(FsmStateBuilder.CreateTransition(orCreateEvent, val2)); list.Add(FsmStateBuilder.CreateTransition(orCreateEvent2, val6)); list.Add(FsmStateBuilder.CreateTransition(orCreateEvent3, val12)); list.Add(FsmStateBuilder.CreateTransition(orCreateEvent7, val18)); list.Add(FsmStateBuilder.CreateTransition(orCreateEvent8, val20)); val.Fsm.globalTransitions = list.ToArray(); if (val3 != null) { List list2 = val3.Actions.ToList(); CallMethod val26 = new CallMethod(); val26.behaviour = FsmObject.op_Implicit((Object)(object)this); val26.methodName = FsmString.op_Implicit("RecyclePinProjectile"); val26.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar { type = (VariableType)3, objectReference = (Object)(object)pinObj } }; val26.everyFrame = false; CallMethod item = val26; list2.Add((FsmStateAction)(object)item); val3.Actions = list2.ToArray(); } val.Fsm.InitData(); Log.Debug("[FWPinManager] Pin FSM 已补丁,添加 DIRECT_FIRE/PINARRAY_SLAM/PINARRAY_LIFT/CLIMB_PIN 全局转换"); } private void AddPinArrayFsmVariables(PlayMakerFSM fsm) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Expected O, but got Unknown //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Expected O, but got Unknown //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Expected O, but got Unknown //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Expected O, but got Unknown //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Expected O, but got Unknown //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Expected O, but got Unknown FsmVariables fsmVariables = fsm.FsmVariables; List list = fsmVariables.FloatVariables.ToList(); if (!list.Any((FsmFloat v) => ((NamedVariable)v).Name == "CurrentY")) { list.Add(new FsmFloat("CurrentY") { Value = 0f }); } if (!list.Any((FsmFloat v) => ((NamedVariable)v).Name == "LiftDistance")) { list.Add(new FsmFloat("LiftDistance") { Value = 0.2f }); } if (!list.Any((FsmFloat v) => ((NamedVariable)v).Name == "TargetY")) { list.Add(new FsmFloat("TargetY") { Value = 0f }); } if (!list.Any((FsmFloat v) => ((NamedVariable)v).Name == "CenterY")) { list.Add(new FsmFloat("CenterY") { Value = 146f }); } if (!list.Any((FsmFloat v) => ((NamedVariable)v).Name == "BaseAngle")) { list.Add(new FsmFloat("BaseAngle") { Value = 0f }); } if (!list.Any((FsmFloat v) => ((NamedVariable)v).Name == "RandomOffset")) { list.Add(new FsmFloat("RandomOffset") { Value = 0f }); } if (!list.Any((FsmFloat v) => ((NamedVariable)v).Name == "TargetAngle")) { list.Add(new FsmFloat("TargetAngle") { Value = 0f }); } if (!list.Any((FsmFloat v) => ((NamedVariable)v).Name == "ClimbPinTargetX")) { list.Add(new FsmFloat("ClimbPinTargetX") { Value = 0f }); } if (!list.Any((FsmFloat v) => ((NamedVariable)v).Name == "ClimbPinTargetY")) { list.Add(new FsmFloat("ClimbPinTargetY") { Value = 0f }); } if (!list.Any((FsmFloat v) => ((NamedVariable)v).Name == "ClimbPinAimAngle")) { list.Add(new FsmFloat("ClimbPinAimAngle") { Value = -90f }); } if (!list.Any((FsmFloat v) => ((NamedVariable)v).Name == "ClimbPinAimOffsetDirection")) { list.Add(new FsmFloat("ClimbPinAimOffsetDirection") { Value = -1f }); } if (!list.Any((FsmFloat v) => ((NamedVariable)v).Name == "ClimbPinAimOffset")) { list.Add(new FsmFloat("ClimbPinAimOffset") { Value = 0.3f }); } fsmVariables.FloatVariables = list.ToArray(); fsmVariables.Init(); Log.Debug("[FWPinManager] 已添加 PinArray FSM 变量"); } private FsmFloat GetFsmFloatVariable(PlayMakerFSM fsm, string name) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown FsmFloat val = fsm.FsmVariables.FindFsmFloat(name); if (val == null) { Log.Warn("[FWPinManager] 未找到 FSM 变量: " + name); return new FsmFloat(name) { Value = 0f }; } return val; } private FsmGameObject GetFsmGameObjectVariable(PlayMakerFSM fsm, string name) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown FsmGameObject val = fsm.FsmVariables.FindFsmGameObject(name); if (val == null) { Log.Warn("[FWPinManager] 未找到 FSM GameObject 变量: " + name); return new FsmGameObject(name) { Value = null }; } return val; } private GameObject? GetThreadGameObject(PlayMakerFSM fsm) { FsmGameObject val = fsm.FsmVariables.FindFsmGameObject("Thread"); return (val != null) ? val.Value : null; } private GameObject? GetDamagerGameObject(PlayMakerFSM fsm) { FsmGameObject val = fsm.FsmVariables.FindFsmGameObject("Damager"); return (val != null) ? val.Value : null; } private void ResetPinFsmVariables(PlayMakerFSM fsm) { FsmVariables fsmVariables = fsm.FsmVariables; FsmFloat val = fsmVariables.FindFsmFloat("CurrentY"); if (val != null) { val.Value = 0f; } FsmFloat val2 = fsmVariables.FindFsmFloat("LiftDistance"); if (val2 != null) { val2.Value = 0.2f; } FsmFloat val3 = fsmVariables.FindFsmFloat("TargetY"); if (val3 != null) { val3.Value = 0f; } FsmFloat val4 = fsmVariables.FindFsmFloat("CenterY"); if (val4 != null) { val4.Value = 146f; } FsmFloat val5 = fsmVariables.FindFsmFloat("BaseAngle"); if (val5 != null) { val5.Value = 0f; } FsmFloat val6 = fsmVariables.FindFsmFloat("RandomOffset"); if (val6 != null) { val6.Value = 0f; } FsmFloat val7 = fsmVariables.FindFsmFloat("TargetAngle"); if (val7 != null) { val7.Value = 0f; } FsmFloat val8 = fsmVariables.FindFsmFloat("ClimbPinTargetX"); if (val8 != null) { val8.Value = 0f; } FsmFloat val9 = fsmVariables.FindFsmFloat("ClimbPinTargetY"); if (val9 != null) { val9.Value = 0f; } FsmFloat val10 = fsmVariables.FindFsmFloat("ClimbPinAimAngle"); if (val10 != null) { val10.Value = -90f; } FsmFloat val11 = fsmVariables.FindFsmFloat("ClimbPinAimOffsetDirection"); if (val11 != null) { val11.Value = -1f; } FsmFloat val12 = fsmVariables.FindFsmFloat("ClimbPinAimOffset"); if (val12 != null) { val12.Value = 0.3f; } } private void AddPinArraySlamPrepareActions(PlayMakerFSM fsm, FsmState state) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0036: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SetMeshRenderer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, active = new FsmBool(FsmBool.op_Implicit(true)) }); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.15f)), finishEvent = FsmEvent.Finished }); state.Actions = list.ToArray(); } private void AddPinArraySlamPreFireActions(PlayMakerFSM fsm, FsmState state) { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Expected O, but got Unknown //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Expected O, but got Unknown //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Expected O, but got Unknown //IL_013d: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Expected O, but got Unknown //IL_0153: Expected O, but got Unknown //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Expected O, but got Unknown //IL_0181: Expected O, but got Unknown //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Expected O, but got Unknown //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Expected O, but got Unknown //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Expected O, but got Unknown //IL_01db: Expected O, but got Unknown //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Expected O, but got Unknown //IL_01f1: Expected O, but got Unknown GameObject threadGameObject = GetThreadGameObject(fsm); List list = new List(); FsmState val = ((IEnumerable)fsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Antic")); FsmStateAction? obj = ((val != null) ? ((IEnumerable)val.Actions).FirstOrDefault((Func)((FsmStateAction a) => a is PlayAudioEvent)) : null); PlayAudioEvent val2 = (PlayAudioEvent)(object)((obj is PlayAudioEvent) ? obj : null); if (val2 != null) { list.Add((FsmStateAction)new PlayAudioEvent { Fsm = fsm.Fsm, audioClip = val2.audioClip, volume = ((PlayAudioEventBase)val2).volume, pitchMin = ((PlayAudioEventBase)val2).pitchMin, pitchMax = ((PlayAudioEventBase)val2).pitchMax, audioPlayerPrefab = ((PlayAudioEventBase)val2).audioPlayerPrefab, spawnPoint = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, spawnPosition = ((PlayAudioEventBase)val2).spawnPosition, SpawnedPlayerRef = ((PlayAudioEventBase)val2).SpawnedPlayerRef }); } if ((Object)(object)threadGameObject != (Object)null) { list.Add((FsmStateAction)new SetMeshRenderer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = new FsmGameObject { Value = threadGameObject } }, active = new FsmBool(FsmBool.op_Implicit(true)) }); list.Add((FsmStateAction)new Tk2dPlayAnimationWithEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = new FsmGameObject { Value = threadGameObject } }, clipName = new FsmString("Pin Thread") { Value = "Pin Thread" }, animationCompleteEvent = FsmEvent.Finished }); list.Add((FsmStateAction)new Tk2dPlayFrame { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = new FsmGameObject { Value = threadGameObject } }, frame = new FsmInt(FsmInt.op_Implicit(0)) }); } list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.55f)), finishEvent = FsmEvent.Finished }); state.Actions = list.ToArray(); } private void AddPinArraySlamFireActions(PlayMakerFSM fsm, FsmState state, FsmEvent landEvent) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00be: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Expected O, but got Unknown //IL_00ee: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Expected O, but got Unknown //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Expected O, but got Unknown //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Expected O, but got Unknown //IL_01b1: Expected O, but got Unknown //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Expected O, but got Unknown //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Expected O, but got Unknown //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Expected O, but got Unknown //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Expected O, but got Unknown //IL_0224: Expected O, but got Unknown //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0050: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0066: Expected O, but got Unknown //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Expected O, but got Unknown //IL_0260: Expected O, but got Unknown //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Expected O, but got Unknown //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Expected O, but got Unknown //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Expected O, but got Unknown GameObject threadGameObject = GetThreadGameObject(fsm); GameObject damagerGameObject = GetDamagerGameObject(fsm); List list = new List(); if ((Object)(object)threadGameObject != (Object)null) { list.Add((FsmStateAction)new SetMeshRenderer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = new FsmGameObject { Value = threadGameObject } }, active = new FsmBool(FsmBool.op_Implicit(false)) }); } list.Add((FsmStateAction)new Tk2dPlayAnimation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animLibName = new FsmString("") { Value = "" }, clipName = new FsmString("Pin Fire") { Value = "Pin Fire" } }); list.Add((FsmStateAction)new SetIsKinematic2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, isKinematic = new FsmBool(FsmBool.op_Implicit(false)) }); list.Add((FsmStateAction)new SetVelocityAsAngle { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, angle = new FsmFloat(FsmFloat.op_Implicit(-90f)), speed = new FsmFloat(FsmFloat.op_Implicit(180f)), everyFrame = false }); list.Add((FsmStateAction)new Collision2dEvent { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, collision = (Collision2DType)0, collideTag = new FsmString("") { Value = "" }, sendEvent = landEvent, storeCollider = new FsmGameObject { Value = null }, storeForce = new FsmFloat { Value = 0f } }); list.Add((FsmStateAction)new Collision2dEvent { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, collision = (Collision2DType)1, collideTag = new FsmString("") { Value = "" }, sendEvent = landEvent, storeCollider = new FsmGameObject { Value = null }, storeForce = new FsmFloat { Value = 0f } }); if ((Object)(object)damagerGameObject != (Object)null) { list.Add((FsmStateAction)new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = new FsmGameObject { Value = damagerGameObject } }, activate = new FsmBool(FsmBool.op_Implicit(true)), recursive = new FsmBool(FsmBool.op_Implicit(false)), resetOnExit = true }); } state.Actions = list.ToArray(); } private void AddPinArraySlamThunkActions(PlayMakerFSM fsm, FsmState state) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown //IL_017b: Expected O, but got Unknown //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Expected O, but got Unknown DoCameraShake val = new DoCameraShake(); ((FsmStateAction)val).Reset(); val.VisibleRenderer = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }; val.Profile = new FsmObject { Value = (Object)(object)((IEnumerable)Resources.FindObjectsOfTypeAll()).FirstOrDefault((Func)((CameraShakeProfile p) => ((Object)p).name == "Small Shake")) }; val.Delay = new FsmFloat(FsmFloat.op_Implicit(0f)); FsmStateAction[] array = new FsmStateAction[5]; CallMethod val2 = new CallMethod(); val2.behaviour = FsmObject.op_Implicit((Object)(object)this); val2.methodName = FsmString.op_Implicit("ResetPinVisualState"); val2.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar { type = (VariableType)3, objectReference = (Object)(object)((Component)fsm).gameObject } }; val2.everyFrame = false; array[0] = (FsmStateAction)val2; array[1] = (FsmStateAction)new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = new FsmVector2 { Value = Vector2.zero, UseVariable = false }, x = new FsmFloat { Value = 0f, UseVariable = false }, y = new FsmFloat { Value = 0f, UseVariable = false }, everyFrame = false }; array[2] = (FsmStateAction)val; array[3] = (FsmStateAction)new SetIsKinematic2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, isKinematic = new FsmBool(FsmBool.op_Implicit(true)) }; array[4] = (FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished }; state.Actions = (FsmStateAction[])(object)array; } private void AddPinArraySlamRecoverActions(PlayMakerFSM fsm, FsmState state) { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown //IL_0048: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown GameObject damagerGameObject = GetDamagerGameObject(fsm); List list = new List(); if ((Object)(object)damagerGameObject != (Object)null) { list.Add((FsmStateAction)new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = new FsmGameObject { Value = damagerGameObject } }, activate = new FsmBool(FsmBool.op_Implicit(false)), recursive = new FsmBool(FsmBool.op_Implicit(false)), resetOnExit = false }); } list.Add((FsmStateAction)new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = new FsmVector2 { Value = Vector2.zero, UseVariable = false }, x = new FsmFloat { Value = 0f, UseVariable = false }, y = new FsmFloat { Value = 0f, UseVariable = false }, everyFrame = false }); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished }); state.Actions = list.ToArray(); } private void AddPinArrayLiftActions(PlayMakerFSM fsm, FsmState state, FsmEvent liftEvent) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Expected O, but got Unknown //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown FsmFloat fsmFloatVariable = GetFsmFloatVariable(fsm, "CurrentY"); FsmFloat fsmFloatVariable2 = GetFsmFloatVariable(fsm, "LiftDistance"); FsmFloat fsmFloatVariable3 = GetFsmFloatVariable(fsm, "TargetY"); state.Actions = (FsmStateAction[])(object)new FsmStateAction[4] { (FsmStateAction)new GetPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = new FsmVector3 { UseVariable = true }, x = new FsmFloat { UseVariable = true }, y = fsmFloatVariable, z = new FsmFloat { UseVariable = true }, space = (Space)0, everyFrame = false }, (FsmStateAction)new SetFloatValue { floatVariable = fsmFloatVariable3, floatValue = fsmFloatVariable, everyFrame = false }, (FsmStateAction)new FloatAdd { floatVariable = fsmFloatVariable3, add = fsmFloatVariable2, everyFrame = false, perSecond = false }, (FsmStateAction)new AnimateYPositionTo { GameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, ToValue = fsmFloatVariable3, localSpace = false, time = new FsmFloat(FsmFloat.op_Implicit(0.35f)), delay = new FsmFloat { UseVariable = true }, speed = new FsmFloat { UseVariable = true }, reverse = new FsmBool(FsmBool.op_Implicit(false)), easeType = (EaseType)14, finishEvent = liftEvent } }; } private void AddPinArrayPostLiftActions(PlayMakerFSM fsm, FsmState state) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0034: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0060: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown state.Actions = (FsmStateAction[])(object)new FsmStateAction[3] { (FsmStateAction)new SetMeshRenderer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, active = new FsmBool(FsmBool.op_Implicit(true)) }, (FsmStateAction)new SetIsKinematic2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, isKinematic = new FsmBool(FsmBool.op_Implicit(true)) }, (FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished } }; } private void AddPinArrayScrambleCheckActions(PlayMakerFSM fsm, FsmState state, FsmEvent isGroundEvent, FsmEvent isAirEvent) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown FsmFloat fsmFloatVariable = GetFsmFloatVariable(fsm, "CurrentY"); FsmFloat fsmFloatVariable2 = GetFsmFloatVariable(fsm, "CenterY"); state.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)new GetPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = new FsmVector3 { UseVariable = true }, x = new FsmFloat { UseVariable = true }, y = fsmFloatVariable, z = new FsmFloat { UseVariable = true }, space = (Space)0, everyFrame = false }, (FsmStateAction)new FloatCompare { float1 = fsmFloatVariable, float2 = fsmFloatVariable2, tolerance = new FsmFloat(FsmFloat.op_Implicit(1f)), equal = isAirEvent, lessThan = isGroundEvent, greaterThan = isAirEvent, everyFrame = false } }; } private void AddPinArrayScrambleGroundActions(PlayMakerFSM fsm, FsmState state) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown FsmFloat fsmFloatVariable = GetFsmFloatVariable(fsm, "BaseAngle"); state.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)new SetFloatValue { floatVariable = fsmFloatVariable, floatValue = new FsmFloat(FsmFloat.op_Implicit(90f)), everyFrame = false } }; } private void AddPinArrayScrambleAirActions(PlayMakerFSM fsm, FsmState state) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown FsmFloat fsmFloatVariable = GetFsmFloatVariable(fsm, "BaseAngle"); state.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)new SetFloatValue { floatVariable = fsmFloatVariable, floatValue = new FsmFloat(FsmFloat.op_Implicit(-90f)), everyFrame = false } }; } private void AddPinArrayScrambleCalcActions(PlayMakerFSM fsm, FsmState state) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Expected O, but got Unknown //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Expected O, but got Unknown //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Expected O, but got Unknown FsmFloat fsmFloatVariable = GetFsmFloatVariable(fsm, "BaseAngle"); FsmFloat fsmFloatVariable2 = GetFsmFloatVariable(fsm, "RandomOffset"); FsmFloat fsmFloatVariable3 = GetFsmFloatVariable(fsm, "TargetAngle"); FsmStateAction[] obj = new FsmStateAction[5] { (FsmStateAction)new RandomFloat { min = new FsmFloat(FsmFloat.op_Implicit(-45f)), max = new FsmFloat(FsmFloat.op_Implicit(45f)), storeResult = fsmFloatVariable2 }, (FsmStateAction)new SetFloatValue { floatVariable = fsmFloatVariable3, floatValue = fsmFloatVariable, everyFrame = false }, (FsmStateAction)new FloatAdd { floatVariable = fsmFloatVariable3, add = fsmFloatVariable2, everyFrame = false, perSecond = false }, default(FsmStateAction), default(FsmStateAction) }; CallMethod val = new CallMethod(); val.behaviour = FsmObject.op_Implicit((Object)(object)this); val.methodName = FsmString.op_Implicit("NormalizePinTargetAngle"); val.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar { type = (VariableType)3, objectReference = (Object)(object)((Component)fsm).gameObject } }; val.everyFrame = false; obj[3] = (FsmStateAction)val; obj[4] = (FsmStateAction)new AnimateRotationTo { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fromValue = new FsmFloat { UseVariable = true }, toValue = fsmFloatVariable3, worldSpace = false, negativeSpace = false, time = new FsmFloat(FsmFloat.op_Implicit(0.15f)), delay = new FsmFloat { UseVariable = true }, speed = new FsmFloat { UseVariable = true }, reverse = new FsmBool(FsmBool.op_Implicit(false)), easeType = (EaseType)1, finishEvent = FsmEvent.Finished }; state.Actions = (FsmStateAction[])(object)obj; } private void AddPinArrayReadyActions(PlayMakerFSM fsm, FsmState state) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown FsmStateAction[] array = new FsmStateAction[1]; CallMethod val = new CallMethod(); val.behaviour = FsmObject.op_Implicit((Object)(object)this); val.methodName = FsmString.op_Implicit("ResetPinVisualState"); val.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar { type = (VariableType)3, objectReference = (Object)(object)((Component)fsm).gameObject } }; val.everyFrame = false; array[0] = (FsmStateAction)val; state.Actions = (FsmStateAction[])(object)array; } private void AddClimbPinPrepareActions(PlayMakerFSM fsm, FsmState state) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_0065: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Expected O, but got Unknown //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SetLayer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, layer = LayerMask.NameToLayer("Ignore Raycast") }); list.Add((FsmStateAction)new SetMeshRenderer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, active = new FsmBool(FsmBool.op_Implicit(true)) }); list.Add((FsmStateAction)new SetRotation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, quaternion = new FsmQuaternion { UseVariable = true }, vector = new FsmVector3 { Value = new Vector3(0f, 0f, -90f), UseVariable = false }, xAngle = new FsmFloat { UseVariable = true }, yAngle = new FsmFloat { UseVariable = true }, zAngle = new FsmFloat { Value = -90f, UseVariable = false }, space = (Space)0, everyFrame = false, lateUpdate = false }); CallMethod val = new CallMethod(); val.behaviour = FsmObject.op_Implicit((Object)(object)this); val.methodName = FsmString.op_Implicit("ResetPinVisualState"); val.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar { type = (VariableType)3, objectReference = (Object)(object)((Component)fsm).gameObject } }; val.everyFrame = false; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished }); state.Actions = list.ToArray(); } private void AddClimbPinFollowActions(PlayMakerFSM fsm, FsmState state) { state.Actions = (FsmStateAction[])(object)new FsmStateAction[0]; } private void AddClimbPinAimActions(PlayMakerFSM fsm, FsmState state) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown FsmFloat fsmFloatVariable = GetFsmFloatVariable(fsm, "ClimbPinAimAngle"); List list = new List(); CallMethod val = new CallMethod(); val.behaviour = FsmObject.op_Implicit((Object)(object)this); val.methodName = FsmString.op_Implicit("UpdateClimbPinAim"); val.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar { type = (VariableType)3, objectReference = (Object)(object)((Component)fsm).gameObject } }; val.everyFrame = false; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new AnimateRotationTo { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fromValue = new FsmFloat { UseVariable = true }, toValue = fsmFloatVariable, worldSpace = false, negativeSpace = false, time = new FsmFloat(FsmFloat.op_Implicit(0.2f)), delay = new FsmFloat { UseVariable = true }, speed = new FsmFloat { UseVariable = true }, reverse = new FsmBool(FsmBool.op_Implicit(false)), easeType = (EaseType)1, finishEvent = FsmEvent.Finished }); state.Actions = list.ToArray(); } private void AddClimbPinAnticActions(PlayMakerFSM fsm, FsmState state) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0036: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SetMeshRenderer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, active = new FsmBool(FsmBool.op_Implicit(true)) }); list.Add((FsmStateAction)new Tk2dPlayAnimationWithEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Pin Antic") { Value = "Pin Antic" }, animationTriggerEvent = FsmEvent.Finished }); FsmState val = ((IEnumerable)fsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Antic")); FsmStateAction? obj = ((val != null) ? ((IEnumerable)val.Actions).FirstOrDefault((Func)((FsmStateAction a) => a is PlayAudioEvent)) : null); PlayAudioEvent val2 = (PlayAudioEvent)(object)((obj is PlayAudioEvent) ? obj : null); if (val2 != null) { list.Add((FsmStateAction)new PlayAudioEvent { Fsm = fsm.Fsm, audioClip = val2.audioClip, volume = ((PlayAudioEventBase)val2).volume, pitchMin = ((PlayAudioEventBase)val2).pitchMin, pitchMax = ((PlayAudioEventBase)val2).pitchMax, audioPlayerPrefab = ((PlayAudioEventBase)val2).audioPlayerPrefab, spawnPoint = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, spawnPosition = ((PlayAudioEventBase)val2).spawnPosition, SpawnedPlayerRef = ((PlayAudioEventBase)val2).SpawnedPlayerRef }); } state.Actions = list.ToArray(); } private void AddClimbPinWaitThreadActions(PlayMakerFSM fsm, FsmState state) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = FsmObject.op_Implicit((Object)(object)this); val.methodName = FsmString.op_Implicit("UpdateClimbPinAim"); val.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar { type = (VariableType)3, objectReference = (Object)(object)((Component)fsm).gameObject } }; val.everyFrame = true; list.Add((FsmStateAction)(object)val); state.Actions = list.ToArray(); } private void AddClimbPinThreadPullActions(PlayMakerFSM fsm, FsmState state, FsmEvent climbPinFireEvent) { //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_004b: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_008f: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_00e9: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_00ff: Expected O, but got Unknown GameObject threadGameObject = GetThreadGameObject(fsm); List list = new List(); if ((Object)(object)threadGameObject != (Object)null) { list.Add((FsmStateAction)new SetMeshRenderer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = new FsmGameObject { Value = threadGameObject } }, active = new FsmBool(FsmBool.op_Implicit(true)) }); list.Add((FsmStateAction)new Tk2dPlayAnimationWithEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = new FsmGameObject { Value = threadGameObject } }, clipName = new FsmString("Pin Thread") { Value = "Pin Thread" }, animationCompleteEvent = FsmEvent.Finished }); list.Add((FsmStateAction)new Tk2dPlayFrame { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = new FsmGameObject { Value = threadGameObject } }, frame = new FsmInt(FsmInt.op_Implicit(0)) }); } list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.55f)), finishEvent = climbPinFireEvent }); state.Actions = list.ToArray(); } private void AddClimbPinFireActions(PlayMakerFSM fsm, FsmState state, FsmEvent climbPinTimeoutEvent, GameObject pinObj) { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00cd: Expected O, but got Unknown //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown //IL_00fd: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Expected O, but got Unknown //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_005f: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0075: Expected O, but got Unknown //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Expected O, but got Unknown //IL_017b: Expected O, but got Unknown //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Expected O, but got Unknown //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Expected O, but got Unknown //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Expected O, but got Unknown //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Expected O, but got Unknown //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Expected O, but got Unknown //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Expected O, but got Unknown GameObject threadGameObject = GetThreadGameObject(fsm); GameObject damagerGameObject = GetDamagerGameObject(fsm); FsmFloat fsmFloatVariable = GetFsmFloatVariable(fsm, "ClimbPinAimAngle"); List list = new List(); if ((Object)(object)threadGameObject != (Object)null) { list.Add((FsmStateAction)new SetMeshRenderer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = new FsmGameObject { Value = threadGameObject } }, active = new FsmBool(FsmBool.op_Implicit(false)) }); } list.Add((FsmStateAction)new Tk2dPlayAnimation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animLibName = new FsmString("") { Value = "" }, clipName = new FsmString("Pin Fire") { Value = "Pin Fire" } }); list.Add((FsmStateAction)new SetIsKinematic2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, isKinematic = new FsmBool(FsmBool.op_Implicit(false)) }); list.Add((FsmStateAction)new SetVelocityAsAngle { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, angle = fsmFloatVariable, speed = new FsmFloat(FsmFloat.op_Implicit(120f)), everyFrame = false }); if ((Object)(object)damagerGameObject != (Object)null) { list.Add((FsmStateAction)new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = new FsmGameObject { Value = damagerGameObject } }, activate = new FsmBool(FsmBool.op_Implicit(true)), recursive = new FsmBool(FsmBool.op_Implicit(false)), resetOnExit = true }); } FsmState val = ((IEnumerable)fsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Fire")); FsmStateAction? obj = ((val != null) ? ((IEnumerable)val.Actions).FirstOrDefault((Func)((FsmStateAction a) => a is PlayAudioEventRandom)) : null); PlayAudioEventRandom val2 = (PlayAudioEventRandom)(object)((obj is PlayAudioEventRandom) ? obj : null); if (val2 != null) { list.Add((FsmStateAction)new PlayAudioEventRandom { Fsm = fsm.Fsm, audioClips = val2.audioClips, pitchMin = ((PlayAudioEventBase)val2).pitchMin, pitchMax = ((PlayAudioEventBase)val2).pitchMax, volume = ((PlayAudioEventBase)val2).volume, audioPlayerPrefab = ((PlayAudioEventBase)val2).audioPlayerPrefab, spawnPoint = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, spawnPosition = ((PlayAudioEventBase)val2).spawnPosition, SpawnedPlayerRef = ((PlayAudioEventBase)val2).SpawnedPlayerRef }); } list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(4f)), finishEvent = climbPinTimeoutEvent }); state.Actions = list.ToArray(); } private void AddClimbPinRecycleActions(PlayMakerFSM fsm, FsmState state, GameObject pinObj) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0075: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Expected O, but got Unknown //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Expected O, but got Unknown //IL_0179: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00af: Expected O, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_00c5: Expected O, but got Unknown //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Expected O, but got Unknown //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Expected O, but got Unknown //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Expected O, but got Unknown //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Expected O, but got Unknown //IL_01b5: Expected O, but got Unknown //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Expected O, but got Unknown //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Expected O, but got Unknown GameObject threadGameObject = GetThreadGameObject(fsm); GameObject damagerGameObject = GetDamagerGameObject(fsm); List list = new List(); list.Add((FsmStateAction)new SetLayer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, layer = LayerMask.NameToLayer("Terrain Detector") }); list.Add((FsmStateAction)new SetMeshRenderer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, active = new FsmBool(FsmBool.op_Implicit(false)) }); if ((Object)(object)threadGameObject != (Object)null) { list.Add((FsmStateAction)new SetMeshRenderer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = new FsmGameObject { Value = threadGameObject } }, active = new FsmBool(FsmBool.op_Implicit(false)) }); } list.Add((FsmStateAction)new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = new FsmVector2 { Value = Vector2.zero, UseVariable = false }, x = new FsmFloat { Value = 0f, UseVariable = false }, y = new FsmFloat { Value = 0f, UseVariable = false }, everyFrame = false }); list.Add((FsmStateAction)new SetIsKinematic2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, isKinematic = new FsmBool(FsmBool.op_Implicit(true)) }); if ((Object)(object)damagerGameObject != (Object)null) { list.Add((FsmStateAction)new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = new FsmGameObject { Value = damagerGameObject } }, activate = new FsmBool(FsmBool.op_Implicit(false)), recursive = new FsmBool(FsmBool.op_Implicit(false)), resetOnExit = false }); } CallMethod val = new CallMethod(); val.behaviour = FsmObject.op_Implicit((Object)(object)this); val.methodName = FsmString.op_Implicit("RecyclePinProjectile"); val.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar { type = (VariableType)3, objectReference = (Object)(object)pinObj } }; val.everyFrame = false; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new SendEvent { sendEvent = FsmEvent.Finished, delay = new FsmFloat(FsmFloat.op_Implicit(0.1f)), everyFrame = false }); state.Actions = list.ToArray(); } public void SetClimbPinAimAngle(GameObject pinObj, float targetX, float targetY) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)pinObj == (Object)null) { return; } PlayMakerFSM val = FSMUtility.LocateMyFSM(pinObj, "Control"); if (!((Object)(object)val == (Object)null)) { Vector3 position = pinObj.transform.position; float num = targetX - position.x; float num2 = targetY - position.y; float value = Mathf.Atan2(num2, num) * 57.29578f; FsmFloat val2 = val.FsmVariables.FindFsmFloat("ClimbPinTargetX"); if (val2 != null) { val2.Value = targetX; } FsmFloat val3 = val.FsmVariables.FindFsmFloat("ClimbPinTargetY"); if (val3 != null) { val3.Value = targetY; } FsmFloat val4 = val.FsmVariables.FindFsmFloat("ClimbPinAimAngle"); if (val4 != null) { val4.Value = value; } } } public void SetClimbPinAimOffsetDirection(GameObject pinObj, float offsetDirection, float aimOffset) { if ((Object)(object)pinObj == (Object)null) { return; } PlayMakerFSM val = FSMUtility.LocateMyFSM(pinObj, "Control"); if (!((Object)(object)val == (Object)null)) { FsmFloat val2 = val.FsmVariables.FindFsmFloat("ClimbPinAimOffsetDirection"); if (val2 != null) { val2.Value = offsetDirection; } FsmFloat val3 = val.FsmVariables.FindFsmFloat("ClimbPinAimOffset"); if (val3 != null) { val3.Value = aimOffset; } } } public void UpdateClimbPinAim(GameObject pinObj) { //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)pinObj == (Object)null) { return; } HeroController instance = HeroController.instance; if ((Object)(object)instance == (Object)null) { return; } PlayMakerFSM val = FSMUtility.LocateMyFSM(pinObj, "Control"); if (!((Object)(object)val == (Object)null)) { FsmFloat val2 = val.FsmVariables.FindFsmFloat("ClimbPinAimOffsetDirection"); FsmFloat val3 = val.FsmVariables.FindFsmFloat("ClimbPinAimOffset"); float num = ((val2 != null) ? val2.Value : (-1f)); float num2 = ((val3 != null) ? val3.Value : 0.3f); Vector3 position = instance.transform.position; float num3 = position.x + num2 * num; float y = position.y; Vector3 position2 = pinObj.transform.position; float num4 = num3 - position2.x; float num5 = y - position2.y; float num6 = Mathf.Atan2(num5, num4) * 57.29578f; FsmFloat val4 = val.FsmVariables.FindFsmFloat("ClimbPinTargetX"); if (val4 != null) { val4.Value = num3; } FsmFloat val5 = val.FsmVariables.FindFsmFloat("ClimbPinTargetY"); if (val5 != null) { val5.Value = y; } FsmFloat val6 = val.FsmVariables.FindFsmFloat("ClimbPinAimAngle"); if (val6 != null) { val6.Value = num6; } pinObj.transform.rotation = Quaternion.Euler(0f, 0f, num6); } } public GameObject? SpawnPinProjectile(Vector3 position, Transform? parent = null) { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) if (!_initialized) { Log.Warn("[FWPinManager] 尚未初始化,无法生成 Pin Projectile"); return null; } GameObject val = null; if (_pinProjectilePool.Count > 0) { val = _pinProjectilePool[_pinProjectilePool.Count - 1]; _pinProjectilePool.RemoveAt(_pinProjectilePool.Count - 1); } else { val = CreatePinProjectileInstance(); Log.Debug("[FWPinManager] Pin Projectile 池为空,创建新实例"); } if ((Object)(object)val != (Object)null) { val.transform.SetParent(parent); val.transform.position = position; val.SetActive(true); Rigidbody2D component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.linearVelocity = Vector2.zero; component.angularVelocity = 0f; component.bodyType = (RigidbodyType2D)1; } ResetPinVisualState(val); PlayMakerFSM val2 = FSMUtility.LocateMyFSM(val, "Control"); if ((Object)(object)val2 != (Object)null) { ResetPinFsmVariables(val2); val2.Fsm.InitData(); FsmState val3 = FsmStateBuilder.FindState(val2, "Managed Dormant"); if (val3 != null) { val2.SetState(val3.Name); } else { FsmState val4 = FsmStateBuilder.FindState(val2, "Dormant"); if (val4 != null) { val2.SetState(val4.Name); } } } } return val; } public void RecyclePinProjectile(GameObject obj) { if (!((Object)(object)obj == (Object)null) && !((Object)(object)_poolContainer == (Object)null)) { obj.transform.SetParent(_poolContainer.transform); _pinProjectilePool.Add(obj); obj.SetActive(false); Log.Debug($"[FWPinManager] Pin Projectile 已回收,池中数量: {_pinProjectilePool.Count}"); } } public void ResetPinVisualState(GameObject pinObj) { if ((Object)(object)pinObj == (Object)null) { return; } tk2dSpriteAnimator component = pinObj.GetComponent(); if (!((Object)(object)component != (Object)null)) { return; } tk2dSpriteAnimationClip clipByName = component.GetClipByName("Pin Antic"); if (clipByName != null) { component.Play(clipByName); if (clipByName.frames != null && clipByName.frames.Length != 0) { component.SetFrame(clipByName.frames.Length - 1, false); } component.Stop(); } } public void NormalizePinTargetAngle(GameObject pinObj) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)pinObj == (Object)null) { return; } PlayMakerFSM val = FSMUtility.LocateMyFSM(pinObj, "Control"); if (!((Object)(object)val == (Object)null)) { FsmFloat val2 = val.FsmVariables.FindFsmFloat("TargetAngle"); if (val2 != null) { float z = pinObj.transform.localEulerAngles.z; float value = val2.Value; float num = Mathf.DeltaAngle(z, value); val2.Value = z + num; } } } public void RecycleAllPinProjectiles() { GameObject[] array = Object.FindObjectsByType((FindObjectsSortMode)0); GameObject[] array2 = array; foreach (GameObject val in array2) { if (((Object)val).name.Contains("FW Pin Projectile") && val.activeInHierarchy) { Transform parent = val.transform.parent; GameObject? poolContainer = _poolContainer; if ((Object)(object)parent != (Object)(object)((poolContainer != null) ? poolContainer.transform : null)) { RecyclePinProjectile(val); } } } } public void CleanupPool() { Log.Info("[FWPinManager] 开始清理对象池..."); ((MonoBehaviour)this).StopAllCoroutines(); GameObject[] array = Object.FindObjectsByType((FindObjectsSortMode)0); GameObject[] array2 = array; foreach (GameObject val in array2) { if ((Object)(object)val != (Object)null && ((Object)val).name.Contains("FW Pin Projectile")) { Transform parent = val.transform.parent; GameObject? poolContainer = _poolContainer; if ((Object)(object)parent != (Object)(object)((poolContainer != null) ? poolContainer.transform : null)) { Object.Destroy((Object)(object)val); } } } foreach (GameObject item in _pinProjectilePool) { if ((Object)(object)item != (Object)null) { Object.Destroy((Object)(object)item); } } _pinProjectilePool.Clear(); if ((Object)(object)_poolContainer != (Object)null) { Object.Destroy((Object)(object)_poolContainer); _poolContainer = null; } _pinProjectilePrefab = null; _firstWeaverAnimGO = null; _pinAnimation = null; _pinSpriteCollection = null; _initialized = false; _initializing = false; Log.Info("[FWPinManager] 对象池清理完成"); } } internal class LaceCircleSlashManager : MonoBehaviour { [CompilerGenerated] private sealed class d__12 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public LaceCircleSlashManager <>4__this; private GameObject 5__1; private int 5__2; private LaceCircleSlashBehavior 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__12(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_00d0: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)<>4__this._assetManager == (Object)null) { <>4__this._assetManager = ((Component)<>4__this).GetComponent(); if ((Object)(object)<>4__this._assetManager == (Object)null) { Log.Error("LaceCircleSlashManager: 无法找到 AssetManager 组件,初始化失败"); return false; } } 5__1 = <>4__this._assetManager.Get("lace_circle_slash"); if ((Object)(object)5__1 == (Object)null) { Log.Error("LaceCircleSlashManager: 无法从 AssetManager 获取 lace_circle_slash"); return false; } Log.Info($"LaceCircleSlashManager: 成功获取 lace_circle_slash,原始大小: {5__1.transform.localScale}"); 5__2 = 0; while (5__2 < 5) { 5__3 = <>4__this.CreateInstance(5__1, 5__2); if ((Object)(object)5__3 != (Object)null) { <>4__this._instances.Add(5__3); } 5__3 = null; 5__2++; } <>4__this._initialized = true; Log.Info($"LaceCircleSlashManager: 初始化完成,创建了 {<>4__this._instances.Count} 个实例"); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const string BossSceneName = "Cradle_03"; private const int InstanceCount = 5; private const float ScaleMultiplier = 2f; private const float DeactivateTime = 2f; private List _instances = new List(); private AssetManager? _assetManager; private bool _initialized = false; private void OnEnable() { SceneManager.sceneLoaded += OnSceneLoaded; SceneManager.activeSceneChanged += OnSceneChanged; } private void OnDisable() { SceneManager.sceneLoaded -= OnSceneLoaded; SceneManager.activeSceneChanged -= OnSceneChanged; } private void Start() { _assetManager = ((Component)this).GetComponent(); if ((Object)(object)_assetManager == (Object)null) { Log.Error("LaceCircleSlashManager: 无法找到 AssetManager 组件"); } } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { if (!(((Scene)(ref scene)).name != "Cradle_03")) { Log.Info("LaceCircleSlashManager: 检测到 BOSS 场景 " + ((Scene)(ref scene)).name + ",开始初始化..."); ((MonoBehaviour)this).StartCoroutine(Initialize()); } } private void OnSceneChanged(Scene oldScene, Scene newScene) { if (((Scene)(ref oldScene)).name == "Cradle_03" && ((Scene)(ref newScene)).name != "Cradle_03") { Log.Info("LaceCircleSlashManager: 离开 BOSS 场景 " + ((Scene)(ref oldScene)).name + ",清理实例"); Cleanup(); } } [IteratorStateMachine(typeof(d__12))] private IEnumerator Initialize() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__12(0) { <>4__this = this }; } private LaceCircleSlashBehavior? CreateInstance(GameObject originalPrefab, int index) { GameObject val = Object.Instantiate(originalPrefab); ((Object)val).name = $"LaceCircleSlash_Instance_{index}"; val.SetActive(false); LaceCircleSlashBehavior laceCircleSlashBehavior = val.GetComponent(); if ((Object)(object)laceCircleSlashBehavior == (Object)null) { laceCircleSlashBehavior = val.AddComponent(); } laceCircleSlashBehavior.scaleMultiplier = 2f; laceCircleSlashBehavior.deactivateTime = 2f; Log.Info("LaceCircleSlashManager: 创建实例 " + ((Object)val).name); return laceCircleSlashBehavior; } public bool SpawnLaceCircleSlash(Vector3 position) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return SpawnLaceCircleSlash(position, 2f); } public bool SpawnLaceCircleSlash(Vector3 position, float scaleMultiplier) { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) if (!_initialized || _instances.Count == 0) { Log.Warn("LaceCircleSlashManager: 未初始化或没有可用实例"); return false; } LaceCircleSlashBehavior laceCircleSlashBehavior = _instances.FirstOrDefault((LaceCircleSlashBehavior i) => (Object)(object)i != (Object)null && !((Component)i).gameObject.activeSelf); if ((Object)(object)laceCircleSlashBehavior == (Object)null) { Log.Warn("LaceCircleSlashManager: 没有可用的实例(全部都在使用中)"); return false; } ((Component)laceCircleSlashBehavior).transform.position = position; laceCircleSlashBehavior.SetScaleMultiplier(scaleMultiplier); laceCircleSlashBehavior.ResetTimer(); ((Component)laceCircleSlashBehavior).gameObject.SetActive(true); Log.Info($"LaceCircleSlashManager: 在位置 {position} 生成 LaceCircleSlash (缩放: {scaleMultiplier}x)"); return true; } public bool IsInitialized() { return _initialized; } public void DeactivateAll() { foreach (LaceCircleSlashBehavior instance in _instances) { if ((Object)(object)instance != (Object)null && ((Component)instance).gameObject.activeSelf) { ((Component)instance).gameObject.SetActive(false); } } Log.Info("LaceCircleSlashManager: 已禁用所有活跃实例"); } public void Cleanup() { Log.Info("LaceCircleSlashManager: 开始清理..."); ((MonoBehaviour)this).StopAllCoroutines(); foreach (LaceCircleSlashBehavior instance in _instances) { if ((Object)(object)instance != (Object)null && (Object)(object)((Component)instance).gameObject != (Object)null) { Object.Destroy((Object)(object)((Component)instance).gameObject); } } _instances.Clear(); _initialized = false; Log.Info("LaceCircleSlashManager: 清理完成"); } } internal class MemoryDamageReductionManager : DamageReductionManager { } internal class MemoryManager : MonoBehaviour { [CompilerGenerated] private sealed class d__47 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryManager <>4__this; private int 5__1; private GameManager 5__2; private CustomSceneManager 5__3; private MapZone 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__47(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 0; break; case 1: <>1__state = -1; 5__2 = null; 5__3 = null; 5__1++; break; } if (5__1 < 20) { if (!IsInMemoryMode) { return false; } 5__2 = GameManager._instance; GameManager obj = 5__2; 5__3 = ((obj != null) ? obj.sm : null) ?? Object.FindFirstObjectByType(); if ((Object)(object)5__3 != (Object)null) { Scene scene = ((Component)5__3).gameObject.scene; if (((Scene)(ref scene)).name == "Cradle_03") { if ((int)5__3.mapZone != 33) { 5__4 = 5__3.mapZone; 5__3.mapZone = (MapZone)33; CustomSceneManager.IncrementVersion(); Log.Info(string.Format("[MemoryManager] 兜底设置 {0} mapZone: {1} -> {2}", "Cradle_03", 5__4, (object)(MapZone)33)); } SetForceCurrentSceneMemoryFlag(value: true); return false; } } <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__65 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryManager <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__65(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.EnableAllTransitionPoints(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__45 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryManager <>4__this; private HeroController 5__1; private HeroAnimationController 5__2; private tk2dSpriteAnimator 5__3; private Exception 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__45(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; 5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("[MemoryManager] 开始进入梦境..."); DamageStackManager.Reset(); <>4__this.SavePlayerDataBeforeEnteringMemory(); IsInMemoryMode = true; <>4__this._isInitialMemorySceneEntryPending = true; 5__1 = HeroController.instance; if ((Object)(object)5__1 == (Object)null) { Log.Error("[MemoryManager] HeroController.instance 为空!"); IsInMemoryMode = false; <>4__this._isInitialMemorySceneEntryPending = false; return false; } 5__1.StopAnimationControl(); 5__2 = 5__1.AnimCtrl; 5__3 = ((Component)5__1).GetComponent(); if ((Object)(object)5__3 != (Object)null && (Object)(object)5__2 != (Object)null) { 5__3.Play("Abyss Kneel"); <>2__current = (object)new WaitForSeconds(0.8f); <>1__state = 1; return true; } <>2__current = (object)new WaitForSeconds(1.8f); <>1__state = 3; return true; case 1: <>1__state = -1; 5__3.Play("Kneel To Prostrate"); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 2; return true; case 2: <>1__state = -1; break; case 3: <>1__state = -1; break; } SetForceCurrentSceneMemoryFlag(value: true); try { GameManager instance = GameManager._instance; if (instance != null) { instance.BeginSceneTransition(new SceneLoadInfo { SceneName = "Cradle_03", EntryGateName = "", HeroLeaveDirection = (GatePosition)5, EntryDelay = 0f, WaitForSceneTransitionCameraFade = true, Visualization = (SceneLoadVisualizations)0, AlwaysUnloadUnusedAssets = false }); } Log.Info("[MemoryManager] 场景传送已触发"); } catch (Exception ex) { 5__4 = ex; Log.Error("[MemoryManager] 场景传送失败: " + 5__4.Message); IsInMemoryMode = false; <>4__this._isInitialMemorySceneEntryPending = false; <>4__this.ForceEnablePlayerControl(); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__46 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryManager <>4__this; private HeroController 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__46(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: { <>1__state = -1; 5__1 = HeroController.instance; if ((Object)(object)5__1 == (Object)null || (Object)(object)GameManager._instance == (Object)null) { Log.Error("[MemoryManager] HeroController 或 GameManager 为空!"); return false; } <>4__this.CreateMemoryRespawnMarker(40.13f, 133.5677f, 0f); <>4__this.FadeSceneIn(); HeroController obj = 5__1; HeroController obj2 = 5__1; GameObject? memoryRespawnMarker = <>4__this._memoryRespawnMarker; <>2__current = ((MonoBehaviour)obj).StartCoroutine(obj2.Respawn((memoryRespawnMarker != null) ? memoryRespawnMarker.transform : null)); <>1__state = 2; return true; } case 2: <>1__state = -1; Log.Info("[MemoryManager] 进入梦境完成"); <>4__this.ForceEnablePlayerControl(); <>2__current = null; <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this.EnableAllTransitionPoints(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__49 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryManager <>4__this; private HeroController 5__1; private tk2dSpriteAnimator 5__2; private Exception 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__49(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("[MemoryManager] 开始退出梦境..."); DamageStackManager.Reset(); 5__1 = HeroController.instance; if ((Object)(object)5__1 == (Object)null) { Log.Error("[MemoryManager] HeroController.instance 为空!"); return false; } <>4__this.ForceDisablePlayerControl(); 5__1.StopAnimationControl(); 5__2 = ((Component)5__1).GetComponent(); if ((Object)(object)5__2 != (Object)null) { 5__2.Play("Abyss Kneel"); <>2__current = (object)new WaitForSeconds(0.8f); <>1__state = 1; return true; } <>2__current = (object)new WaitForSeconds(1.8f); <>1__state = 3; return true; case 1: <>1__state = -1; 5__2.Play("Kneel To Prostrate"); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 2; return true; case 2: <>1__state = -1; break; case 3: <>1__state = -1; break; } <>4__this._isReturningFromMemory = true; try { SetForceCurrentSceneMemoryFlag(value: false); GameManager instance = GameManager._instance; if (instance != null) { instance.BeginSceneTransition(new SceneLoadInfo { SceneName = "Cradle_03_Destroyed", EntryGateName = "", HeroLeaveDirection = (GatePosition)5, EntryDelay = 0f, WaitForSceneTransitionCameraFade = true, Visualization = (SceneLoadVisualizations)0, AlwaysUnloadUnusedAssets = false }); } Log.Info("[MemoryManager] 退出梦境传送已触发"); } catch (Exception ex) { 5__3 = ex; Log.Error("[MemoryManager] 退出梦境失败: " + 5__3.Message); <>4__this._isReturningFromMemory = false; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__50 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryManager <>4__this; private Exception 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__50(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.ForceDisablePlayerControl(); Log.Info("[MemoryManager] 强制返回 Cradle_03_Destroyed"); try { SetForceCurrentSceneMemoryFlag(value: false); GameManager instance = GameManager._instance; if (instance != null) { instance.BeginSceneTransition(new SceneLoadInfo { SceneName = "Cradle_03_Destroyed", EntryGateName = "", HeroLeaveDirection = (GatePosition)5, EntryDelay = 0f, WaitForSceneTransitionCameraFade = true, Visualization = (SceneLoadVisualizations)0, AlwaysUnloadUnusedAssets = false }); } } catch (Exception ex) { 5__1 = ex; Log.Error("[MemoryManager] 强制返回失败: " + 5__1.Message); <>4__this._isReturningFromMemory = false; } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__51 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryManager <>4__this; private float 5__1; private HeroController 5__2; private Rigidbody2D 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__51(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 0f; goto IL_0081; case 1: <>1__state = -1; 5__1 += 0.1f; goto IL_0081; case 2: <>1__state = -1; <>4__this.CreateMemoryRespawnMarker(49.7f, 133.5677f, 0f); <>4__this.FadeSceneIn(); if ((Object)(object)<>4__this._memoryRespawnMarker != (Object)null) { <>2__current = ((MonoBehaviour)5__2).StartCoroutine(5__2.Respawn(<>4__this._memoryRespawnMarker.transform)); <>1__state = 3; return true; } goto IL_020d; case 3: <>1__state = -1; goto IL_020d; case 4: { <>1__state = -1; <>4__this.EnableAllTransitionPoints(); return false; } IL_020d: Log.Info("[MemoryManager] 返回原场景完成"); <>4__this.CleanupMemoryRespawnMarker(); <>4__this.ForceEnablePlayerControl(); <>2__current = null; <>1__state = 4; return true; IL_0081: if (((Object)(object)HeroController.instance == (Object)null || (Object)(object)GameManager._instance == (Object)null) && 5__1 < 5f) { <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; } 5__2 = HeroController.instance; if ((Object)(object)5__2 == (Object)null || (Object)(object)GameManager._instance == (Object)null) { Log.Error("[MemoryManager] HeroController 或 GameManager 为空!"); return false; } <>4__this.RestorePlayerDataAfterExitingMemory(); 5__2.transform.position = new Vector3(49.7f, 133.5677f, 0f); 5__3 = ((Component)5__2).GetComponent(); if ((Object)(object)5__3 != (Object)null) { 5__3.linearVelocity = Vector2.zero; } Log.Info($"[MemoryManager] 已移动玩家到返回位置: ({49.7f}, {133.5677f})"); <>2__current = (object)new WaitForSeconds(0.3f); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__56 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryManager <>4__this; private GameObject 5__1; private Transform 5__2; private Transform 5__3; private Exception 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__56(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; 5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; case 1: <>1__state = -1; try { if ((Object)(object)HeroController.instance == (Object)null) { return false; } 5__1 = ((Component)HeroController.instance).gameObject; 5__2 = 5__1.transform.Find("Sounds"); if ((Object)(object)5__2 == (Object)null) { return false; } 5__3 = 5__2.Find("Needolin Memory"); if ((Object)(object)5__3 == (Object)null) { return false; } <>4__this._needolinAudioSource = ((Component)5__3).GetComponent(); if ((Object)(object)<>4__this._needolinAudioSource == (Object)null) { return false; } Log.Info("[MemoryManager] 音频检测设置成功"); <>4__this._isCheckingAudio = true; <>4__this._audioPlayingTimer = 0f; 5__1 = null; 5__2 = null; 5__3 = null; } catch (Exception ex) { 5__4 = ex; Log.Error("[MemoryManager] 设置音频检测失败: " + 5__4.Message); <>4__this._isCheckingAudio = false; } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private static readonly FieldInfo? ForceCurrentSceneMemoryField = typeof(GameManager).GetField("forceCurrentSceneMemory", BindingFlags.Instance | BindingFlags.NonPublic); private const string TRIGGER_SCENE = "Cradle_03_Destroyed"; private const string TARGET_SCENE = "Cradle_03"; private const float SPAWN_POS_X = 40.13f; private const float SPAWN_POS_Y = 133.5677f; private const float SPAWN_POS_Z = 0f; private const float RETURN_POS_X = 49.7f; private const float RETURN_POS_Y = 133.5677f; private const float RETURN_POS_Z = 0f; private static readonly Vector3 TRIGGER_POSITION = new Vector3(49.7935f, 133.5621f, 0.004f); private const float TRIGGER_RANGE = 15f; private AudioSource? _needolinAudioSource; private float _audioPlayingTimer = 0f; private const float REQUIRED_PLAYING_TIME = 3f; private bool _isCheckingAudio = false; private bool _hasTriggeredThisSession = false; private bool _isInTriggerScene = false; private bool _isReturningFromMemory = false; private bool _isInitialMemorySceneEntryPending = false; private const string MEMORY_RESPAWN_MARKER_NAME = "MemoryRespawnMarker"; private GameObject? _memoryRespawnMarker; private List _disabledTransitionPoints = new List(); private bool _savedAtBench; private string _savedRespawnScene = ""; private string _savedRespawnMarkerName = ""; private int _savedRespawnType; private FacingDirection _savedHazardRespawnFacing; private string _savedTempRespawnScene = ""; private string _savedTempRespawnMarker = ""; private int _savedTempRespawnType; private bool _hasSavedPlayerData = false; public static MemoryManager? Instance { get; private set; } public static bool IsInMemoryMode { get; private set; } = false; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; SceneManager.activeSceneChanged += OnSceneChanged; Log.Info("[MemoryManager] 初始化完成(简化版)"); } else { Object.Destroy((Object)(object)this); } } private void OnDestroy() { SceneManager.activeSceneChanged -= OnSceneChanged; } private void OnSceneChanged(Scene oldScene, Scene newScene) { Log.Info("[MemoryManager] 场景切换: " + ((Scene)(ref oldScene)).name + " → " + ((Scene)(ref newScene)).name); if (((Scene)(ref newScene)).name == "Menu_Title" || ((Scene)(ref newScene)).name == "Quit_To_Menu" || ((Scene)(ref newScene)).name == "PermaDeath") { ResetMemoryStateOnEnterMenu(); return; } if (!IsInMemoryMode) { RepairCorruptedRespawnIfNeeded(((Scene)(ref newScene)).name); } if (((Scene)(ref newScene)).name == "Cradle_03") { if (IsInMemoryMode) { Log.Info("[MemoryManager] ====== 进入梦境 Cradle_03 ======"); SetForceCurrentSceneMemoryFlag(value: true); ((MonoBehaviour)this).StartCoroutine(ApplyMemorySceneSettingsWhenReady()); SwitchToMemoryPool(); DisableAllTransitionPoints(); CreateMemoryRespawnMarker(40.13f, 133.5677f, 0f); if (_isInitialMemorySceneEntryPending) { _isInitialMemorySceneEntryPending = false; ((MonoBehaviour)this).StartCoroutine(EnterMemorySceneRoutine()); } else { Log.Info("[MemoryManager] 检测到梦境场景重载,交由原游戏/KIS复活流程处理"); ((MonoBehaviour)this).StartCoroutine(EnableTransitionPointsAfterDelay()); } _hasTriggeredThisSession = false; ((MonoBehaviour)this).StartCoroutine(SetupAudioDetection()); } else { SetForceCurrentSceneMemoryFlag(value: false); SwitchToNormalPoolIfNeeded(); } _isInTriggerScene = false; _audioPlayingTimer = 0f; } else if (((Scene)(ref newScene)).name == "Cradle_03_Destroyed") { Log.Info("[MemoryManager] 进入触发场景: Cradle_03_Destroyed"); bool flag = _isReturningFromMemory || (((Scene)(ref oldScene)).name == "Cradle_03" && IsInMemoryMode); _isInTriggerScene = true; _hasTriggeredThisSession = false; _isCheckingAudio = false; _audioPlayingTimer = 0f; if (flag) { Log.Info("[MemoryManager] 从梦境返回,设置返回位置"); _isReturningFromMemory = false; IsInMemoryMode = false; SetForceCurrentSceneMemoryFlag(value: false); DisableAllTransitionPoints(); ((MonoBehaviour)this).StartCoroutine(ReturnFromMemoryRoutine()); } if (CheckIsAct3()) { Log.Info("[MemoryManager] 确认为第三章,启动弹琴检测"); ((MonoBehaviour)this).StartCoroutine(SetupAudioDetection()); } } else if (((Scene)(ref oldScene)).name == "Cradle_03" && IsInMemoryMode) { if (!IsCurrentPlayerHornet()) { Log.Info("[MemoryManager] 非大黄蜂玩家离开梦境场景: " + ((Scene)(ref oldScene)).name + " → " + ((Scene)(ref newScene)).name + ",不强制返回"); RestorePlayerDataAfterExitingMemory(); IsInMemoryMode = false; _isReturningFromMemory = false; _isInitialMemorySceneEntryPending = false; SetForceCurrentSceneMemoryFlag(value: false); _disabledTransitionPoints.Clear(); _isInTriggerScene = false; _isCheckingAudio = false; _audioPlayingTimer = 0f; } else { Log.Info("[MemoryManager] 梦境中尝试离开到 " + ((Scene)(ref newScene)).name + ",强制返回 Cradle_03_Destroyed"); _isReturningFromMemory = true; ((MonoBehaviour)this).StartCoroutine(ForceReturnToTriggerScene()); } } else { _isInTriggerScene = false; _isCheckingAudio = false; _audioPlayingTimer = 0f; } } private void ResetMemoryStateOnEnterMenu() { try { GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { val.GetComponent().CleanupPool(); val.GetComponent().CleanupPool(); val.GetComponent().Cleanup(); val.GetComponent().CleanupPool(); val.GetComponent().CleanupPrefab(); } ((MonoBehaviour)this).StopAllCoroutines(); CleanupMemoryRespawnMarker(); _disabledTransitionPoints.Clear(); _isReturningFromMemory = false; _isInitialMemorySceneEntryPending = false; _isInTriggerScene = false; _isCheckingAudio = false; _hasTriggeredThisSession = false; _audioPlayingTimer = 0f; if (IsInMemoryMode) { IsInMemoryMode = false; } SetForceCurrentSceneMemoryFlag(value: false); _hasSavedPlayerData = false; } catch (Exception ex) { Log.Error("[MemoryManager] 进入主菜单时重置梦境状态失败: " + ex.Message); } } private void Update() { if (_isInTriggerScene && !IsInMemoryMode && _isCheckingAudio && !_hasTriggeredThisSession) { if (IsPlayerInTriggerRange()) { CheckAudioForEnterMemory(); } else { _audioPlayingTimer = 0f; } } if (IsInMemoryMode && _isCheckingAudio && !_hasTriggeredThisSession) { CheckAudioForExitMemory(); } } private void CheckAudioForEnterMemory() { if ((Object)(object)_needolinAudioSource == (Object)null) { ((MonoBehaviour)this).StartCoroutine(SetupAudioDetection()); } else if (_needolinAudioSource.isPlaying) { _audioPlayingTimer += Time.deltaTime; if (_audioPlayingTimer >= 3f) { Log.Info("[MemoryManager] 弹琴触发进入梦境!"); _hasTriggeredThisSession = true; _isCheckingAudio = false; ForceDisablePlayerControl(); ((MonoBehaviour)this).StartCoroutine(EnterMemoryMode()); } } else { _audioPlayingTimer = 0f; } } [IteratorStateMachine(typeof(d__45))] private IEnumerator EnterMemoryMode() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__45(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__46))] private IEnumerator EnterMemorySceneRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__46(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__47))] private IEnumerator ApplyMemorySceneSettingsWhenReady() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__47(0) { <>4__this = this }; } private void CheckAudioForExitMemory() { if ((Object)(object)_needolinAudioSource == (Object)null) { ((MonoBehaviour)this).StartCoroutine(SetupAudioDetection()); } else if (_needolinAudioSource.isPlaying) { _audioPlayingTimer += Time.deltaTime; if (_audioPlayingTimer >= 3f) { Log.Info("[MemoryManager] 弹琴触发退出梦境!"); _hasTriggeredThisSession = true; _isCheckingAudio = false; ((MonoBehaviour)this).StartCoroutine(ExitMemoryByPlaying()); } } else { _audioPlayingTimer = 0f; } } [IteratorStateMachine(typeof(d__49))] private IEnumerator ExitMemoryByPlaying() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__49(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__50))] private IEnumerator ForceReturnToTriggerScene() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__50(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__51))] private IEnumerator ReturnFromMemoryRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__51(0) { <>4__this = this }; } private void SwitchToMemoryPool() { Log.Info("[MemoryManager] 统一池机制已启用,无需手动切换池子"); } private void SwitchToNormalPoolIfNeeded() { Log.Info("[MemoryManager] 统一池机制已启用,无需切换池子"); } private bool CheckIsAct3() { try { if ((Object)(object)GameManager.instance == (Object)null || PlayerData.instance == null) { return false; } SaveGameData saveGameData = GameManager.instance.GetSaveGameData(PlayerData.instance.profileID); SaveStats saveStatsFromData = GameManager.GetSaveStatsFromData(saveGameData); return saveStatsFromData.IsAct3; } catch (Exception ex) { Log.Error("[MemoryManager] 检测第三章失败: " + ex.Message); return false; } } private bool IsPlayerInTriggerRange() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)HeroController.instance == (Object)null) { return false; } Vector3 position = HeroController.instance.transform.position; float num = Vector3.Distance(position, TRIGGER_POSITION); return num <= 15f; } [IteratorStateMachine(typeof(d__56))] private IEnumerator SetupAudioDetection() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__56(0) { <>4__this = this }; } private void CreateMemoryRespawnMarker(float x, float y, float z) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_007f: Expected O, but got Unknown try { CleanupMemoryRespawnMarker(); _memoryRespawnMarker = new GameObject("MemoryRespawnMarker"); _memoryRespawnMarker.transform.position = new Vector3(x, y, z); _memoryRespawnMarker.transform.rotation = Quaternion.identity; RespawnMarker val = _memoryRespawnMarker.AddComponent(); val.respawnFacingRight = true; val.customWakeUp = false; OverrideFloat val2 = new OverrideFloat(); ((OverrideValue)val2).IsEnabled = false; ((OverrideValue)val2).Value = 0f; val.customFadeDuration = val2; Log.Info($"[MemoryManager] 创建重生标记: ({x}, {y}, {z})"); } catch (Exception ex) { Log.Error("[MemoryManager] 创建重生标记失败: " + ex.Message); } } private void CleanupMemoryRespawnMarker() { if ((Object)(object)_memoryRespawnMarker != (Object)null) { Object.Destroy((Object)(object)_memoryRespawnMarker); _memoryRespawnMarker = null; } } private void FadeSceneIn() { try { GameManager instance = GameManager._instance; if (instance != null) { PlayMakerFSM screenFader_fsm = instance.screenFader_fsm; if (screenFader_fsm != null) { screenFader_fsm.SendEvent("SCENE FADE IN"); } } } catch (Exception ex) { Log.Error("[MemoryManager] 屏幕淡入失败: " + ex.Message); } } private void ForceDisablePlayerControl() { HeroController instance = HeroController.instance; if ((Object)(object)instance == (Object)null) { return; } GameManager instance2 = GameManager._instance; if (instance2 != null) { InputHandler inputHandler = instance2.inputHandler; if (inputHandler != null) { inputHandler.StopAcceptingInput(); } } instance.RelinquishControl(); instance.StopAnimationControl(); CancelSilkSpecialsFSM(instance); } private void ForceEnablePlayerControl() { HeroController instance = HeroController.instance; if ((Object)(object)instance == (Object)null) { return; } GameManager instance2 = GameManager._instance; if (instance2 != null) { InputHandler inputHandler = instance2.inputHandler; if (inputHandler != null) { inputHandler.StartAcceptingInput(); } } instance.RegainControl(); instance.StartAnimationControl(); } private void CancelSilkSpecialsFSM(HeroController hero) { try { PlayMakerFSM[] componentsInChildren = ((Component)hero).GetComponentsInChildren(true); PlayMakerFSM[] array = componentsInChildren; foreach (PlayMakerFSM val in array) { if (val.FsmName == "Silk Specials") { val.SendEvent("CANCEL"); break; } } } catch (Exception ex) { Log.Error("[MemoryManager] 取消 Silk Specials FSM 失败: " + ex.Message); } } private void DisableAllTransitionPoints() { _disabledTransitionPoints.Clear(); TransitionPoint[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); TransitionPoint[] array2 = array; foreach (TransitionPoint val in array2) { if (((Component)val).gameObject.activeSelf) { _disabledTransitionPoints.Add(val); ((Component)val).gameObject.SetActive(false); } } Log.Info($"[MemoryManager] 已禁用 {_disabledTransitionPoints.Count} 个 TransitionPoint"); } private void EnableAllTransitionPoints() { foreach (TransitionPoint disabledTransitionPoint in _disabledTransitionPoints) { if ((Object)(object)disabledTransitionPoint != (Object)null) { ((Component)disabledTransitionPoint).gameObject.SetActive(true); } } Log.Info($"[MemoryManager] 已启用 {_disabledTransitionPoints.Count} 个 TransitionPoint"); _disabledTransitionPoints.Clear(); } [IteratorStateMachine(typeof(d__65))] private IEnumerator EnableTransitionPointsAfterDelay() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__65(0) { <>4__this = this }; } private void SavePlayerDataBeforeEnteringMemory() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) try { PlayerData playerData = GameManager.instance.playerData; if (playerData == null) { Log.Error("[MemoryManager] 无法获取 PlayerData,保存失败"); return; } _savedAtBench = playerData.atBench; _savedRespawnScene = playerData.respawnScene ?? ""; _savedRespawnMarkerName = playerData.respawnMarkerName ?? ""; _savedRespawnType = playerData.respawnType; _savedHazardRespawnFacing = playerData.hazardRespawnFacing; _savedTempRespawnScene = playerData.tempRespawnScene ?? ""; _savedTempRespawnMarker = playerData.tempRespawnMarker ?? ""; _savedTempRespawnType = playerData.tempRespawnType; _hasSavedPlayerData = true; Log.Info($"[MemoryManager] 已保存玩家数据 - atBench: {_savedAtBench}, respawnScene: {_savedRespawnScene}, " + $"respawnMarkerName: {_savedRespawnMarkerName}, respawnType: {_savedRespawnType}, hazardRespawnFacing: {_savedHazardRespawnFacing}"); } catch (Exception ex) { Log.Error("[MemoryManager] 保存玩家数据失败: " + ex.Message); _hasSavedPlayerData = false; } } private void RestorePlayerDataAfterExitingMemory() { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) if (!_hasSavedPlayerData) { Log.Warn("[MemoryManager] 没有保存的玩家数据,跳过恢复"); return; } try { PlayerData playerData = GameManager.instance.playerData; if (playerData == null) { Log.Error("[MemoryManager] 无法获取 PlayerData,恢复失败"); return; } playerData.atBench = _savedAtBench; playerData.respawnScene = _savedRespawnScene; playerData.respawnMarkerName = _savedRespawnMarkerName; playerData.respawnType = _savedRespawnType; playerData.hazardRespawnFacing = _savedHazardRespawnFacing; playerData.tempRespawnScene = (string.IsNullOrEmpty(_savedTempRespawnScene) ? null : _savedTempRespawnScene); playerData.tempRespawnMarker = (string.IsNullOrEmpty(_savedTempRespawnMarker) ? null : _savedTempRespawnMarker); playerData.tempRespawnType = _savedTempRespawnType; Log.Info($"[MemoryManager] 已恢复玩家数据 - atBench: {_savedAtBench}, respawnScene: {_savedRespawnScene}, " + $"respawnMarkerName: {_savedRespawnMarkerName}, respawnType: {_savedRespawnType}, hazardRespawnFacing: {_savedHazardRespawnFacing}"); _hasSavedPlayerData = false; } catch (Exception ex) { Log.Error("[MemoryManager] 恢复玩家数据失败: " + ex.Message); } } private void RepairCorruptedRespawnIfNeeded(string currentSceneName) { try { if ((Object)(object)GameManager.instance == (Object)null) { return; } PlayerData playerData = GameManager.instance.playerData; if (playerData != null) { if (playerData.respawnMarkerName == "MemoryRespawnMarker") { playerData.respawnScene = currentSceneName; playerData.respawnMarkerName = "Death Respawn Marker Init"; playerData.respawnType = 0; } if (playerData.tempRespawnMarker == "MemoryRespawnMarker") { playerData.ResetTempRespawn(); } } } catch (Exception ex) { Log.Error("[MemoryManager] 修复重生点失败: " + ex.Message); } } public static bool CheckIsMemoryMode() { return IsInMemoryMode; } public static GameObject? GetCurrentHeroGameObject() { try { FsmGameObject fsmGameObject = FsmVariables.GlobalVariables.GetFsmGameObject("Hero"); if (fsmGameObject != null && (Object)(object)fsmGameObject.Value != (Object)null) { return fsmGameObject.Value; } } catch (Exception ex) { Log.Error("[MemoryManager] 获取全局 Hero 失败: " + ex.Message); } HeroController instance = HeroController.instance; return (instance != null) ? ((Component)instance).gameObject : null; } public static bool IsCurrentPlayerHornet() { if (IsKnightInSilkSongActive()) { return false; } GameObject currentHeroGameObject = GetCurrentHeroGameObject(); if (LooksLikeKnightHero(currentHeroGameObject)) { return false; } HeroController instance = HeroController.instance; if ((Object)(object)instance != (Object)null && !((Behaviour)instance).enabled) { return false; } return true; } private static bool IsKnightInSilkSongActive() { try { Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); foreach (Assembly assembly in assemblies) { Type type = assembly.GetType("KIS.KnightInSilksong"); if (!(type == null) && type.GetProperty("IsKnight", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(null) is bool result) { return result; } } } catch (Exception ex) { Log.Error("[MemoryManager] 检测 KnightInSilkSong 状态失败: " + ex.Message); } return false; } private static bool LooksLikeKnightHero(GameObject? heroObject) { if ((Object)(object)heroObject == (Object)null) { return false; } if (((Object)heroObject).name.StartsWith("Knight", StringComparison.OrdinalIgnoreCase)) { return true; } Component[] components = heroObject.GetComponents(); for (int i = 0; i < components.Length; i++) { string text = ((object)components[i])?.GetType().FullName; if (text != null && text.StartsWith("Knight.", StringComparison.Ordinal)) { return true; } } return false; } public static void SetForceCurrentSceneMemoryFlag(bool value) { try { GameManager val = GameManager._instance ?? GameManager.instance; if ((Object)(object)val == (Object)null) { Log.Warn($"[MemoryManager] GameManager 为空,无法设置 forceCurrentSceneMemory={value}"); } else if (ForceCurrentSceneMemoryField != null) { ForceCurrentSceneMemoryField.SetValue(val, value); Log.Info($"[MemoryManager] 已设置 forceCurrentSceneMemory={value}"); } else if (value) { val.ForceCurrentSceneIsMemory(true); Log.Warn("[MemoryManager] 反射字段缺失,已使用原游戏方法设置回忆模式"); } else { Log.Warn("[MemoryManager] 反射字段缺失,无法清理 forceCurrentSceneMemory=false"); } } catch (Exception ex) { Log.Error($"[MemoryManager] 设置 forceCurrentSceneMemory={value} 失败: {ex.Message}"); } } public static void ExitMemoryMode() { if (IsInMemoryMode) { Log.Info("[MemoryManager] 手动退出 Memory 模式"); IsInMemoryMode = false; } if ((Object)(object)Instance != (Object)null) { Instance._isInitialMemorySceneEntryPending = false; } SetForceCurrentSceneMemoryFlag(value: false); } public void TriggerExitMemory() { if (IsInMemoryMode) { Log.Info("[MemoryManager] 触发退出梦境(场景切换拦截)"); _isReturningFromMemory = true; ((MonoBehaviour)this).StartCoroutine(ForceReturnToTriggerScene()); } } public Transform? GetRespawnMarkerTransform() { GameObject? memoryRespawnMarker = _memoryRespawnMarker; return (memoryRespawnMarker != null) ? memoryRespawnMarker.transform : null; } } internal class SilkBallManager : MonoBehaviour { [CompilerGenerated] private sealed class d__55 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SilkBallManager <>4__this; private int 5__1; private SilkBallBehavior 5__2; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__55(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; if (!<>4__this._enableAutoPooling || !<>4__this._initialized || (Object)(object)<>4__this._customSilkBallPrefab == (Object)null || (Object)(object)<>4__this._poolContainer == (Object)null) { break; } 5__1 = <>4__this._silkBallPool.Count((SilkBallBehavior b) => (Object)(object)b != (Object)null); if (5__1 < 160) { 5__2 = <>4__this.CreateNewSilkBallInstance(); if ((Object)(object)5__2 != (Object)null) { 5__2.RecycleToPool(); } 5__2 = null; } break; } <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__43 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SilkBallManager <>4__this; private GameObject 5__1; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__43(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("=== 开始创建自定义丝球预制体 ==="); 5__1 = <>4__this._assetManager?.Get("Reaper Silk Bundle"); if ((Object)(object)5__1 == (Object)null) { Log.Error("无法获取原版丝球预制体 'Reaper Silk Bundle'"); return false; } Log.Info("成功获取原版丝球预制体: " + ((Object)5__1).name); <>4__this._customSilkBallPrefab = Object.Instantiate(5__1); ((Object)<>4__this._customSilkBallPrefab).name = "Custom Silk Ball Prefab"; <>4__this._customSilkBallPrefab.transform.SetParent(((Component)<>4__this).transform); <>4__this._customSilkBallPrefab.SetActive(false); Log.Info("丝球预制体复制完成,开始处理组件..."); <>4__this.ProcessRootComponents(); <>4__this.ProcessChildObjects(); <>4__this.ExtractAudioActions(); <>4__this.RemoveOriginalFSM(); Log.Info("=== 自定义丝球预制体创建完成: " + ((Object)<>4__this._customSilkBallPrefab).name + " ==="); <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__40 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SilkBallManager <>4__this; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__40(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (<>4__this._initialized) { Log.Info("SilkBallManager already initialized."); return false; } <>4__this._assetManager = ((Component)<>4__this).GetComponent(); if ((Object)(object)<>4__this._assetManager == (Object)null) { Log.Error("无法找到 AssetManager 组件"); return false; } <>4__this.CacheGlobalReferences(); <>2__current = <>4__this.CreateCustomSilkBallPrefab(); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this._initialized = true; Log.Info("SilkBallManager initialization completed."); <>4__this.InitializePool(); ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.AutoPoolGeneration()); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__59 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SilkBallManager <>4__this; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__59(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)<>4__this._customSilkBallPrefab != (Object)null) { <>4__this._initialized = true; Log.Info("[SilkBallManager] 预制体仍有效,直接初始化池子"); <>4__this.InitializePool(); ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.AutoPoolGeneration()); } else { Log.Warn("[SilkBallManager] 预制体丢失,执行完全重新初始化"); ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.Initialize()); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private GameObject? _customSilkBallPrefab; private AssetManager? _assetManager; private bool _initialized = false; private static Transform? _cachedHeroTransform; private static GameObject? _cachedManagerObject; private static DamageHero? _cachedOriginalDamageHero; private static bool _isReaperCrestEquipped; private FsmObject? _initAudioTable; private FsmObject? _initAudioPlayerPrefab; private FsmObject? _getSilkAudioTable; private FsmObject? _getSilkAudioPlayerPrefab; private readonly List _silkBallPool = new List(); private GameObject? _poolContainer; private bool _enableAutoPooling = false; private const int MIN_POOL_SIZE = 160; private const float POOL_GENERATION_INTERVAL = 0.1f; private int _runtimeInstantiateCount = 0; public GameObject? CustomSilkBallPrefab => _customSilkBallPrefab; public static Transform? CachedHeroTransform => _cachedHeroTransform; public static GameObject? CachedManagerObject => _cachedManagerObject; public static DamageHero? CachedOriginalDamageHero => _cachedOriginalDamageHero; public static bool IsReaperCrestEquipped => _isReaperCrestEquipped; public FsmObject? InitAudioTable => _initAudioTable; public FsmObject? InitAudioPlayerPrefab => _initAudioPlayerPrefab; public FsmObject? GetSilkAudioTable => _getSilkAudioTable; public FsmObject? GetSilkAudioPlayerPrefab => _getSilkAudioPlayerPrefab; public static void UpdateReaperCrestState() { try { _isReaperCrestEquipped = ((ToolBase)Gameplay.ReaperCrest).IsEquipped; Log.Info($"[SilkBallManager] Reaper 护符状态更新: {_isReaperCrestEquipped}"); } catch (Exception ex) { Log.Warn("[SilkBallManager] 无法获取 Reaper 护符状态: " + ex.Message); _isReaperCrestEquipped = false; } } public static void ClearAllStaticCaches() { Log.Info("[SilkBallManager] 清空所有静态缓存..."); _cachedHeroTransform = null; _cachedManagerObject = null; _cachedOriginalDamageHero = null; _isReaperCrestEquipped = false; } private void Start() { ((MonoBehaviour)this).StartCoroutine(Initialize()); } private void OnDestroy() { CleanupAllSilkBallsOnDestroy(); } private void OnDisable() { CleanupAllSilkBallsOnDestroy(); } [IteratorStateMachine(typeof(d__40))] private IEnumerator Initialize() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__40(0) { <>4__this = this }; } private void InitializePool() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown Log.Info("[SilkBallManager] 开始初始化统一池子..."); _poolContainer = new GameObject("SilkBall Pool"); _poolContainer.transform.SetParent(((Component)this).transform); _enableAutoPooling = true; Log.Info($"[SilkBallManager] 统一池子已初始化,目标大小: {160}"); } private void CacheGlobalReferences() { Log.Info("[SilkBallManager] 开始缓存全局引用..."); HeroController val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { _cachedHeroTransform = val.transform; Log.Info("[SilkBallManager] 已缓存玩家Transform: " + ((Object)val).name); } else { Log.Warn("[SilkBallManager] 未找到玩家(HeroController),玩家Transform缓存失败"); } _cachedManagerObject = ((Component)this).gameObject; Log.Info("[SilkBallManager] 已缓存管理器GameObject: " + ((Object)((Component)this).gameObject).name); DamageHeroEventManager component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { if (component.IsInitialized() && component.HasDamageHero()) { _cachedOriginalDamageHero = component.DamageHero; Log.Info("[SilkBallManager] 已缓存原始DamageHero引用"); } else { Log.Warn("[SilkBallManager] DamageHeroEventManager 未初始化或无DamageHero,稍后再尝试"); } } else { Log.Warn("[SilkBallManager] 未找到 DamageHeroEventManager 组件"); } UpdateReaperCrestState(); } [IteratorStateMachine(typeof(d__43))] private IEnumerator CreateCustomSilkBallPrefab() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__43(0) { <>4__this = this }; } private void ProcessRootComponents() { if (!((Object)(object)_customSilkBallPrefab == (Object)null)) { Log.Info("--- 处理根物体组件 ---"); Rigidbody2D component = _customSilkBallPrefab.GetComponent(); if ((Object)(object)component != (Object)null) { Log.Info($"保留 Rigidbody2D: gravityScale={component.gravityScale}, linearDamping={component.linearDamping}"); } ObjectBounce component2 = _customSilkBallPrefab.GetComponent(); if ((Object)(object)component2 != (Object)null) { Object.Destroy((Object)(object)component2); Log.Info("移除 ObjectBounce 组件"); } SetZ component3 = _customSilkBallPrefab.GetComponent(); if ((Object)(object)component3 != (Object)null) { Log.Info("保留 SetZ 组件"); } AutoRecycleSelf component4 = _customSilkBallPrefab.GetComponent(); if ((Object)(object)component4 != (Object)null) { Object.Destroy((Object)(object)component4); Log.Info("移除 AutoRecycleSelf 组件"); } EventRegister[] components = _customSilkBallPrefab.GetComponents(); EventRegister[] array = components; foreach (EventRegister val in array) { Object.Destroy((Object)(object)val); Log.Info("移除 EventRegister 组件: " + val.subscribedEvent); } Component component5 = _customSilkBallPrefab.GetComponent("bounceOnWater"); if ((Object)(object)component5 != (Object)null) { Object.Destroy((Object)(object)component5); Log.Info("移除 bounceOnWater 组件"); } } } private void ProcessChildObjects() { if ((Object)(object)_customSilkBallPrefab == (Object)null) { return; } Log.Info("--- 处理子物体 ---"); Transform val = _customSilkBallPrefab.transform.Find("Sprite Silk"); if ((Object)(object)val != (Object)null) { Log.Info("找到 Sprite Silk 子物体,保留所有组件"); CircleCollider2D component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { Log.Info($"找到 CircleCollider2D: radius={component.radius}, isTrigger={((Collider2D)component).isTrigger}"); ((Collider2D)component).isTrigger = true; } } Transform val2 = _customSilkBallPrefab.transform.Find("Terrain Collider"); if ((Object)(object)val2 != (Object)null) { ((Component)val2).gameObject.SetActive(false); Log.Info("禁用 Terrain Collider 子物体"); } } private void ExtractAudioActions() { if (!((Object)(object)_customSilkBallPrefab == (Object)null)) { Log.Info("--- 提取音效参数 ---"); PlayMakerFSM val = ((IEnumerable)_customSilkBallPrefab.GetComponents()).FirstOrDefault((Func)((PlayMakerFSM fsm) => fsm.FsmName == "Control")); if ((Object)(object)val == (Object)null) { Log.Warn("未找到原版 Control FSM,跳过音效提取"); return; } ExtractPlayRandomAudioClipTableParams(val, "Init", out _initAudioTable, out _initAudioPlayerPrefab); ExtractPlayRandomAudioClipTableParams(val, "Get Silk", out _getSilkAudioTable, out _getSilkAudioPlayerPrefab); } } private void ExtractPlayRandomAudioClipTableParams(PlayMakerFSM fsm, string stateName, out FsmObject? table, out FsmObject? audioPlayerPrefab) { string stateName2 = stateName; table = null; audioPlayerPrefab = null; FsmState val = ((IEnumerable)fsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == stateName2)); if (val == null) { Log.Warn("未找到状态: " + stateName2); return; } FsmStateAction val2 = ((IEnumerable)val.Actions).FirstOrDefault((Func)((FsmStateAction a) => ((object)a).GetType().Name == "PlayRandomAudioClipTable")); if (val2 == null) { Log.Warn("在状态 " + stateName2 + " 中未找到 PlayRandomAudioClipTable 动作"); return; } Type type = ((object)val2).GetType(); FieldInfo field = type.GetField("Table", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field2 = type.GetField("AudioPlayerPrefab", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(val2); table = (FsmObject?)((value is FsmObject) ? value : null); Log.Info("成功提取 " + stateName2 + " 的 Table 参数"); } if (field2 != null) { object? value2 = field2.GetValue(val2); audioPlayerPrefab = (FsmObject?)((value2 is FsmObject) ? value2 : null); Log.Info("成功提取 " + stateName2 + " 的 AudioPlayerPrefab 参数"); } } private void RemoveOriginalFSM() { if (!((Object)(object)_customSilkBallPrefab == (Object)null)) { PlayMakerFSM[] components = _customSilkBallPrefab.GetComponents(); PlayMakerFSM[] array = components; foreach (PlayMakerFSM val in array) { Log.Info("移除原版 FSM: " + val.FsmName); Object.Destroy((Object)(object)val); } } } private SilkBallBehavior? GetAvailableSilkBall() { SilkBallBehavior silkBallBehavior = _silkBallPool.FirstOrDefault((SilkBallBehavior b) => (Object)(object)b != (Object)null && b.IsAvailable && !b.isActive); if ((Object)(object)silkBallBehavior != (Object)null) { return silkBallBehavior; } int num = _silkBallPool.Count((SilkBallBehavior b) => (Object)(object)b != (Object)null && b.isActive); int num2 = _silkBallPool.Count((SilkBallBehavior b) => (Object)(object)b != (Object)null && b.IsAvailable); int num3 = _silkBallPool.Count((SilkBallBehavior b) => (Object)(object)b != (Object)null && ((Component)b).gameObject.activeSelf); _runtimeInstantiateCount++; Log.Warn($"[SilkBallManager] 池可用对象不足,运行时创建新实例({_runtimeInstantiateCount}) - 总数:{_silkBallPool.Count}, 激活:{num}, 可用:{num2}, GameObject启用:{num3}"); return CreateNewSilkBallInstance(); } private SilkBallBehavior? CreateNewSilkBallInstance() { if ((Object)(object)_customSilkBallPrefab == (Object)null) { Log.Error("自定义丝球预制体未初始化,无法创建实例"); return null; } if ((Object)(object)_poolContainer == (Object)null) { Log.Error("对象池容器未初始化,无法创建实例"); return null; } GameObject val = Object.Instantiate(_customSilkBallPrefab, _poolContainer.transform); ((Object)val).name = $"Silk Ball #{_silkBallPool.Count}"; SilkBallBehavior silkBallBehavior = val.AddComponent(); if ((Object)(object)silkBallBehavior == (Object)null) { Log.Error("无法添加 SilkBallBehavior 组件!"); Object.Destroy((Object)(object)val); return null; } silkBallBehavior.InitializeOnce(_poolContainer.transform, this); _silkBallPool.Add(silkBallBehavior); return silkBallBehavior; } public SilkBallBehavior? SpawnSilkBall(Vector3 position) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return SpawnSilkBall(position, 30f, 20f, 6f, 1f); } public SilkBallBehavior? SpawnSilkBall(Vector3 position, float acceleration, float maxSpeed, float chaseTime, float scale, bool enableRotation = true, Transform? customTarget = null, bool ignoreWall = false, bool delayDamageActivation = true, bool canBeClearedByAttack = true) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) SilkBallBehavior availableSilkBall = GetAvailableSilkBall(); if ((Object)(object)availableSilkBall == (Object)null) { Log.Error("无法获取可用丝球,生成失败"); return null; } availableSilkBall.PrepareForUse(position, acceleration, maxSpeed, chaseTime, scale, enableRotation, customTarget, ignoreWall, delayDamageActivation, canBeClearedByAttack); return availableSilkBall; } public void RecycleAllActiveSilkBalls() { int num = 0; foreach (SilkBallBehavior item in _silkBallPool) { if ((Object)(object)item != (Object)null && item.isActive) { item.RecycleToPool(); num++; } } Log.Info($"已回收所有活跃丝球到对象池,共 {num} 个"); } public void LogPoolStatus() { int num = _silkBallPool.Count((SilkBallBehavior b) => (Object)(object)b != (Object)null && b.IsAvailable); int num2 = _silkBallPool.Count((SilkBallBehavior b) => (Object)(object)b != (Object)null && b.isActive); int num3 = _silkBallPool.Count((SilkBallBehavior b) => (Object)(object)b != (Object)null && ((Component)b).gameObject.activeSelf); Log.Info("=== 丝球对象池状态 ==="); Log.Info($" 总数: {_silkBallPool.Count}"); Log.Info($" 可用: {num}"); Log.Info($" 活跃中: {num2}"); Log.Info($" GameObject启用: {num3}"); Log.Info($" 运行时创建次数: {_runtimeInstantiateCount}"); } [IteratorStateMachine(typeof(d__55))] private IEnumerator AutoPoolGeneration() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__55(0) { <>4__this = this }; } private void CleanupAllSilkBallsOnDestroy() { Log.Info("SilkBallManager场景切换/销毁,执行完全清理"); ((MonoBehaviour)this).StopAllCoroutines(); _enableAutoPooling = false; RecycleAllActiveSilkBalls(); if (_silkBallPool != null) { _silkBallPool.Clear(); Log.Info("已清空丝球对象池"); } if ((Object)(object)_poolContainer != (Object)null) { Object.Destroy((Object)(object)_poolContainer); _poolContainer = null; Log.Info("已销毁丝球对象池容器"); } _initialized = false; } public void ResetOnReturnToMenu() { Log.Info("[SilkBallManager] 回到主菜单,执行完全重置..."); ((MonoBehaviour)this).StopAllCoroutines(); _enableAutoPooling = false; _silkBallPool.Clear(); if ((Object)(object)_poolContainer != (Object)null) { Object.Destroy((Object)(object)_poolContainer); _poolContainer = null; } ClearAllStaticCaches(); _runtimeInstantiateCount = 0; _initialized = false; Log.Info("[SilkBallManager] 完全重置完成,等待重新进入游戏场景"); } public void ReinitializeOnEnterGame() { Log.Info("[SilkBallManager] 重新进入游戏,开始重新初始化..."); if (_initialized) { Log.Info("[SilkBallManager] 已初始化,跳过重新初始化"); return; } CacheGlobalReferences(); ((MonoBehaviour)this).StartCoroutine(ReinitializeCoroutine()); } [IteratorStateMachine(typeof(d__59))] private IEnumerator ReinitializeCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__59(0) { <>4__this = this }; } } internal class SingleWebManager : MonoBehaviour { [CompilerGenerated] private sealed class d__38 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SingleWebManager <>4__this; private int 5__1; private SingleWebBehavior 5__2; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__38(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; if (<>4__this._enableAutoPooling && <>4__this._initialized && !((Object)(object)<>4__this._singleWebStrandPrefab == (Object)null) && !((Object)(object)<>4__this._poolContainer == (Object)null)) { 5__1 = <>4__this._webPool.Count((SingleWebBehavior w) => (Object)(object)w != (Object)null); if (5__1 < 70) { 5__2 = <>4__this.CreateNewWebInstance(); 5__2?.ResetCooldown(); 5__2 = null; } } break; } <>2__current = (object)new WaitForSeconds(0.2f); <>1__state = 1; return true; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__29 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SingleWebManager <>4__this; private GameObject 5__1; private IEnumerator <>s__2; private Transform 5__3; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__29(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>s__2 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)<>4__this._pattern1Template == (Object)null) { Log.Error("Pattern 1 模板为 null,无法创建单根丝线预制体"); return false; } 5__1 = null; <>s__2 = <>4__this._pattern1Template.transform.GetEnumerator(); try { while (<>s__2.MoveNext()) { 5__3 = (Transform)<>s__2.Current; if (((Object)5__3).name.Contains("Silk Boss WebStrand")) { 5__1 = ((Component)5__3).gameObject; break; } 5__3 = null; } } finally { if (<>s__2 is IDisposable disposable) { disposable.Dispose(); } } <>s__2 = null; if ((Object)(object)5__1 == (Object)null) { Log.Error("未找到 Silk Boss WebStrand,无法创建单根丝线预制体"); return false; } <>4__this._singleWebStrandPrefab = Object.Instantiate(5__1); ((Object)<>4__this._singleWebStrandPrefab).name = "Single WebStrand Prefab"; Extensions.SetScaleX(<>4__this._singleWebStrandPrefab.transform, 5f); <>4__this._singleWebStrandPrefab.transform.SetParent(((Component)<>4__this).transform); <>4__this._singleWebStrandPrefab.SetActive(false); <>4__this.ConfigureWebStrandPrefab(); Log.Info("=== 单根丝线预制体创建完成: " + ((Object)<>4__this._singleWebStrandPrefab).name + " ==="); <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__25 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SingleWebManager <>4__this; private Transform 5__1; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__25(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("=== 开始初始化 SingleWebManager ==="); if ((Object)(object)<>4__this._singleWebStrandPrefab != (Object)null) { Object.Destroy((Object)(object)<>4__this._singleWebStrandPrefab); <>4__this._singleWebStrandPrefab = null; } <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.GetStrandPatterns(); <>4__this.GetPattern1Template(); <>4__this.CacheAudioResources(); <>2__current = <>4__this.CreateSingleWebStrandPrefab(); <>1__state = 2; return true; case 2: <>1__state = -1; 5__1 = ((Component)<>4__this).transform.Find("SingleWeb Pool"); if ((Object)(object)5__1 != (Object)null) { <>4__this._poolContainer = ((Component)5__1).gameObject; Log.Info("[SingleWebManager] 复用已存在的 SingleWeb Pool"); } else { <>4__this._poolContainer = new GameObject("SingleWeb Pool"); <>4__this._poolContainer.transform.SetParent(((Component)<>4__this).transform); Log.Info("[SingleWebManager] 创建新的 SingleWeb Pool"); } <>4__this._enableAutoPooling = true; <>4__this._initialized = true; Log.Info("=== SingleWebManager 初始化完成 ==="); ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.AutoPoolGeneration()); Log.Info($"[SingleWebManager] 统一池机制已启用,目标大小: {70}"); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private GameObject? _strandPatterns; private GameObject? _pattern1Template; private AudioClip? _appearAudioClip; private AudioClip? _burstAudioClip; private GameObject? _audioPlayerPrefab; private GameObject? _singleWebStrandPrefab; private readonly List _webPool = new List(); private GameObject? _poolContainer; private bool _initialized = false; private const string BossSceneName = "Cradle_03"; private bool _enableAutoPooling = false; private const int MIN_POOL_SIZE = 70; private const float POOL_GENERATION_INTERVAL = 0.2f; public AudioClip? AppearAudioClip => _appearAudioClip; public AudioClip? BurstAudioClip => _burstAudioClip; public GameObject? AudioPlayerPrefab => _audioPlayerPrefab; public GameObject? SingleWebStrandPrefab => _singleWebStrandPrefab; public bool IsPoolLoaded => (Object)(object)_poolContainer != (Object)null && _initialized; private void OnEnable() { SceneManager.sceneLoaded += OnSceneLoaded; SceneManager.activeSceneChanged += OnSceneChanged; } private void OnDisable() { SceneManager.sceneLoaded -= OnSceneLoaded; SceneManager.activeSceneChanged -= OnSceneChanged; } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { if (!(((Scene)(ref scene)).name != "Cradle_03")) { if (_initialized && (Object)(object)_poolContainer != (Object)null && (Object)(object)_singleWebStrandPrefab != (Object)null) { Log.Info("[SingleWebManager] 检测到 BOSS 场景 " + ((Scene)(ref scene)).name + ",已初始化,跳过重复初始化"); return; } Log.Info("检测到 BOSS 场景 " + ((Scene)(ref scene)).name + ",开始初始化 SingleWebManager..."); ((MonoBehaviour)this).StartCoroutine(Initialize()); } } private void OnSceneChanged(Scene oldScene, Scene newScene) { if (((Scene)(ref oldScene)).name == "Cradle_03" && ((Scene)(ref newScene)).name != "Cradle_03") { Log.Info("离开 BOSS 场景 " + ((Scene)(ref oldScene)).name + ",清理 SingleWebManager 缓存"); CleanupPool(); _initialized = false; } } [IteratorStateMachine(typeof(d__25))] private IEnumerator Initialize() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__25(0) { <>4__this = this }; } private void GetStrandPatterns() { GameObject val = GameObject.Find("Boss Scene"); if ((Object)(object)val != (Object)null) { Transform val2 = val.transform.Find("Strand Patterns"); if ((Object)(object)val2 != (Object)null) { _strandPatterns = ((Component)val2).gameObject; Log.Info("从 Boss Scene 找到 Strand Patterns: " + ((Object)_strandPatterns).name); return; } } Log.Error("未找到 Strand Patterns GameObject!"); } private void GetPattern1Template() { if ((Object)(object)_strandPatterns == (Object)null) { Log.Error("Strand Patterns 为 null,无法获取 Pattern 1"); return; } Transform val = _strandPatterns.transform.Find("Pattern 1"); if ((Object)(object)val != (Object)null) { _pattern1Template = ((Component)val).gameObject; Log.Info("找到 Pattern 1 模板: " + ((Object)_pattern1Template).name); } else { Log.Error("未找到 Pattern 1 GameObject!"); } } private void CacheAudioResources() { if ((Object)(object)_pattern1Template == (Object)null) { Log.Error("Pattern 1 模板为 null,无法缓存音频资源"); return; } PlayMakerFSM val = FSMUtility.LocateMyFSM(_pattern1Template, "silk_boss_pattern_control"); if ((Object)(object)val == (Object)null) { Log.Error("未找到 silk_boss_pattern_control FSM,无法缓存音频资源"); return; } FsmState val2 = ((IEnumerable)val.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Web Appear")); if (val2 != null) { FsmStateAction? obj = ((IEnumerable)val2.Actions).FirstOrDefault((Func)((FsmStateAction a) => a is PlayAudioEvent)); PlayAudioEvent val3 = (PlayAudioEvent)(object)((obj is PlayAudioEvent) ? obj : null); if (val3 != null) { ref AudioClip? appearAudioClip = ref _appearAudioClip; Object value = val3.audioClip.Value; appearAudioClip = (AudioClip?)(object)((value is AudioClip) ? value : null); Object value2 = ((PlayAudioEventBase)val3).audioPlayerPrefab.Value; Object obj2 = ((value2 is AudioSource) ? value2 : null); _audioPlayerPrefab = ((obj2 != null) ? ((Component)obj2).gameObject : null); AudioClip? appearAudioClip2 = _appearAudioClip; Log.Info("缓存出现音效: " + (((appearAudioClip2 != null) ? ((Object)appearAudioClip2).name : null) ?? "null")); } } FsmState val4 = ((IEnumerable)val.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Web Burst Start")); if (val4 != null) { FsmStateAction? obj3 = ((IEnumerable)val4.Actions).FirstOrDefault((Func)((FsmStateAction a) => a is AudioPlayerOneShotSingleV2)); AudioPlayerOneShotSingleV2 val5 = (AudioPlayerOneShotSingleV2)(object)((obj3 is AudioPlayerOneShotSingleV2) ? obj3 : null); if (val5 != null) { ref AudioClip? burstAudioClip = ref _burstAudioClip; Object value3 = val5.audioClip.Value; burstAudioClip = (AudioClip?)(object)((value3 is AudioClip) ? value3 : null); if ((Object)(object)_audioPlayerPrefab == (Object)null) { _audioPlayerPrefab = val5.audioPlayer.Value; } AudioClip? burstAudioClip2 = _burstAudioClip; Log.Info("缓存爆发音效: " + (((burstAudioClip2 != null) ? ((Object)burstAudioClip2).name : null) ?? "null")); } } if ((Object)(object)_appearAudioClip == (Object)null || (Object)(object)_burstAudioClip == (Object)null) { Log.Warn("部分音频资源缓存失败,丝线攻击可能没有音效"); } else { Log.Info("=== 音频资源缓存完成 ==="); } } [IteratorStateMachine(typeof(d__29))] private IEnumerator CreateSingleWebStrandPrefab() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__29(0) { <>4__this = this }; } public void EnsurePoolInitialized() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown if (!_initialized) { Log.Warn("[SingleWebManager] 尚未初始化,请等待场景加载完成"); } else if ((Object)(object)_poolContainer == (Object)null) { Transform val = ((Component)this).transform.Find("SingleWeb Pool"); if ((Object)(object)val != (Object)null) { _poolContainer = ((Component)val).gameObject; Log.Info("[SingleWebManager] EnsurePoolInitialized: 复用已存在的 SingleWeb Pool"); } else { _poolContainer = new GameObject("SingleWeb Pool"); _poolContainer.transform.SetParent(((Component)this).transform); Log.Info("[SingleWebManager] EnsurePoolInitialized: 创建新的 SingleWeb Pool"); } _enableAutoPooling = true; } } public bool IsInitialized() { return _initialized; } public GameObject? GetStrandPatternsReference() { return _strandPatterns; } public GameObject? GetPattern1TemplateReference() { return _pattern1Template; } private SingleWebBehavior? GetAvailableWeb() { if ((Object)(object)_poolContainer == (Object)null) { Log.Warn("[SingleWebManager] 池容器未初始化,尝试创建..."); EnsurePoolInitialized(); if ((Object)(object)_poolContainer == (Object)null) { Log.Error("[SingleWebManager] 无法创建池容器"); return null; } } SingleWebBehavior singleWebBehavior = _webPool.FirstOrDefault((SingleWebBehavior w) => (Object)(object)w != (Object)null && w.IsAvailable); if ((Object)(object)singleWebBehavior != (Object)null) { return singleWebBehavior; } return CreateNewWebInstance(); } private SingleWebBehavior? CreateNewWebInstance() { if ((Object)(object)_singleWebStrandPrefab == (Object)null) { Log.Error("单根丝线预制体未初始化,无法创建实例"); return null; } if ((Object)(object)_poolContainer == (Object)null) { Log.Error("对象池容器未初始化,无法创建实例"); return null; } GameObject val = Object.Instantiate(_singleWebStrandPrefab, _poolContainer.transform); ((Object)val).name = $"SingleWeb #{_webPool.Count}"; val.SetActive(true); ConfigureWebInstance(val); SingleWebBehavior singleWebBehavior = val.AddComponent(); singleWebBehavior.InitializeBehavior(_poolContainer.transform); _webPool.Add(singleWebBehavior); return singleWebBehavior; } [IteratorStateMachine(typeof(d__38))] private IEnumerator AutoPoolGeneration() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__38(0) { <>4__this = this }; } public SingleWebBehavior? SpawnAndAttack(Vector3 position, Vector3? rotation = null, Vector3? scale = null, float appearDelay = 0f, float burstDelay = 0.75f, bool audioEnabled = true) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) SingleWebBehavior availableWeb = GetAvailableWeb(); if ((Object)(object)availableWeb == (Object)null) { Log.Error("无法获取可用丝线,生成失败"); return null; } ((Component)availableWeb).transform.position = position; ((Component)availableWeb).transform.eulerAngles = (Vector3)(((??)rotation) ?? Vector3.zero); ((Component)availableWeb).transform.localScale = (Vector3)(((??)scale) ?? Vector3.one); availableWeb.SetAudioEnabled(audioEnabled); availableWeb.TriggerAttack(appearDelay, burstDelay); return availableWeb; } public SingleWebBehavior? SpawnAndAttack(Vector3 position) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return SpawnAndAttack(position, null, null, 0f, 0.75f, audioEnabled: true); } public SingleWebBehavior? SpawnWithFollowTarget(Vector3 position, Transform followTarget, Vector3? followOffset = null, Vector3? rotation = null, Vector3? scale = null, float appearDelay = 0f, float burstDelay = 0.75f, bool audioEnabled = true) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) SingleWebBehavior singleWebBehavior = SpawnAndAttack(position, rotation, scale, appearDelay, burstDelay, audioEnabled); singleWebBehavior?.ConfigureFollowTarget(followTarget, followOffset); return singleWebBehavior; } public SingleWebBehavior? SpawnWithContinuousRotation(Vector3 position, float rotationSpeed, Vector3? rotation = null, Vector3? scale = null, float appearDelay = 0f, float burstDelay = 0.75f, bool audioEnabled = true) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) SingleWebBehavior singleWebBehavior = SpawnAndAttack(position, rotation, scale, appearDelay, burstDelay, audioEnabled); singleWebBehavior?.ConfigureContinuousRotation(enable: true, rotationSpeed); return singleWebBehavior; } public List SpawnMultipleAndAttack(Vector3[] positions, Vector3? rotation = null, Vector3? scale = null, Vector2? randomAppearDelay = null, float burstDelay = 0.75f, bool audioEnabled = true) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) List list = new List(); Vector2 val = (Vector2)(((??)randomAppearDelay) ?? new Vector2(0f, 0.3f)); foreach (Vector3 position in positions) { float appearDelay = Random.Range(val.x, val.y); SingleWebBehavior singleWebBehavior = SpawnAndAttack(position, rotation, scale, appearDelay, burstDelay, audioEnabled); if ((Object)(object)singleWebBehavior != (Object)null) { list.Add(singleWebBehavior); } } Log.Info($"批量生成了 {list.Count} 根丝线并触发攻击"); return list; } public void ClearPool() { foreach (SingleWebBehavior item in _webPool) { if ((Object)(object)item != (Object)null) { item.StopAttack(); item.ResetCooldown(); } } Log.Info($"已清空对象池(共 {_webPool.Count} 个丝线)"); } public void EnsurePoolCapacity(int minCount) { if (!_initialized || (Object)(object)_singleWebStrandPrefab == (Object)null || (Object)(object)_poolContainer == (Object)null) { Log.Warn("SingleWebManager 未初始化,无法确保池容量"); return; } int num = _webPool.Count((SingleWebBehavior w) => (Object)(object)w != (Object)null); int num2 = minCount - num; if (num2 > 0) { Log.Info($"池当前有 {num} 根丝线,需要 {num2} 根,开始预热..."); for (int i = 0; i < num2; i++) { CreateNewWebInstance()?.ResetCooldown(); } Log.Info($"池预热完成,当前有 {_webPool.Count((SingleWebBehavior w) => (Object)(object)w != (Object)null)} 根丝线"); } } private void ConfigureWebStrandPrefab() { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Expected O, but got Unknown //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Expected O, but got Unknown //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Expected O, but got Unknown if ((Object)(object)_singleWebStrandPrefab == (Object)null) { Log.Error("单根丝线预制体为 null,无法配置"); return; } Transform val = FindChildRecursive(_singleWebStrandPrefab.transform, "hero_catcher"); if ((Object)(object)val == (Object)null) { Log.Error("未找到 hero_catcher,无法添加 DamageHero 组件"); return; } GameObject gameObject = ((Component)val).gameObject; DamageHero component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } DamageHero val2 = gameObject.AddComponent(); val2.damageDealt = 2; val2.hazardType = (HazardType)1; val2.resetOnEnable = false; val2.collisionSide = (CollisionSide)0; val2.canClashTink = false; val2.noClashFreeze = true; val2.noTerrainThunk = true; val2.noTerrainRecoil = true; val2.hasNonBouncer = false; val2.overrideCollisionSide = false; ((Behaviour)val2).enabled = false; GameObject val3 = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val3 != (Object)null) { DamageHeroEventManager component2 = val3.GetComponent(); if ((Object)(object)component2 != (Object)null && component2.HasDamageHero()) { DamageHero damageHero = component2.DamageHero; if (damageHero?.OnDamagedHero != null) { val2.OnDamagedHero = damageHero.OnDamagedHero; } else { val2.OnDamagedHero = new UnityEvent(); } } else { val2.OnDamagedHero = new UnityEvent(); } } else { val2.OnDamagedHero = new UnityEvent(); } Log.Info($"已配置预制体 DamageHero: 伤害={val2.damageDealt}"); } private void ConfigureWebInstance(GameObject webInstance) { Rigidbody2D val = webInstance.GetComponent(); if ((Object)(object)val == (Object)null) { val = webInstance.AddComponent(); } val.bodyType = (RigidbodyType2D)0; val.gravityScale = 0f; val.linearDamping = 0f; val.collisionDetectionMode = (CollisionDetectionMode2D)1; webInstance.layer = LayerMask.NameToLayer("Enemy Attack"); Transform val2 = FindChildRecursive(webInstance.transform, "hero_catcher"); if ((Object)(object)val2 != (Object)null) { ((Component)val2).gameObject.layer = LayerMask.NameToLayer("Enemy Attack"); Collider2D component = ((Component)val2).GetComponent(); if ((Object)(object)component != (Object)null) { component.isTrigger = true; } } } public void CleanupPool() { Log.Info("=== 开始清理 SingleWebManager 缓存 ==="); ((MonoBehaviour)this).StopAllCoroutines(); _enableAutoPooling = false; int num = 0; foreach (SingleWebBehavior item in _webPool) { if ((Object)(object)item != (Object)null && (Object)(object)((Component)item).gameObject != (Object)null) { Object.Destroy((Object)(object)((Component)item).gameObject); num++; } } _webPool.Clear(); Log.Info($"已销毁对象池中的 {num} 个丝线实例"); if ((Object)(object)_poolContainer != (Object)null) { Object.Destroy((Object)(object)_poolContainer); _poolContainer = null; } if ((Object)(object)_singleWebStrandPrefab != (Object)null) { Object.Destroy((Object)(object)_singleWebStrandPrefab); _singleWebStrandPrefab = null; } _strandPatterns = null; _pattern1Template = null; _initialized = false; Log.Info("=== SingleWebManager 清理完成 ==="); } private Transform? FindChildRecursive(Transform parent, string childName) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown Transform val = parent.Find(childName); if ((Object)(object)val != (Object)null) { return val; } foreach (Transform item in parent) { Transform parent2 = item; val = FindChildRecursive(parent2, childName); if ((Object)(object)val != (Object)null) { return val; } } return null; } } } namespace AnySilkBoss.Source.Handlers { [HarmonyPatch] public static class AudioHandler { private static readonly string[] SupportedAudioExtensions = new string[4] { ".flac", ".wav", ".mp3", ".ogg" }; private static readonly Dictionary LoadedClips = new Dictionary(); public static string PluginDirectory => Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? ""; public static string AudioFolder => Path.Combine(PluginDirectory, "Audio"); public static void ApplyPatches(Harmony harmony) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Expected O, but got Unknown harmony.Patch((MethodBase)AccessTools.Method(typeof(AudioSource), "PlayHelper", new Type[2] { typeof(AudioSource), typeof(ulong) }, (Type[])null), new HarmonyMethod(typeof(AudioHandler), "PlayHelperPatch", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); harmony.Patch((MethodBase)AccessTools.Method(typeof(AudioSource), "PlayOneShotHelper", new Type[3] { typeof(AudioSource), typeof(AudioClip), typeof(float) }, (Type[])null), new HarmonyMethod(typeof(AudioHandler), "PlayOneShotHelperPatch", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); harmony.Patch((MethodBase)AccessTools.PropertySetter(typeof(AudioSource), "clip"), (HarmonyMethod)null, new HarmonyMethod(typeof(AudioHandler), "ClipSetterPatch", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); Log.Info("[AudioHandler] Harmony 补丁已应用"); } public static void Initialize() { try { if (!Directory.Exists(AudioFolder)) { Directory.CreateDirectory(AudioFolder); Log.Info("[AudioHandler] 创建 Audio 文件夹: " + AudioFolder); } else { List list = (from f in Directory.GetFiles(AudioFolder, "*.*", SearchOption.AllDirectories) where IsAudioFile(f) select f).ToList(); Log.Info("[AudioHandler] Audio 文件夹: " + AudioFolder); Log.Info($"[AudioHandler] 发现 {list.Count} 个音频文件:"); foreach (string item in list) { Log.Info(" - " + Path.GetFileName(item)); } } Log.Info("[AudioHandler] 初始化完成"); } catch (Exception ex) { Log.Error("[AudioHandler] 初始化失败: " + ex.Message); } } private static bool IsAudioFile(string path) { string value = Path.GetExtension(path).ToLowerInvariant(); return SupportedAudioExtensions.Contains(value); } public static void PlayHelperPatch(AudioSource source, ulong delay) { if ((Object)(object)((source != null) ? source.clip : null) != (Object)null) { TryReplaceClip(source); } } public static void PlayOneShotHelperPatch(AudioSource source, ref AudioClip clip, float volumeScale) { if ((Object)(object)clip != (Object)null) { TryReplaceClip(ref clip); } } public static void ClipSetterPatch(AudioSource __instance, AudioClip value) { if ((Object)(object)value != (Object)null && !((Object)value).name.StartsWith("ANYSILKBOSS_")) { TryReplaceClip(__instance); } } private static void TryReplaceClip(AudioSource source) { if ((Object)(object)((source != null) ? source.clip : null) == (Object)null) { return; } string text = ((Object)source.clip).name.Replace("ANYSILKBOSS_", ""); if (LoadedClips.TryGetValue(text, out AudioClip value)) { source.clip = value; return; } AudioClip val = LoadAudioClip(text); if ((Object)(object)val != (Object)null) { LoadedClips[text] = val; source.clip = val; } } private static void TryReplaceClip(ref AudioClip clip) { if ((Object)(object)clip == (Object)null) { return; } string text = ((Object)clip).name.Replace("ANYSILKBOSS_", ""); if (LoadedClips.TryGetValue(text, out AudioClip value)) { clip = value; return; } AudioClip val = LoadAudioClip(text); if ((Object)(object)val != (Object)null) { LoadedClips[text] = val; clip = val; } } private static AudioClip? LoadAudioClip(string clipName) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Invalid comparison between Unknown and I4 string audioFilePath = GetAudioFilePath(clipName); if (string.IsNullOrEmpty(audioFilePath)) { return null; } try { string text = "file:///" + Uri.EscapeUriString(audioFilePath.Replace("\\", "/")); UnityWebRequest audioClip = UnityWebRequestMultimedia.GetAudioClip(text, (AudioType)0); UnityWebRequestAsyncOperation val = audioClip.SendWebRequest(); while (!((AsyncOperation)val).isDone) { } if ((int)audioClip.result != 1) { Log.Error("[AudioHandler] 加载音频失败 " + audioFilePath + ": " + audioClip.error); return null; } AudioClip content = DownloadHandlerAudioClip.GetContent(audioClip); ((Object)content).name = "ANYSILKBOSS_" + clipName; Log.Info("[AudioHandler] 已加载并替换音频: " + clipName); return content; } catch (Exception ex) { Log.Error("[AudioHandler] 加载音频异常 " + audioFilePath + ": " + ex.Message); return null; } } private static string? GetAudioFilePath(string clipName) { string text = FindAudioFile(AudioFolder, clipName, SearchOption.AllDirectories); if (!string.IsNullOrEmpty(text)) { return text; } string text2 = FindAudioFile(PluginDirectory, clipName, SearchOption.TopDirectoryOnly); if (!string.IsNullOrEmpty(text2)) { return text2; } return null; } private static string? FindAudioFile(string directory, string clipName, SearchOption searchOption) { if (string.IsNullOrEmpty(directory) || !Directory.Exists(directory)) { return null; } string[] supportedAudioExtensions = SupportedAudioExtensions; foreach (string text in supportedAudioExtensions) { string[] files = Directory.GetFiles(directory, clipName + text, searchOption); if (files.Any()) { return files.First(); } } return null; } } } namespace AnySilkBoss.Source.Behaviours.Normal { internal class AttackControlBehavior : MonoBehaviour { private enum BossZone { Left, Middle, Right } private struct WebStrandInfo { public string name; public Vector3 position; public Vector3 localPosition; public Quaternion rotation; public Vector3 eulerAngles; public Vector3 localEulerAngles; public Vector3 localScale; public Vector3 forward; public Vector3 up; public Vector3 right; } private struct WebStrandColliderInfo { public string name; public Vector3 centerPosition; public float rotationZ; public Vector3 startPoint; public Vector3 endPoint; } [CompilerGenerated] private sealed class d__9 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AttackControlBehavior <>4__this; private int 5__1; private HandControlBehavior 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__9(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = Random.Range(0, 2); 5__2 = ((5__1 == 0) ? <>4__this.handLBehavior : <>4__this.handRBehavior); if ((Object)(object)5__2 == (Object)null) { Log.Error($"未找到Hand {5__1} Behavior"); return false; } Log.Info($"选择Hand {5__1} ({((Object)((Component)5__2).gameObject).name})进行爬升阶段环绕攻击(削弱版)"); 5__2.StartOrbitAttackSequence(); <>2__current = (object)new WaitForSeconds(2f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__2.StartShootSequence(); Log.Info("爬升阶段环绕攻击完成(单Hand三根针)"); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__14 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AttackControlBehavior <>4__this; private HeroController 5__1; private Vector3 5__2; private float 5__3; private Vector3[] 5__4; private List 5__5; private Vector3[] <>s__6; private int <>s__7; private Vector3 5__8; private SilkBallBehavior 5__9; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__4 = null; 5__5 = null; <>s__6 = null; 5__9 = null; <>1__state = -2; } private bool MoveNext() { //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = HeroController.instance; if ((Object)(object)5__1 == (Object)null) { Log.Warn("HeroController未找到,无法执行丝球攻击"); return false; } if ((Object)(object)<>4__this._silkBallManager == (Object)null) { Log.Warn("SilkBallManager未初始化"); return false; } 5__2 = 5__1.transform.position; 5__3 = 15f; 5__4 = (Vector3[])(object)new Vector3[4] { 5__2 + new Vector3(0f - 5__3, 5__3, 0f), 5__2 + new Vector3(0f - 5__3, 0f - 5__3, 0f), 5__2 + new Vector3(5__3, 5__3, 0f), 5__2 + new Vector3(5__3, 0f - 5__3, 0f) }; 5__5 = new List(); <>s__6 = 5__4; for (<>s__7 = 0; <>s__7 < <>s__6.Length; <>s__7++) { 5__8 = <>s__6[<>s__7]; 5__9 = <>4__this._silkBallManager.SpawnSilkBall(5__8, 15f, 20f, 5f, 1f, enableRotation: true, null, ignoreWall: true); 5__9 = null; } <>s__6 = null; <>2__current = (object)new WaitForSeconds(0.6f); <>1__state = 1; return true; case 1: <>1__state = -1; Log.Info("=== 广播 SILK BALL RELEASE 事件,释放爬升阶段丝球 ==="); EventRegister.SendEvent("SILK BALL RELEASE", (GameObject)null); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 2; return true; case 2: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__11 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AttackControlBehavior <>4__this; private HeroController 5__1; private Vector3 5__2; private float 5__3; private float 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = HeroController.instance; if ((Object)(object)5__1 == (Object)null) { Log.Warn("HeroController未找到,无法执行网攻击"); return false; } 5__2 = 5__1.transform.position; 5__3 = Random.Range(-30f, 30f); <>4__this.SpawnClimbWebAtAngle(5__2, 5__3); Log.Info($"生成第一根网,角度: {5__3}°"); <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__4 = 5__3 + 90f; <>4__this.SpawnClimbWebAtAngle(5__2, 5__4); Log.Info($"生成第二根网,角度: {5__4}°"); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 2; return true; case 2: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__171 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SilkBallBehavior behavior; public AttackControlBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__171(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)behavior == (Object)null) { return false; } <>2__current = (object)new WaitForSeconds(0.2f); <>1__state = 1; return true; case 1: <>1__state = -1; behavior.SendFsmEvent("SILK BALL RELEASE"); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__83 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AttackControlBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__83(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = (object)new WaitWhile((Func)(() => (Object)(object)FSMUtility.LocateMyFSM(((Component)<>4__this).gameObject, <>4__this.fsmName) == (Object)null)); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.GetComponents(); <>4__this.RegisterAttackControlEvents(); <>4__this.ModifyAttackControlFSM(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__183 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AttackControlBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__183(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.82f); <>1__state = 1; return true; case 1: <>1__state = -1; Log.Info("=== 准备释放丝球 ==="); if (<>4__this._cachedRoarEmitter != null) { ((FsmStateAction)<>4__this._cachedRoarEmitter).OnEnter(); } if (<>4__this._cachedPlayRoarAudio != null) { ((FsmStateAction)<>4__this._cachedPlayRoarAudio).OnEnter(); } Log.Info("=== 广播 SILK BALL RELEASE 事件,释放所有已准备的丝球 ==="); EventRegister.SendEvent("SILK BALL RELEASE", (GameObject)null); <>4__this._activeSilkBalls.Clear(); <>2__current = (object)new WaitForSeconds(0.2f); <>1__state = 2; return true; case 2: <>1__state = -1; if (<>4__this._cachedRoarEmitter != null) { ((FsmStateAction)<>4__this._cachedRoarEmitter).OnExit(); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__121 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AttackControlBehavior <>4__this; private GameObject 5__1; private List 5__2; private List 5__3; private List 5__4; private List 5__5; private List.Enumerator <>s__6; private Vector3 5__7; private Vector3 5__8; private SilkBallBehavior 5__9; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__121(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; 5__4 = null; 5__5 = null; <>s__6 = default(List.Enumerator); 5__9 = null; <>1__state = -2; } private bool MoveNext() { //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("=== 开始在丝网交汇点生成小丝球 ==="); 5__1 = <>4__this.GetCurrentActiveWebPattern(); if ((Object)(object)5__1 == (Object)null) { Log.Warn("未找到当前激活的丝网Pattern,跳过小丝球生成"); return false; } Log.Info("找到当前Pattern: " + ((Object)5__1).name); Log.Info("=== 使用精确算法(基于web_strand_caught碰撞体) ==="); 5__2 = <>4__this.GetWebStrandColliderInfo(5__1); Log.Info($"找到 {5__2.Count} 根丝线碰撞体"); 5__3 = <>4__this.CalculateIntersectionPointsPrecise(5__2); 5__4 = new List(); if (5__3.Count > 0) { 5__4 = 5__3; Log.Info($"\ufffd?使用精确算法,找{5__4.Count} 个交汇点"); if ((Object)(object)<>4__this._silkBallManager == (Object)null) { Log.Warn("SilkBallManager未找到,无法生成小丝?"); return false; } <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; } Log.Warn("精确算法未找"); return false; case 1: <>1__state = -1; 5__5 = new List(); <>s__6 = 5__4.GetEnumerator(); try { while (<>s__6.MoveNext()) { 5__7 = <>s__6.Current; 5__8 = 5__7; 5__9 = <>4__this._silkBallManager.SpawnSilkBall(5__8, 6f, 20f, 6f, 0.8f); if ((Object)(object)5__9 != (Object)null) { 5__5.Add(5__9); Log.Info($"在交汇点 {5__7} 生成并释放小丝球"); } 5__9 = null; } } finally { ((IDisposable)<>s__6).Dispose(); } <>s__6 = default(List.Enumerator); <>2__current = (object)new WaitForSeconds(0.66f); <>1__state = 2; return true; case 2: <>1__state = -1; Log.Info("=== 广播 SILK BALL RELEASE 事件,释P6 交点丝球 ==="); EventRegister.SendEvent("SILK BALL RELEASE", (GameObject)null); Log.Info($"已生成并释放 {5__5.Count} 个小丝球"); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__179 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AttackControlBehavior <>4__this; private Vector3 5__1; private float 5__2; private int 5__3; private float 5__4; private float 5__5; private Vector3 5__6; private Vector3 5__7; private SilkBallBehavior 5__8; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__179(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__8 = null; <>1__state = -2; } private bool MoveNext() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("=== 开始召唤普通版8个丝球 ==="); <>4__this._activeSilkBalls.Clear(); 5__1 = ((Component)<>4__this).transform.position; 5__2 = 6f; 5__3 = 0; break; case 1: <>1__state = -1; 5__8 = null; 5__3++; break; } if (5__3 < 8) { 5__4 = (float)5__3 * 45f; 5__5 = 5__4 * (MathF.PI / 180f); 5__6 = new Vector3(Mathf.Cos(5__5) * 5__2, Mathf.Sin(5__5) * 5__2, 0f); 5__7 = 5__1 + 5__6; 5__7.z = 0f; 5__8 = <>4__this._silkBallManager?.SpawnSilkBall(5__7, 30f, 25f, 8f, 1f); if ((Object)(object)5__8 != (Object)null) { <>4__this._activeSilkBalls.Add(((Component)5__8).gameObject); Log.Info($"召唤第 {5__3 + 1} 个丝球"); } <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; } Log.Info($"=== 8个丝球召唤完成,共 {<>4__this._activeSilkBalls.Count} 个 ==="); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__180 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AttackControlBehavior <>4__this; private bool 5__1; private Vector3 5__2; private float 5__3; private float 5__4; private int 5__5; private float 5__6; private float 5__7; private Vector3 5__8; private Vector3 5__9; private SilkBallBehavior 5__10; private float 5__11; private float 5__12; private Vector3 5__13; private Vector3 5__14; private SilkBallBehavior 5__15; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__180(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__10 = null; 5__15 = null; <>1__state = -2; } private bool MoveNext() { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Expected O, but got Unknown //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = Random.value < 0.5f; Log.Info("=== 开始召唤Phase2双圈丝球(内圈" + (5__1 ? "顺时针" : "逆时针") + "6球 + 外圈" + (5__1 ? "逆时针" : "顺时针") + "5球)==="); <>4__this._activeSilkBalls.Clear(); 5__2 = ((Component)<>4__this).transform.position; 5__3 = 6f; 5__4 = 14f; 5__5 = 0; break; case 1: <>1__state = -1; 5__10 = null; 5__5++; break; } if (5__5 < 6) { 5__6 = (5__1 ? ((float)(-5__5) * 60f) : ((float)5__5 * 60f)); 5__7 = 5__6 * (MathF.PI / 180f); 5__8 = new Vector3(Mathf.Cos(5__7) * 5__3, Mathf.Sin(5__7) * 5__3, 0f); 5__9 = 5__2 + 5__8; 5__9.z = 0f; 5__10 = <>4__this._silkBallManager?.SpawnSilkBall(5__9, 30f, 25f, 8f, 1f); if ((Object)(object)5__10 != (Object)null) { <>4__this._activeSilkBalls.Add(((Component)5__10).gameObject); Log.Info($"召唤内圈丝球 {5__5 + 1}/6({5__6}°)"); } if (5__5 < 5) { 5__11 = (5__1 ? (30f + (float)5__5 * 60f) : (30f - (float)5__5 * 60f)); 5__12 = 5__11 * (MathF.PI / 180f); 5__13 = new Vector3(Mathf.Cos(5__12) * 5__4, Mathf.Sin(5__12) * 5__4, 0f); 5__14 = 5__2 + 5__13; 5__14.z = 0f; 5__15 = <>4__this._silkBallManager?.SpawnSilkBall(5__14, 30f, 25f, 8f, 1f); if ((Object)(object)5__15 != (Object)null) { <>4__this._activeSilkBalls.Add(((Component)5__15).gameObject); 5__15.StartProtectionTime(2.5f); Log.Info($"召唤外圈丝球 {5__5 + 1}/5({5__11}°)"); } 5__15 = null; } <>2__current = (object)new WaitForSeconds(0.12f); <>1__state = 1; return true; } Log.Info($"=== Phase2双圈丝球召唤完成,共 {<>4__this._activeSilkBalls.Count} 个(内圈6 + 外圈5)==="); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__178 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AttackControlBehavior <>4__this; private FsmBool 5__1; private bool 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__178(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: { <>1__state = -1; PlayMakerFSM? attackControlFsm = <>4__this._attackControlFsm; 5__1 = ((attackControlFsm != null) ? attackControlFsm.FsmVariables.FindFsmBool("Special Attack") : null); 5__2 = 5__1 != null && 5__1.Value; if (5__2) { <>2__current = <>4__this.SummonPhase2DoubleSilkBalls(); <>1__state = 1; return true; } <>2__current = <>4__this.SummonNormalSilkBalls(); <>1__state = 2; return true; } case 1: <>1__state = -1; break; case 2: <>1__state = -1; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [Header("FSM配置")] public string fsmName = "Attack Control"; [Header("状态配置")] public string handPtnChoiceState = "Hand Ptn Choice"; public string newOrbitAttackState = "Orbit Attack"; public string waitForHandsReadyState = "Wait For Hands Ready"; [Header("手部控制")] public GameObject? handL; public GameObject? handR; public HandControlBehavior? handLBehavior; public HandControlBehavior? handRBehavior; private LaceCircleSlashManager? _laceCircleSlashManager; private PlayMakerFSM? _attackControlFsm; private FsmState? _handPtnChoiceState; private FsmState? _orbitAttackState; private FsmState? _waitForHandsReadyState; private string _secondHandName = ""; private GameObject? _bossScene; private GameObject? _strandPatterns; private GameObject? _secondHandObject; private FsmEvent? _orbitAttackEvent; private FsmEvent? _orbitStartHandLEvent; private FsmEvent? _orbitStartHandREvent; private FsmEvent? _nullEvent; private FsmEvent? _silkBallAttackEvent; private SilkBallManager? _silkBallManager; private List _activeSilkBalls = new List(); private Coroutine? _silkBallSummonCoroutine; private FsmState? _silkBallPrepareState; private FsmState? _silkBallRingPrepareState; private FsmState? _silkBallRingCastState; private FsmState? _silkBallRingLiftState; private FsmState? _silkBallRingAnticState; private FsmState? _silkBallRingReleaseState; private FsmState? _silkBallRingEndState; private FsmState? _silkBallRingRecoverState; private FsmState? _silkBallMovePrepareState; private FsmState? _silkBallMoveEndState; private PlayMakerFSM? _bossControlFsm; private FsmBool? _isGeneratingSilkBall; private FsmFloat? _totalDistanceTraveled; private FsmVector2? _lastBallPosition; private FsmGameObject? _laceSlashObj; private FsmGameObject? _spikeFloorsX; private FsmEvent? _silkBallStaticEvent; private FsmEvent? _silkBallDashEvent; private FsmEvent? _silkBallDashStartEvent; private FsmEvent? _silkBallDashEndEvent; private FsmEvent? _p6WebAttackEvent; private FsmState? _p6WebPrepareState; private FsmState? _p6WebCastState; private FsmState? _p6WebAttack1State; private FsmState? _p6WebAttack2State; private FsmState? _p6WebAttack3State; private FsmState? _p6WebRecoverState; private StartRoarEmitter? _cachedRoarEmitter; private PlayAudioEventRandom? _cachedPlayRoarAudio; private static readonly Vector3 POS_LEFT_DOWN = new Vector3(25f, 137f, 0f); private static readonly Vector3 POS_LEFT_UP = new Vector3(25f, 142.5f, 0f); private static readonly Vector3 POS_MIDDLE_UP = new Vector3(39.5f, 142.5f, 0f); private static readonly Vector3 POS_MIDDLE_DOWN = new Vector3(39.5f, 137f, 0f); private static readonly Vector3 POS_RIGHT_UP = new Vector3(51.5f, 142.5f, 0f); private static readonly Vector3 POS_RIGHT_DOWN = new Vector3(51.5f, 137f, 0f); private const float ZONE_LEFT_MAX = 31f; private const float ZONE_RIGHT_MIN = 46f; private const float DASH_SLASH_DISTANCE_THRESHOLD = 5f; private const float DASH_SLASH_SCALE_PHASE1 = 1.75f; private const float DASH_SLASH_SCALE_PHASE2 = 1f; private const float DASH_SLASH_OFFSET_Y_ATTACK = 0f; private const float DASH_SLASH_OFFSET_Y_END = 0f; private bool _isGeneratingDashSlash = false; private float _dashSlashDistanceTraveled = 0f; private Vector2 _lastDashSlashPosition = Vector2.zero; private bool _isDashAttackEndState = false; public bool IsAttackControlFsmReady => (Object)(object)_attackControlFsm != (Object)null; private void CreateClimbPhaseAttackStates() { if (!((Object)(object)_attackControlFsm == (Object)null)) { Log.Info("=== 开始创建爬升阶段攻击状态链 ==="); FsmState[] array = FsmStateBuilder.CreateStates(_attackControlFsm.Fsm, ("Climb Attack Choice", "爬升阶段攻击选择"), ("Climb Needle Attack", "爬升阶段针攻击"), ("Climb Web Attack", "爬升阶段网攻击"), ("Climb Silk Ball Attack", "爬升阶段丝球攻击"), ("Climb Attack Cooldown", "爬升阶段攻击冷却")); FsmStateBuilder.AddStatesToFsm(_attackControlFsm, array); FsmState val = array[0]; FsmState needleState = array[1]; FsmState webState = array[2]; FsmState silkBallState = array[3]; FsmState cooldownState = array[4]; FsmState idleState = FsmStateBuilder.FindState(_attackControlFsm, "Idle"); AddClimbAttackChoiceActions(val); AddClimbNeedleAttackActions(needleState); AddClimbWebAttackActions(webState); AddClimbSilkBallAttackActions(silkBallState); AddClimbAttackCooldownActions(cooldownState); AddClimbAttackTransitions(val, needleState, webState, silkBallState, cooldownState); AddClimbPhaseAttackGlobalTransitions(val, idleState); Log.Info("=== 爬升阶段攻击状态链创建完成 ==="); } } private void AddClimbAttackChoiceActions(FsmState choiceState) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown List list = new List(); FsmEvent fsmEvent = FsmEvent.GetFsmEvent("CLIMB NEEDLE ATTACK"); FsmEvent fsmEvent2 = FsmEvent.GetFsmEvent("CLIMB WEB ATTACK"); FsmEvent fsmEvent3 = FsmEvent.GetFsmEvent("CLIMB SILK BALL ATTACK"); SendRandomEventV4 val = new SendRandomEventV4(); val.events = (FsmEvent[])(object)new FsmEvent[3] { fsmEvent, fsmEvent2, fsmEvent3 }; val.weights = (FsmFloat[])(object)new FsmFloat[3] { new FsmFloat(FsmFloat.op_Implicit(1f)), new FsmFloat(FsmFloat.op_Implicit(0.8f)), new FsmFloat(FsmFloat.op_Implicit(0.6f)) }; val.eventMax = (FsmInt[])(object)new FsmInt[3] { new FsmInt(FsmInt.op_Implicit(1)), new FsmInt(FsmInt.op_Implicit(1)), new FsmInt(FsmInt.op_Implicit(1)) }; val.missedMax = (FsmInt[])(object)new FsmInt[3] { new FsmInt(FsmInt.op_Implicit(2)), new FsmInt(FsmInt.op_Implicit(2)), new FsmInt(FsmInt.op_Implicit(3)) }; val.activeBool = new FsmBool { UseVariable = true, Value = true }; list.Add((FsmStateAction)(object)val); choiceState.Actions = list.ToArray(); } private void AddClimbNeedleAttackActions(FsmState needleState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ExecuteClimbNeedleAttack") { Value = "ExecuteClimbNeedleAttack" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.8f)), finishEvent = FsmEvent.Finished }); needleState.Actions = list.ToArray(); } private void AddClimbWebAttackActions(FsmState webState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ExecuteClimbWebAttack") { Value = "ExecuteClimbWebAttack" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(1f)), finishEvent = FsmEvent.Finished }); webState.Actions = list.ToArray(); } private void AddClimbSilkBallAttackActions(FsmState silkBallState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" }, fsm = _bossControlFsm, variableName = new FsmString("Climb Cast Pending") { Value = "Climb Cast Pending" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ExecuteClimbSilkBallAttack") { Value = "ExecuteClimbSilkBallAttack" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(2f)), finishEvent = FsmEvent.Finished }); silkBallState.Actions = list.ToArray(); } private void AddClimbAttackCooldownActions(FsmState cooldownState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new WaitRandom { timeMin = new FsmFloat(FsmFloat.op_Implicit(2f)), timeMax = new FsmFloat(FsmFloat.op_Implicit(3f)), finishEvent = FsmEvent.Finished }); cooldownState.Actions = list.ToArray(); } private void AddClimbAttackTransitions(FsmState choiceState, FsmState needleState, FsmState webState, FsmState silkBallState, FsmState cooldownState) { choiceState.Transitions = (FsmTransition[])(object)new FsmTransition[3] { FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB NEEDLE ATTACK"), needleState), FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB WEB ATTACK"), webState), FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB SILK BALL ATTACK"), silkBallState) }; FsmStateBuilder.SetFinishedTransition(needleState, cooldownState); FsmStateBuilder.SetFinishedTransition(webState, cooldownState); FsmStateBuilder.SetFinishedTransition(silkBallState, cooldownState); FsmStateBuilder.SetFinishedTransition(cooldownState, choiceState); Log.Info("爬升阶段攻击转换设置完成"); } private void AddClimbPhaseAttackGlobalTransitions(FsmState climbAttackChoice, FsmState? idleState) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown List list = _attackControlFsm.Fsm.GlobalTransitions.ToList(); list.Add(new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("CLIMB PHASE ATTACK"), toState = "Climb Attack Choice", toFsmState = climbAttackChoice }); if (idleState != null) { list.Add(new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("CLIMB PHASE END"), toState = "Idle", toFsmState = idleState }); } _attackControlFsm.Fsm.GlobalTransitions = list.ToArray(); Log.Info("爬升阶段攻击全局转换添加完成"); } public void ExecuteClimbNeedleAttack() { Log.Info("执行爬升阶段针攻击(随机Hand)"); ((MonoBehaviour)this).StartCoroutine(ClimbNeedleAttackCoroutine()); } [IteratorStateMachine(typeof(d__9))] private IEnumerator ClimbNeedleAttackCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__9(0) { <>4__this = this }; } public void ExecuteClimbWebAttack() { Log.Info("执行爬升阶段网攻击(双网旋转)"); ((MonoBehaviour)this).StartCoroutine(ClimbWebAttackCoroutine()); } [IteratorStateMachine(typeof(d__11))] private IEnumerator ClimbWebAttackCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0) { <>4__this = this }; } private void SpawnClimbWebAtAngle(Vector3 playerPos, float angle) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val == (Object)null) { Log.Warn("未找到AnySilkBossManager"); return; } SingleWebManager component = val.GetComponent(); if ((Object)(object)component == (Object)null) { Log.Warn("未找到SingleWebManager组件"); return; } Vector3 value = default(Vector3); ((Vector3)(ref value))..ctor(0f, 0f, angle); component.SpawnAndAttack(playerPos, (Vector3?)value, (Vector3?)new Vector3(2f, 1f, 1f), 0f, 0.75f, audioEnabled: true); Log.Info($"在玩家位置生成网,角度: {angle}°"); } public void ExecuteClimbSilkBallAttack() { Log.Info("执行爬升阶段丝球攻击(四角生成)"); ((MonoBehaviour)this).StartCoroutine(ClimbSilkBallAttackCoroutine()); } [IteratorStateMachine(typeof(d__14))] private IEnumerator ClimbSilkBallAttackCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__14(0) { <>4__this = this }; } private void Start() { ((MonoBehaviour)this).StartCoroutine(DelayedSetup()); } private void Update() { if (_isGeneratingSilkBall != null && _isGeneratingSilkBall.Value && (Object)(object)_attackControlFsm != (Object)null) { string activeStateName = _attackControlFsm.ActiveStateName; if (activeStateName != "Silk Ball Move Prepare") { Log.Info("检测到不在移动丝球准备状态(当前状态:" + activeStateName + "),停止生成丝球"); StopGeneratingSilkBall(); } else { CheckAndSpawnSilkBall(); } } if (_isGeneratingDashSlash && (Object)(object)_attackControlFsm != (Object)null) { string activeStateName2 = _attackControlFsm.ActiveStateName; if (activeStateName2 == "Dash Attack" || activeStateName2 == "Dash Attack End") { CheckAndSpawnDashSlash(); } else { StopGeneratingDashSlash(); } } } private void OnDestroy() { ((MonoBehaviour)this).StopAllCoroutines(); } [IteratorStateMachine(typeof(d__83))] private IEnumerator DelayedSetup() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__83(0) { <>4__this = this }; } private void GetComponents() { _attackControlFsm = FSMUtility.LocateMyFSM(((Component)this).gameObject, fsmName); if ((Object)(object)_attackControlFsm == (Object)null) { Log.Error("未找到 " + fsmName + " FSM"); return; } _bossScene = ((Component)((Component)this).transform.GetParent()).gameObject; if ((Object)(object)_bossScene == (Object)null) { Log.Error("未找到bossScene"); return; } _bossControlFsm = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Control"); if ((Object)(object)_bossControlFsm == (Object)null) { Log.Error("未找到 BossControl FSM"); } _strandPatterns = ((Component)_bossScene.transform.Find("Strand Patterns")).gameObject; InitializeSilkBallDashVariables(); GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { _silkBallManager = val.GetComponent(); if ((Object)(object)_silkBallManager == (Object)null) { Log.Warn("未找到 SilkBallManager 组件"); } _laceCircleSlashManager = val.GetComponent(); if ((Object)(object)_laceCircleSlashManager == (Object)null) { Log.Warn("未找到 LaceCircleSlashManager 组件"); } else { Log.Info("已获取 LaceCircleSlashManager 引用"); } ModifyDashAttackState(); } else { Log.Warn("未找到 AnySilkBossManager GameObject"); } InitializeHandBehaviors(); InitializeSilkBallReleaseActions(); InitializeDamageReductionFsmReferences(); } private void InitializeDamageReductionFsmReferences() { DamageReductionManager component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { Log.Warn("[减伤系统] 未找到 DamageReductionManager 组件"); } else { component.InitializeFsmReferences(_attackControlFsm, null); } } private void InitializeSilkBallReleaseActions() { if ((Object)(object)_attackControlFsm == (Object)null) { Log.Warn("无法初始化丝球释放动作:_attackControlFsm为null"); return; } _cachedRoarEmitter = CloneAction("Roar", 0, (Func?)null); if (_cachedRoarEmitter != null) { ((FsmStateAction)_cachedRoarEmitter).Fsm = _attackControlFsm.Fsm; ((FsmStateAction)_cachedRoarEmitter).Owner = ((Component)_attackControlFsm).gameObject; } _cachedPlayRoarAudio = CloneAction("Roar", 0, (Func?)null); if (_cachedPlayRoarAudio != null) { ((FsmStateAction)_cachedPlayRoarAudio).Fsm = _attackControlFsm.Fsm; ((FsmStateAction)_cachedPlayRoarAudio).Owner = ((Component)_attackControlFsm).gameObject; } } private void ModifyAttackControlFSM() { if ((Object)(object)_attackControlFsm == (Object)null) { return; } Log.Info("开始修改Attack Control FSM"); _handPtnChoiceState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == handPtnChoiceState)); if (_handPtnChoiceState == null) { Log.Error("未找到状态: " + handPtnChoiceState); return; } _waitForHandsReadyState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == waitForHandsReadyState)); if (_waitForHandsReadyState == null) { Log.Error("未找到状态: " + waitForHandsReadyState); return; } CreateOrbitAttackState(); CreateSilkBallAttackStates(); CreateClimbPhaseAttackStates(); CreateP6WebAttackStates(); ModifyRubbleAttackForP6Web(); ModifySendRandomEventAction(); ModifyAttackChoiceForSilkBall(); PatchOriginalAttackPatterns(); AddAttactStopAction(); ModifySpikeLiftAimState(); PatchShiftHeroStateSetMeshRenderer(); RelinkAllEventReferences(); Log.Info("Attack Control FSM修改完成"); } private void RegisterAttackControlEvents() { if (!((Object)(object)_attackControlFsm == (Object)null)) { FsmStateBuilder.RegisterEvents(_attackControlFsm, "ORBIT ATTACK", "ORBIT START Hand L", "ORBIT START Hand R", "SILK BALL ATTACK", "SILK BALL STATIC", "SILK BALL DASH", "SILK BALL DASH START", "SILK BALL DASH END", "NULL", "CLIMB PHASE ATTACK", "CLIMB PHASE END", "P6 WEB ATTACK"); _orbitAttackEvent = FsmEvent.GetFsmEvent("ORBIT ATTACK"); _orbitStartHandLEvent = FsmEvent.GetFsmEvent("ORBIT START Hand L"); _orbitStartHandREvent = FsmEvent.GetFsmEvent("ORBIT START Hand R"); _silkBallAttackEvent = FsmEvent.GetFsmEvent("SILK BALL ATTACK"); _silkBallStaticEvent = FsmEvent.GetFsmEvent("SILK BALL STATIC"); _silkBallDashEvent = FsmEvent.GetFsmEvent("SILK BALL DASH"); _silkBallDashStartEvent = FsmEvent.GetFsmEvent("SILK BALL DASH START"); _silkBallDashEndEvent = FsmEvent.GetFsmEvent("SILK BALL DASH END"); _nullEvent = FsmEvent.GetFsmEvent("NULL"); _p6WebAttackEvent = FsmEvent.GetFsmEvent("P6 WEB ATTACK"); } } private void RelinkAllEventReferences() { if (!((Object)(object)_attackControlFsm == (Object)null)) { FsmStateBuilder.ReinitializeFsmVariables(_attackControlFsm); } } private T? CloneAction(string sourceStateName, int matchIndex = 0, Func? predicate = null) where T : FsmStateAction { string sourceStateName2 = sourceStateName; if ((Object)(object)_attackControlFsm == (Object)null) { Log.Warn("CloneAction调用时_attackControlFsm为null"); return default(T); } FsmState val = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == sourceStateName2)); if (val == null) { Log.Warn("未找到用于克隆的状态: " + sourceStateName2); return default(T); } int num = 0; FsmStateAction[] actions = val.Actions; foreach (FsmStateAction val2 in actions) { T val3 = (T)(object)((val2 is T) ? val2 : null); if (val3 != null && (predicate == null || predicate(val3))) { if (num == matchIndex) { return (T)(object)CloneAction((FsmStateAction)(object)val3); } num++; } } Log.Warn($"在状态{sourceStateName2}中未找到类型{typeof(T).Name}的第{matchIndex}个匹配动作"); return default(T); } public T? CloneActionFromAttackControlFSM(string sourceStateName, int matchIndex = 0, Func? predicate = null) where T : FsmStateAction { return CloneAction(sourceStateName, matchIndex, predicate); } public void ClearActiveSilkBalls() { if (_activeSilkBalls != null && _activeSilkBalls.Count > 0) { Log.Info($"清理活跃丝球列表,当前数量: {_activeSilkBalls.Count}"); _activeSilkBalls.Clear(); } } public void StopAllSilkBallCoroutines() { if (_silkBallSummonCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(_silkBallSummonCoroutine); _silkBallSummonCoroutine = null; Log.Info("已停止丝球召唤协程"); } } private FsmStateAction[] CloneStateActions(string sourceStateName, Func? skipPredicate = null) { string sourceStateName2 = sourceStateName; if ((Object)(object)_attackControlFsm == (Object)null) { Log.Warn("CloneStateActions调用时_attackControlFsm为null"); return Array.Empty(); } FsmState val = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == sourceStateName2)); if (val == null) { Log.Warn("未找到用于克隆的状态: " + sourceStateName2); return Array.Empty(); } List list = new List(val.Actions.Length); FsmStateAction[] actions = val.Actions; foreach (FsmStateAction val2 in actions) { if (val2 != null) { if (skipPredicate != null && skipPredicate(val2)) { Log.Info("跳过克隆动作 " + ((object)val2).GetType().Name + " 来自 " + sourceStateName2); } else { list.Add(CloneAction(val2)); } } } return list.ToArray(); } private FsmStateAction CloneAction(FsmStateAction action) { Type type = ((object)action).GetType(); object? obj = Activator.CreateInstance(type); FsmStateAction val = (FsmStateAction)((obj is FsmStateAction) ? obj : null); if (val == null) { Log.Warn("无法克隆动作: " + type.FullName); return action; } CopyActionFields(action, val, type); return val; } private void CopyActionFields(object source, object target, Type type) { FieldInfo[] fields = type.GetFields(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (FieldInfo fieldInfo in fields) { fieldInfo.SetValue(target, fieldInfo.GetValue(source)); } Type baseType = type.BaseType; if (baseType != null && baseType != typeof(object)) { CopyActionFields(source, target, baseType); } } private void InitializeHandBehaviors() { handL = GameObject.Find("Hand L"); handR = GameObject.Find("Hand R"); if ((Object)(object)handL != (Object)null) { handLBehavior = handL.GetComponent(); if ((Object)(object)handLBehavior == (Object)null) { handLBehavior = CreateHandBehavior(handL); } } else { Log.Warn("未找到Hand L对象"); } if ((Object)(object)handR != (Object)null) { handRBehavior = handR.GetComponent(); if ((Object)(object)handRBehavior == (Object)null) { handRBehavior = CreateHandBehavior(handR); } } else { Log.Warn("未找到Hand R对象"); } } private HandControlBehavior CreateHandBehavior(GameObject handObj) { return handObj.AddComponent(); } public void ConfigureOrbitAttack() { if ((Object)(object)_attackControlFsm == (Object)null) { return; } FsmBool val = _attackControlFsm.FsmVariables.FindFsmBool("Special Attack"); if (val != null && val.Value) { if ((Object)(object)handLBehavior != (Object)null) { handLBehavior.SetOrbitAttackConfig(1f, 0.4f); } if ((Object)(object)handRBehavior != (Object)null) { handRBehavior.SetOrbitAttackConfig(-1f, 0.4f); } Log.Info("Phase2环绕攻击配置:Hand L顺时针,Hand R逆时针,间隔0.4秒"); } else { if ((Object)(object)handLBehavior != (Object)null) { handLBehavior.SetOrbitAttackConfig(1f, 0.5f); } if ((Object)(object)handRBehavior != (Object)null) { handRBehavior.SetOrbitAttackConfig(1f, 0.5f); } Log.Info("普通环绕攻击配置:双Hand顺时针,间隔0.5秒"); } } private void CreateOrbitAttackState() { _orbitAttackState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, newOrbitAttackState, "环绕攻击状态"); AddOrbitAttackActions(); CreateOrbitAttackSubStates(); } private void AddOrbitAttackActions() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_008e: Expected O, but got Unknown //IL_0093: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown //IL_00fd: Expected O, but got Unknown //IL_0102: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ConfigureOrbitAttack") { Value = "ConfigureOrbitAttack" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; CallMethod val2 = val; SendEventByName val3 = new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = handL } } }, sendEvent = FsmString.op_Implicit("ORBIT START Hand L"), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }; SendEventByName val4 = new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = handR } } }, sendEvent = FsmString.op_Implicit("ORBIT START Hand R"), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }; Wait val5 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(2f)), finishEvent = FsmEvent.Finished }; _orbitAttackState.Actions = (FsmStateAction[])(object)new FsmStateAction[4] { (FsmStateAction)val2, (FsmStateAction)val3, (FsmStateAction)val4, (FsmStateAction)val5 }; } private void CreateOrbitAttackSubStates() { if (!((Object)(object)_attackControlFsm == (Object)null)) { FsmEvent orCreateEvent = FsmStateBuilder.GetOrCreateEvent(_attackControlFsm, "ORBIT_FIRST_SHOOT_DONE"); FsmEvent orCreateEvent2 = FsmStateBuilder.GetOrCreateEvent(_attackControlFsm, "ORBIT_SECOND_SHOOT_DONE"); FsmState[] array = FsmStateBuilder.CreateStates(_attackControlFsm.Fsm, ("Orbit First Shoot", "发送第一个SHOOT事件"), ("Orbit Second Shoot", "发送第二个SHOOT事件")); FsmStateBuilder.AddStatesToFsm(_attackControlFsm, array); FsmState orbitFirstShootState = array[0]; FsmState orbitSecondShootState = array[1]; SetOrbitFirstShootActions(orbitFirstShootState, orCreateEvent); SetOrbitSecondShootActions(orbitSecondShootState, orCreateEvent2); AddOrbitAttackTransitions(orbitFirstShootState); if (_waitForHandsReadyState != null) { SetOrbitAttackSubStateTransitions(orbitFirstShootState, orbitSecondShootState, _waitForHandsReadyState, orCreateEvent, orCreateEvent2); } } } private void SetOrbitFirstShootActions(FsmState orbitFirstShootState, FsmEvent doneEvent) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = FsmObject.op_Implicit((Object)(object)this); val.methodName = FsmString.op_Implicit("SendRandomShootEvent"); val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(1.5f)), finishEvent = doneEvent }; orbitFirstShootState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, (FsmStateAction)val3 }; } private void SetOrbitSecondShootActions(FsmState orbitSecondShootState, FsmEvent doneEvent) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = FsmObject.op_Implicit((Object)(object)this); val.methodName = FsmString.op_Implicit("SendSecondShootEvent"); val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(4f)), finishEvent = doneEvent }; orbitSecondShootState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, (FsmStateAction)val3 }; } private void SetOrbitAttackSubStateTransitions(FsmState orbitFirstShootState, FsmState orbitSecondShootState, FsmState waitForHandsReadyState, FsmEvent firstShootDoneEvent, FsmEvent secondShootDoneEvent) { orbitFirstShootState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(firstShootDoneEvent, orbitSecondShootState) }; orbitSecondShootState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(secondShootDoneEvent, waitForHandsReadyState) }; } private void AddOrbitAttackTransitions(FsmState orbitFirstShootState) { FsmStateBuilder.AddTransition(_handPtnChoiceState, FsmStateBuilder.CreateTransition(_orbitAttackEvent, _orbitAttackState)); FsmStateBuilder.SetFinishedTransition(_orbitAttackState, orbitFirstShootState); } private void ModifySendRandomEventAction() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected O, but got Unknown if (_handPtnChoiceState == null) { return; } List list = _handPtnChoiceState.Actions.OfType().ToList(); foreach (SendRandomEventV4 item in list) { FsmEvent[] events = item.events; FsmFloat[] weights = item.weights; FsmInt[] eventMax = item.eventMax; FsmInt[] missedMax = item.missedMax; FsmBool activeBool = item.activeBool; FsmEvent[] array = (FsmEvent[])(object)new FsmEvent[events.Length + 1]; FsmFloat[] array2 = (FsmFloat[])(object)new FsmFloat[weights.Length + 1]; FsmInt[] array3 = (FsmInt[])(object)new FsmInt[eventMax.Length + 1]; FsmInt[] array4 = (FsmInt[])(object)new FsmInt[missedMax.Length + 1]; FsmBool val = new FsmBool(activeBool); for (int i = 0; i < events.Length; i++) { array[i] = events[i]; array2[i] = weights[i]; array3[i] = eventMax[i]; array4[i] = missedMax[i]; } int num = events.Length; array[num] = FsmEvent.GetFsmEvent("ORBIT ATTACK"); array2[num] = new FsmFloat(FsmFloat.op_Implicit(2f)); array3[num] = new FsmInt(FsmInt.op_Implicit(1)); array4[num] = new FsmInt(FsmInt.op_Implicit(4)); val = new FsmBool(activeBool); item.events = array; item.weights = array2; item.eventMax = array3; item.missedMax = array4; item.activeBool = val; } } public void SendRandomShootEvent() { Log.Info("随机选择Hand发送SHOOT事件"); bool flag = Random.Range(0, 2) == 0; string text = (flag ? "Hand L" : "Hand R"); string secondHandName = (flag ? "Hand R" : "Hand L"); Log.Info("选择 " + text + " 作为第一个攻击的Hand"); GameObject val = (flag ? handL : handR); if ((Object)(object)val != (Object)null) { PlayMakerFSM component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.SendEvent("SHOOT " + text); Log.Info("已发送SHOOT事件给 " + text); } } _secondHandName = secondHandName; _secondHandObject = (flag ? handR : handL); } public void SendSecondShootEvent() { Log.Info("发送SHOOT事件给第二个Hand: " + _secondHandName); if ((Object)(object)_secondHandObject != (Object)null) { PlayMakerFSM component = _secondHandObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.SendEvent("SHOOT " + _secondHandName); Log.Info("已发送SHOOT事件给 " + _secondHandName); } } } private void ModifyRubbleAttackForP6Web() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown if ((Object)(object)_attackControlFsm == (Object)null) { return; } FsmState val = FsmStateBuilder.FindState(_attackControlFsm, "Rubble Attack?"); if (val == null) { Log.Warn("未找到Rubble Attack?状态,无法添加P6 Web Attack监听"); return; } List list = val.Actions.ToList(); list.Insert(2, (FsmStateAction)new BoolTest { boolVariable = ((IEnumerable)_attackControlFsm.FsmVariables.BoolVariables.ToList()).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == "Do P6 Web Attack")), isTrue = _p6WebAttackEvent, isFalse = FsmEvent.GetFsmEvent("NULL"), everyFrame = false }); val.Actions = list.ToArray(); FsmStateBuilder.AddTransition(val, FsmStateBuilder.CreateTransition(_p6WebAttackEvent, _p6WebPrepareState)); Log.Info("Rubble Attack?状态已添加P6 Web Attack监听"); } private void CreateP6WebAttackStates() { Log.Info("=== 开始创建P6 Web攻击状态链 ==="); FsmState[] array = FsmStateBuilder.CreateStates(_attackControlFsm.Fsm, ("P6 Web Prepare", "P6阶段Web攻击准备"), ("P6 Web Cast", "P6阶段Web施法动画"), ("P6 Web Attack 1", "第一根丝网攻\ufffd?+ 交汇点生成小丝球"), ("P6 Web Attack 2", "第二根丝网攻\ufffd?+ 交汇点生成小丝球"), ("P6 Web Attack 3", "第三根丝网攻\ufffd?+ 交汇点生成小丝球"), ("P6 Web Recover", "P6阶段Web攻击结束恢复")); FsmStateBuilder.AddStatesToFsm(_attackControlFsm, array); _p6WebPrepareState = array[0]; _p6WebCastState = array[1]; _p6WebAttack1State = array[2]; _p6WebAttack2State = array[3]; _p6WebAttack3State = array[4]; _p6WebRecoverState = array[5]; SetP6WebPrepareActions(_p6WebPrepareState); SetP6WebCastActions(_p6WebCastState); SetP6WebAttack1Actions(_p6WebAttack1State); SetP6WebAttack2Actions(_p6WebAttack2State); SetP6WebAttack3Actions(_p6WebAttack3State); SetP6WebRecoverActions(_p6WebRecoverState); FsmState p6WebAttackTransitions = FsmStateBuilder.FindState(_attackControlFsm, "Move Restart"); SetP6WebAttackTransitions(p6WebAttackTransitions); Log.Info("=== P6 Web攻击状态链创建完成 ==="); } private void SetP6WebPrepareActions(FsmState state) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" }, variableName = new FsmString("Do P6 Web Attack") { Value = "Do P6 Web Attack" }, setValue = new FsmBool(FsmBool.op_Implicit(false)), everyFrame = false }); SetBoolValue val = CloneAction("Web Prepare", 0, (Func?)null); if (val != null) { list.Add((FsmStateAction)(object)val); } SetFsmBool val2 = CloneAction("Web Prepare", 0, (Func?)null); if (val2 != null) { list.Add((FsmStateAction)(object)val2); } state.Actions = list.ToArray(); Log.Info("设置P6 Web Prepare动作"); } private void SetP6WebCastActions(FsmState state) { state.Actions = CloneStateActions("Web Cast"); Log.Info("设置P6 Web Cast动作"); } private void SetP6WebAttackCommonActions(FsmState state, string logName) { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown List list = new List(); GetRandomChild val = CloneAction("Activate Strands", 0, (Func?)null); if (val != null) { list.Add((FsmStateAction)(object)val); } SendEventByName val2 = CloneAction("Activate Strands", 0, (Func?)delegate(SendEventByName a) { FsmString sendEvent = a.sendEvent; return ((sendEvent != null) ? sendEvent.Value : null) == "ATTACK"; }); if (val2 != null) { FsmFloat delay = val2.delay; list.Add((FsmStateAction)(object)CreateGuardedWebAttackAction(val2, (delay != null) ? delay.Value : 0f)); } CallMethod val3 = new CallMethod(); val3.behaviour = new FsmObject { Value = (Object)(object)this }; val3.methodName = new FsmString("SpawnSilkBallsAtWebIntersections") { Value = "SpawnSilkBallsAtWebIntersections" }; val3.parameters = (FsmVar[])(object)new FsmVar[0]; val3.everyFrame = false; list.Add((FsmStateAction)(object)val3); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(2f)), finishEvent = FsmEvent.Finished, realTime = false }); state.Actions = list.ToArray(); Log.Info("设置" + logName + "动作"); } private void SetP6WebAttack1Actions(FsmState state) { SetP6WebAttackCommonActions(state, "P6 Web Attack 1"); } private void SetP6WebAttack2Actions(FsmState state) { SetP6WebAttackCommonActions(state, "P6 Web Attack 2"); } private void SetP6WebAttack3Actions(FsmState state) { SetP6WebAttackCommonActions(state, "P6 Web Attack 3"); } private void SetP6WebRecoverActions(FsmState state) { state.Actions = CloneStateActions("Web Recover"); Log.Info("设置P6 Web Recover动作"); } private void SetP6WebAttackTransitions(FsmState? moveRestartState) { if (_p6WebPrepareState == null || _p6WebCastState == null || _p6WebAttack1State == null || _p6WebAttack2State == null || _p6WebAttack3State == null || _p6WebRecoverState == null) { Log.Error("P6 Web攻击状态未完全创建,无法设置转\ufffd?"); return; } _p6WebPrepareState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("ATTACK PREPARED"), _p6WebCastState) }; FsmStateBuilder.SetFinishedTransition(_p6WebCastState, _p6WebAttack1State); FsmStateBuilder.SetFinishedTransition(_p6WebAttack1State, _p6WebAttack2State); FsmStateBuilder.SetFinishedTransition(_p6WebAttack2State, _p6WebAttack3State); FsmStateBuilder.SetFinishedTransition(_p6WebAttack3State, _p6WebRecoverState); if (moveRestartState != null) { FsmStateBuilder.SetFinishedTransition(_p6WebRecoverState, moveRestartState); } Log.Info("P6 Web攻击状态转换设置完\ufffd?"); } public void SpawnSilkBallsAtWebIntersections() { ((MonoBehaviour)this).StartCoroutine(SpawnSilkBallsCoroutine()); } [IteratorStateMachine(typeof(d__121))] private IEnumerator SpawnSilkBallsCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__121(0) { <>4__this = this }; } private GameObject? GetCurrentActiveWebPattern() { if ((Object)(object)_strandPatterns == (Object)null) { return null; } FsmGameObject val = _attackControlFsm.FsmVariables.FindFsmGameObject("Web Pattern"); return val.value; } private List GetWebStrandColliderInfo(GameObject pattern) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) List list = new List(); foreach (Transform item2 in pattern.transform) { Transform val = item2; if (((Object)val).name.EndsWith("(10)")) { Log.Info("排除边界丝线: " + ((Object)val).name); } else if (((Object)val).name.Contains("Silk Boss WebStrand")) { Vector3 position = val.position; Vector3 right = val.right; Vector2 val2 = new Vector2(right.x, right.y); Vector2 normalized = ((Vector2)(ref val2)).normalized; Vector3 startPoint = position - new Vector3(normalized.x * 12.5f, normalized.y * 12.5f, 0f); Vector3 endPoint = position + new Vector3(normalized.x * 12.5f, normalized.y * 12.5f, 0f); WebStrandColliderInfo webStrandColliderInfo = default(WebStrandColliderInfo); webStrandColliderInfo.name = ((Object)val).name; webStrandColliderInfo.centerPosition = position; webStrandColliderInfo.rotationZ = val.eulerAngles.z; webStrandColliderInfo.startPoint = startPoint; webStrandColliderInfo.endPoint = endPoint; WebStrandColliderInfo item = webStrandColliderInfo; list.Add(item); } } return list; } private List GetWebStrandDetailedInfo(GameObject pattern) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) List list = new List(); foreach (Transform item2 in pattern.transform) { Transform val = item2; if (((Object)val).name.Contains("Silk Boss WebStrand")) { WebStrandInfo webStrandInfo = default(WebStrandInfo); webStrandInfo.name = ((Object)val).name; webStrandInfo.position = val.position; webStrandInfo.localPosition = val.localPosition; webStrandInfo.rotation = val.rotation; webStrandInfo.eulerAngles = val.eulerAngles; webStrandInfo.localEulerAngles = val.localEulerAngles; webStrandInfo.localScale = val.localScale; webStrandInfo.forward = val.forward; webStrandInfo.up = val.up; webStrandInfo.right = val.right; WebStrandInfo item = webStrandInfo; list.Add(item); Log.Info("=== 丝线: " + item.name + " ==="); Log.Info($" position: {item.position}"); Log.Info($" localPosition: {item.localPosition}"); Log.Info($" rotation:{item.rotation}"); Log.Info($" eulerAngles: {item.eulerAngles}"); Log.Info($" localEulerAngles: {item.localEulerAngles}"); Log.Info($" localScale: {item.localScale}"); Log.Info($" forward: {item.forward}"); Log.Info($" up: {item.up}"); Log.Info($" right: {item.right}"); } } return list; } private List CalculateIntersectionPointsPrecise(List colliderInfos) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) List list = new List(); if (colliderInfos.Count < 2) { return list; } Log.Info("=== 开始计算精确交汇点(基于线段相交) ==="); for (int i = 0; i < colliderInfos.Count - 1; i++) { for (int j = i + 1; j < colliderInfos.Count; j++) { WebStrandColliderInfo webStrandColliderInfo = colliderInfos[i]; WebStrandColliderInfo webStrandColliderInfo2 = colliderInfos[j]; Vector3? val = CalculateLineSegmentIntersection(webStrandColliderInfo.startPoint, webStrandColliderInfo.endPoint, webStrandColliderInfo2.startPoint, webStrandColliderInfo2.endPoint); if (val.HasValue) { list.Add(val.Value); Log.Info(" 找到交点: " + webStrandColliderInfo.name + " × " + webStrandColliderInfo2.name); Log.Info($" 线段1: {webStrandColliderInfo.startPoint} \ufffd?{webStrandColliderInfo.endPoint} (旋转{webStrandColliderInfo.rotationZ}°)"); Log.Info($" 线段2: {webStrandColliderInfo2.startPoint} \ufffd?{webStrandColliderInfo2.endPoint} (旋转{webStrandColliderInfo2.rotationZ}°)"); Log.Info($" 交点位置: {val.Value}"); } } } Log.Info($"=== 共找\ufffd?{list.Count} 个精确交汇点 ==="); return list; } private Vector3? CalculateLineSegmentIntersection(Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) float x = p1.x; float y = p1.y; float x2 = p2.x; float y2 = p2.y; float x3 = p3.x; float y3 = p3.y; float x4 = p4.x; float y4 = p4.y; float num = (x - x2) * (y3 - y4) - (y - y2) * (x3 - x4); if (Mathf.Abs(num) < 0.0001f) { return null; } float num2 = ((x - x3) * (y3 - y4) - (y - y3) * (x3 - x4)) / num; float num3 = (0f - ((x - x2) * (y - y3) - (y - y2) * (x - x3))) / num; if (num2 >= 0f && num2 <= 1f && num3 >= 0f && num3 <= 1f) { float num4 = x + num2 * (x2 - x); float num5 = y + num2 * (y2 - y); return new Vector3(num4, num5, p1.z); } return null; } private GuardedSendEventByName CreateGuardedWebAttackAction(SendEventByName source, float delay) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown return new GuardedSendEventByName { eventTarget = source.eventTarget, sendEvent = source.sendEvent, delay = new FsmFloat(FsmFloat.op_Implicit(delay)), everyFrame = source.everyFrame, suppressDuringBigSilkBall = new FsmBool(FsmBool.op_Implicit(true)) }; } private void PatchOriginalAttackPatterns() { if ((Object)(object)_strandPatterns == (Object)null) { Log.Warn("_strandPatterns为null,无法调整原版攻击Pattern!"); return; } Transform val = _strandPatterns.transform.Find("Pattern 1"); if ((Object)(object)val == (Object)null) { Log.Warn("未找到 Pattern 1,原版攻击调整跳过"); return; } if ((Object)(object)_strandPatterns.transform.Find("Pattern 3") != (Object)null) { Log.Info("Pattern 3 已存在,无需再次复制"); return; } GameObject val2 = Object.Instantiate(((Component)val).gameObject, _strandPatterns.transform); ((Object)val2).name = "Pattern 3"; Log.Info("已自动复制Pattern 1为Pattern 3"); PatchSingleAndDoubleStatesLastActions(); PatchSingleAndDoubleStatesLastActionsV2(); PatchAllPatternsWebBurstStartDelay(); } private void PatchAllPatternsWebBurstStartDelay() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown if ((Object)(object)_strandPatterns == (Object)null) { Log.Warn("_strandPatterns为null,无法Patch Web Burst Start延迟"); return; } int num = 0; foreach (Transform item2 in _strandPatterns.transform) { Transform val = item2; PlayMakerFSM val2 = FSMUtility.LocateMyFSM(((Component)val).gameObject, "silk_boss_pattern_control"); if ((Object)(object)val2 == (Object)null) { Log.Warn("Pattern " + ((Object)val).name + " 未找到 silk_boss_pattern_control FSM"); continue; } FsmState val3 = ((IEnumerable)val2.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Web Burst Start")); if (val3 == null) { Log.Warn("Pattern " + ((Object)val).name + " 未找到 Web Burst Start 状态"); continue; } FsmEvent fsmEvent = FsmEvent.GetFsmEvent("REPARENT"); Wait item = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(3.3f)), finishEvent = fsmEvent }; List list = val3.Actions.ToList(); list.Add((FsmStateAction)(object)item); val3.Actions = list.ToArray(); FsmTransition[] transitions = val3.Transitions; foreach (FsmTransition val4 in transitions) { if (val4.ToState == "Reparent" && val4.FsmEvent.Name == "FINISHED") { val4.FsmEvent = fsmEvent; } } val2.Fsm.InitData(); num++; Log.Info("已为 " + ((Object)val).name + " 的 Web Burst Start 状态添加 Wait 1.5s"); } Log.Info($"共为 {num} 个Pattern的Web Burst Start状态添加了延迟"); } private void PatchSingleAndDoubleStatesLastActions() { if ((Object)(object)_attackControlFsm == (Object)null) { return; } FsmState val = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Single")); FsmState val2 = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Double")); if (val == null || val2 == null) { Log.Warn("Single或Double状态不存在,无法补丁攻击行为补齐"); return; } FsmStateAction[] actions = val2.Actions; if (actions == null || actions.Length < 2) { Log.Warn("Double状态行为数量过少,无法补丁行为补齐"); return; } GetRandomChild val3 = CloneAction("Double", 0, (Func?)null); SendEventByName val4 = CloneAction("Double", 0, (Func?)null); if (val3 == null || val4 == null) { Log.Warn("克隆Double最后两个行为失败,无法补丁行为补齐"); return; } List list = val.Actions.ToList(); list.Add((FsmStateAction)(object)val3); list.Add((FsmStateAction)(object)CreateGuardedWebAttackAction(val4, 0.8f)); val.Actions = list.ToArray(); Log.Info("已将Double最后GetRandomChild/SendEventByName行为复制到Single和Double末尾各一份"); } private void PatchSingleAndDoubleStatesLastActionsV2() { //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Expected O, but got Unknown if ((Object)(object)_attackControlFsm == (Object)null) { return; } FsmState val = FsmStateBuilder.FindState(_attackControlFsm, "Double"); FsmState val2 = FsmStateBuilder.FindState(_attackControlFsm, "Web Recover"); if (val == null || val2 == null) { Log.Warn("Double或Web Recover状态不存在,无法补丁Triple攻击链"); return; } GetRandomChild val3 = CloneAction("Double", 0, (Func?)null); SendEventByName val4 = CloneAction("Double", 0, (Func?)null); if (val3 == null || val4 == null) { Log.Warn("Double克隆攻击动作失败"); return; } FsmState val5 = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Triple", "补丁三连击:1次GetRandomChild+SendEvent+延时1s"); val5.Actions = (FsmStateAction[])(object)new FsmStateAction[3] { (FsmStateAction)val3, CreateGuardedWebAttackAction(val4, 0.8f), (FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(1f)), finishEvent = FsmEvent.Finished } }; FsmStateBuilder.AddStateToFsm(_attackControlFsm, val5); FsmTransition[] transitions = val.Transitions; foreach (FsmTransition val6 in transitions) { if (val6.toState == "Web Recover" || val6.toFsmState == val2) { val6.toState = val5.Name; val6.toFsmState = val5; } } FsmStateBuilder.SetFinishedTransition(val5, val2); Log.Info("已自动插入补丁Triple攻击链,并更新Double跳转"); } private void AddAttactStopAction() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown PlayMakerFSM? attackControlFsm = _attackControlFsm; FsmState val = ((attackControlFsm != null) ? ((IEnumerable)attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState x) => x.Name == "Attack Stop")) : null); if (val != null) { List list = val.Actions.ToList(); CallMethod val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("ClearSilkBallMethod") { Value = "ClearSilkBallMethod" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; list.Insert(0, (FsmStateAction)(object)val2); list.Insert(0, (FsmStateAction)new KillDelayedEvents()); val.Actions = list.ToArray(); } } public void SuppressWebStrandAttacksForBigSilkBall() { Log.Info("[AttackControl] 大丝球阶段开始,抑制并清理 Web Strand 攻击"); PlayMakerFSM? attackControlFsm = _attackControlFsm; if (attackControlFsm != null) { Fsm fsm = attackControlFsm.Fsm; if (fsm != null) { fsm.KillDelayedEvents(); } } PlayMakerFSM? attackControlFsm2 = _attackControlFsm; if (attackControlFsm2 != null) { attackControlFsm2.SendEvent("ATTACK STOP"); } EventRegister.SendEvent("ATTACK CLEAR", (GameObject)null); PlayMakerFSM? attackControlFsm3 = _attackControlFsm; FsmBool val = ((attackControlFsm3 != null) ? attackControlFsm3.FsmVariables.FindFsmBool("Do P6 Web Attack") : null); if (val != null) { val.Value = false; } PlayMakerFSM? attackControlFsm4 = _attackControlFsm; FsmBool val2 = ((attackControlFsm4 != null) ? attackControlFsm4.FsmVariables.FindFsmBool("Did Web Strand Attack") : null); if (val2 != null) { val2.Value = false; } KillStrandPatternDelayedEvents(); } private void KillStrandPatternDelayedEvents() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown if ((Object)(object)_strandPatterns == (Object)null) { return; } foreach (Transform item in _strandPatterns.transform) { Transform val = item; PlayMakerFSM[] componentsInChildren = ((Component)val).GetComponentsInChildren(true); foreach (PlayMakerFSM val2 in componentsInChildren) { Fsm fsm = val2.Fsm; if (fsm != null) { fsm.KillDelayedEvents(); } val2.SendEvent("ATTACK CLEAR"); } } } private void PatchShiftHeroStateSetMeshRenderer() { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown if ((Object)(object)_attackControlFsm == (Object)null) { return; } FsmState val = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Shift Hero")); if (val == null) { Log.Warn("未找到 Shift Hero 状态,无法修改 SetMeshRenderer"); return; } if (val.Actions == null) { Log.Warn("Shift Hero 状态没有 Actions"); return; } int num = 0; FsmStateAction[] actions = val.Actions; foreach (FsmStateAction val2 in actions) { SetMeshRenderer val3 = (SetMeshRenderer)(object)((val2 is SetMeshRenderer) ? val2 : null); if (val3 != null) { val3.active = new FsmBool(FsmBool.op_Implicit(true)); num++; } } if (num > 0) { Log.Info($"已将 Shift Hero 状态中 {num} 个 SetMeshRenderer 的 active 属性改为 true"); } else { Log.Warn("Shift Hero 状态中未找到 SetMeshRenderer 动作"); } } private void ModifyDashAttackState() { //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Expected O, but got Unknown //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Expected O, but got Unknown //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Expected O, but got Unknown //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Expected O, but got Unknown //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Expected O, but got Unknown //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Expected O, but got Unknown //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Expected O, but got Unknown //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Expected O, but got Unknown PlayMakerFSM? attackControlFsm = _attackControlFsm; FsmState val = ((attackControlFsm != null) ? ((IEnumerable)attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState x) => x.Name == "Dash Attack")) : null); if (val == null) { return; } PlayMakerFSM? attackControlFsm2 = _attackControlFsm; FsmState val2 = ((attackControlFsm2 != null) ? ((IEnumerable)attackControlFsm2.FsmStates).FirstOrDefault((Func)((FsmState x) => x.Name == "Dash Attack Antic")) : null); if (val2 == null) { return; } List list = val2.Actions.ToList(); foreach (FsmStateAction item in list) { SendEventByName val3 = (SendEventByName)(object)((item is SendEventByName) ? item : null); if (val3 != null) { FsmString sendEvent = val3.sendEvent; if (((sendEvent != null) ? sendEvent.Value : null) != null && val3.sendEvent.Value.Contains("STOMP DASH")) { val3.delay = new FsmFloat(FsmFloat.op_Implicit(0.28f)); } } } val2.Actions = list.ToArray(); List list2 = val.Actions.ToList(); CallMethod val4 = new CallMethod(); val4.behaviour = new FsmObject { Value = (Object)(object)this }; val4.methodName = new FsmString("StartGeneratingDashSlash") { Value = "StartGeneratingDashSlash" }; val4.parameters = (FsmVar[])(object)new FsmVar[0]; val4.everyFrame = false; list2.Insert(0, (FsmStateAction)(object)val4); val.Actions = list2.ToArray(); Log.Info("已修改 Dash Attack 状态,添加 StartGeneratingDashSlash 调用"); PlayMakerFSM? attackControlFsm3 = _attackControlFsm; FsmState val5 = ((attackControlFsm3 != null) ? ((IEnumerable)attackControlFsm3.FsmStates).FirstOrDefault((Func)((FsmState x) => x.Name == "Dash Attack End")) : null); if (val5 != null) { List list3 = val5.Actions.ToList(); val4 = new CallMethod(); val4.behaviour = new FsmObject { Value = (Object)(object)this }; val4.methodName = new FsmString("OnDashAttackEnd") { Value = "OnDashAttackEnd" }; val4.parameters = (FsmVar[])(object)new FsmVar[0]; val4.everyFrame = false; list3.Insert(0, (FsmStateAction)(object)val4); val4 = new CallMethod(); val4.behaviour = new FsmObject { Value = (Object)(object)this }; val4.methodName = new FsmString("StopGeneratingDashSlash") { Value = "StopGeneratingDashSlash" }; val4.parameters = (FsmVar[])(object)new FsmVar[0]; val4.everyFrame = false; list3.Add((FsmStateAction)(object)val4); val5.Actions = list3.ToArray(); Log.Info("已修改 Dash Attack End 状态,添加 OnDashAttackEnd 和 StopGeneratingDashSlash 调用"); } } public void StartGeneratingDashSlash() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) PlayMakerFSM? attackControlFsm = _attackControlFsm; FsmBool val = ((attackControlFsm != null) ? attackControlFsm.FsmVariables.FindFsmBool("Special Attack") : null); if (val != null && val.Value) { _isGeneratingDashSlash = true; _dashSlashDistanceTraveled = 0f; _lastDashSlashPosition = Vector2.op_Implicit(((Component)this).transform.position); _isDashAttackEndState = false; Log.Info("二阶段 Dash Attack:开始生成移动 Slash"); } } public void OnDashAttackEnd() { PlayMakerFSM? attackControlFsm = _attackControlFsm; FsmBool val = ((attackControlFsm != null) ? attackControlFsm.FsmVariables.FindFsmBool("Special Attack") : null); if (val != null && val.Value) { _isDashAttackEndState = true; Log.Info("二阶段 Dash Attack End:继续生成移动 Slash(偏移量 0.1)"); } else { SpawnDashSlashAtCurrentPosition(1.75f, 0f); Log.Info("一阶段 Dash Attack End:生成 1.75 倍 Slash"); } } public void StopGeneratingDashSlash() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (_isGeneratingDashSlash) { _isGeneratingDashSlash = false; _dashSlashDistanceTraveled = 0f; _lastDashSlashPosition = Vector2.zero; _isDashAttackEndState = false; Log.Info("停止生成 Dash Slash"); } } private void CheckAndSpawnDashSlash() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (!_isGeneratingDashSlash) { return; } Vector2 val = Vector2.op_Implicit(((Component)this).transform.position); if (_lastDashSlashPosition == Vector2.zero) { _lastDashSlashPosition = val; return; } float num = Vector2.Distance(val, _lastDashSlashPosition); _dashSlashDistanceTraveled += num; _lastDashSlashPosition = val; if (_dashSlashDistanceTraveled >= 5f) { float yOffset = (_isDashAttackEndState ? 0f : 0f); SpawnDashSlashAtCurrentPosition(1f, yOffset); _dashSlashDistanceTraveled = 0f; } } private void SpawnDashSlashAtCurrentPosition(float scaleMultiplier, float yOffset) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_laceCircleSlashManager == (Object)null) { Log.Warn("SpawnDashSlashAtCurrentPosition: _laceCircleSlashManager 为 null"); return; } Vector3 val = ((Component)this).transform.position + new Vector3(0f, yOffset, 0f); if (_laceCircleSlashManager.SpawnLaceCircleSlash(val, scaleMultiplier)) { Log.Info($"生成 Dash Slash: 位置={val}, 缩放={scaleMultiplier}x"); } } public void SpawnLaceCircleSlashMethod() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_laceCircleSlashManager == (Object)null) { Log.Warn("SpawnLaceCircleSlashMethod: _laceCircleSlashManager 为 null"); return; } Vector3 position = ((Component)this).transform.position; if (_laceCircleSlashManager.SpawnLaceCircleSlash(position, 1.75f)) { Log.Info($"SpawnLaceCircleSlashMethod: 成功在位置 {position} 生成 LaceCircleSlash"); } else { Log.Warn("SpawnLaceCircleSlashMethod: 生成 LaceCircleSlash 失败"); } } private void ModifySpikeLiftAimState() { //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Expected O, but got Unknown //IL_00f0: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0139: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_016c: Expected O, but got Unknown //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Expected O, but got Unknown //IL_020d: Expected O, but got Unknown //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Expected O, but got Unknown //IL_0257: Expected O, but got Unknown //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Expected O, but got Unknown //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Expected O, but got Unknown //IL_028a: Expected O, but got Unknown //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Expected O, but got Unknown PlayMakerFSM? attackControlFsm = _attackControlFsm; FsmState val = ((attackControlFsm != null) ? ((IEnumerable)attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState x) => x.Name == "Spike Lift Aim")) : null); PlayMakerFSM? attackControlFsm2 = _attackControlFsm; FsmState val2 = ((attackControlFsm2 != null) ? ((IEnumerable)attackControlFsm2.FsmStates).FirstOrDefault((Func)((FsmState x) => x.Name == "Spike Lift Aim 2")) : null); if (val == null || val2 == null || (Object)(object)_bossScene == (Object)null) { return; } GameObject gameObject = ((Component)_bossScene.transform.Find("Spike Floors")).gameObject; List list = val.Actions.ToList(); List list2 = val2.Actions.ToList(); list.Add((FsmStateAction)new GetRandomChild { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = gameObject } }, storeResult = _spikeFloorsX }); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = _spikeFloorsX } }, sendEvent = new FsmString { Value = "ATTACK" }, delay = new FsmFloat { Value = 0.2f } }); foreach (FsmStateAction item in list) { Wait val3 = (Wait)(object)((item is Wait) ? item : null); if (val3 == null) { continue; } FsmFloat time = val3.time; if (time != null) { _ = time.Value; if (true) { val3.time = new FsmFloat(FsmFloat.op_Implicit(0.3f)); } } } list2.Add((FsmStateAction)new GetRandomChild { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = gameObject } }, storeResult = _spikeFloorsX }); list2.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = _spikeFloorsX } }, sendEvent = new FsmString { Value = "ATTACK" }, delay = new FsmFloat { Value = 0.2f } }); val.Actions = list.ToArray(); val2.Actions = list2.ToArray(); } public void ClearSilkBallMethod() { Log.Info("Boss眩晕,开始清理丝球"); StopGeneratingSilkBall(); GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { SilkBallManager component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.RecycleAllActiveSilkBalls(); Log.Info("已通过SilkBallManager清理所有丝球"); } else { Log.Warn("未找到SilkBallManager组件"); } } else { Log.Warn("未找到AnySilkBossManager GameObject"); } ClearActiveSilkBalls(); } private void CreateSilkBallAttackStates() { _silkBallPrepareState = CreateSilkBallPrepareState(); _silkBallRingPrepareState = CreateSilkBallRingPrepareState(); _silkBallRingCastState = CreateSilkBallRingCastState(); _silkBallRingLiftState = CreateSilkBallRingLiftState(); _silkBallRingAnticState = CreateSilkBallRingAnticState(); _silkBallRingReleaseState = CreateSilkBallRingReleaseState(); _silkBallRingEndState = CreateSilkBallRingEndState(); _silkBallRingRecoverState = CreateSilkBallRingRecoverState(); _silkBallMovePrepareState = CreateSilkBallMovePrepareState(); _silkBallMoveEndState = CreateSilkBallMoveEndState(); FsmStateBuilder.AddStatesToFsm(_attackControlFsm, _silkBallRingPrepareState, _silkBallRingCastState, _silkBallRingLiftState, _silkBallRingAnticState, _silkBallRingReleaseState, _silkBallRingEndState, _silkBallRingRecoverState, _silkBallMovePrepareState, _silkBallMoveEndState); FsmState targetState = FsmStateBuilder.FindState(_attackControlFsm, "Move Restart"); _silkBallPrepareState.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(_silkBallStaticEvent, _silkBallRingPrepareState), FsmStateBuilder.CreateTransition(_silkBallDashEvent, _silkBallMovePrepareState) }; _silkBallMovePrepareState.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(_silkBallDashEndEvent, _silkBallMoveEndState), FsmStateBuilder.CreateFinishedTransition(targetState) }; FsmStateBuilder.SetFinishedTransition(_silkBallMoveEndState, _silkBallRingRecoverState); FsmStateBuilder.SetFinishedTransition(_silkBallRingPrepareState, _silkBallRingCastState); _silkBallRingCastState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateFinishedTransition(_silkBallRingLiftState) }; _silkBallRingLiftState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateFinishedTransition(_silkBallRingAnticState) }; _silkBallRingAnticState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateFinishedTransition(_silkBallRingReleaseState) }; _silkBallRingReleaseState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateFinishedTransition(_silkBallRingEndState) }; FsmStateBuilder.SetFinishedTransition(_silkBallRingEndState, _silkBallRingRecoverState); FsmStateBuilder.SetFinishedTransition(_silkBallRingRecoverState, targetState); FsmState val = FsmStateBuilder.FindState(_attackControlFsm, "Attack Choice"); if (val != null) { FsmStateBuilder.AddTransition(val, FsmStateBuilder.CreateTransition(_silkBallAttackEvent, _silkBallPrepareState)); } } private FsmState CreateSilkBallPrepareState() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0075: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown FsmState orCreateState = FsmStateBuilder.GetOrCreateState(_attackControlFsm, "Silk Ball Prepare", "丝球攻击准备(50%分支)"); List list = new List(); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" } }, sendEvent = new FsmString("FORCE IDLE") { Value = "FORCE IDLE" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); SendRandomEventV4 val = new SendRandomEventV4(); val.events = (FsmEvent[])(object)new FsmEvent[2] { _silkBallStaticEvent, _silkBallDashEvent }; val.weights = (FsmFloat[])(object)new FsmFloat[2] { FsmFloat.op_Implicit(1f), FsmFloat.op_Implicit(1f) }; val.eventMax = (FsmInt[])(object)new FsmInt[2] { FsmInt.op_Implicit(2), FsmInt.op_Implicit(2) }; val.missedMax = (FsmInt[])(object)new FsmInt[2] { FsmInt.op_Implicit(2), FsmInt.op_Implicit(2) }; val.activeBool = new FsmBool { UseVariable = true, Value = true }; list.Add((FsmStateAction)(object)val); orCreateState.Actions = list.ToArray(); return orCreateState; } private void ModifyAttackChoiceForSilkBall() { //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Expected O, but got Unknown //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Expected O, but got Unknown //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Expected O, but got Unknown //IL_04ea: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Expected O, but got Unknown //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Expected O, but got Unknown //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Expected O, but got Unknown //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Expected O, but got Unknown //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Expected O, but got Unknown //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Expected O, but got Unknown //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Expected O, but got Unknown FsmState val = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Attack Choice")); if (val == null) { Log.Error("未找到Attack Choice状态"); return; } List list = new List(); for (int i = 0; i < val.Actions.Length; i++) { FsmStateAction obj = val.Actions[i]; SendRandomEventV4 val2 = (SendRandomEventV4)(object)((obj is SendRandomEventV4) ? obj : null); if (val2 != null) { list.Add(val2); } } if (list.Count < 2) { Log.Warn($"找到的SendRandomEventV4动作数量不足(期望2个,实际{list.Count}个)"); return; } SendRandomEventV4 val3 = list[0]; FsmEvent[] array = (FsmEvent[])(object)new FsmEvent[val3.events.Length + 1]; FsmFloat[] array2 = (FsmFloat[])(object)new FsmFloat[val3.weights.Length + 1]; FsmInt[] array3 = (FsmInt[])(object)new FsmInt[val3.eventMax.Length + 1]; FsmInt[] array4 = (FsmInt[])(object)new FsmInt[val3.missedMax.Length + 1]; for (int j = 0; j < val3.events.Length; j++) { array[j] = val3.events[j]; array3[j] = val3.eventMax[j]; array4[j] = val3.missedMax[j]; if (val3.events[j] != null && val3.events[j].Name == "HAND ATTACK") { array2[j] = new FsmFloat(FsmFloat.op_Implicit(0.5f)); Log.Info($"第一个动作 - HAND ATTACK权重: {val3.weights[j].Value} -> 0.5f"); } else if (val3.events[j] != null && val3.events[j].Name == "DASH ATTACK") { array2[j] = new FsmFloat(FsmFloat.op_Implicit(0.15f)); Log.Info($"第一个动作 - DASH ATTACK权重: {val3.weights[j].Value} -> 0.15f"); } else if (val3.events[j] != null && val3.events[j].Name == "WEB ATTACK") { array2[j] = new FsmFloat(FsmFloat.op_Implicit(0.15f)); Log.Info($"第一个动作 - WEB ATTACK权重: {val3.weights[j].Value} -> 0.15f"); } else { array2[j] = val3.weights[j]; } } int num = val3.events.Length; array[num] = _silkBallAttackEvent; array2[num] = new FsmFloat(FsmFloat.op_Implicit(0.2f)); array3[num] = new FsmInt(FsmInt.op_Implicit(1)); array4[num] = new FsmInt(FsmInt.op_Implicit(4)); val3.events = array; val3.weights = array2; val3.eventMax = array3; val3.missedMax = array4; Log.Info("第一个SendRandomEventV4修改完成:HAND 0.5, DASH 0.15, WEB 0.15, SILK BALL 0.2"); SendRandomEventV4 val4 = list[1]; Log.Info("修改第二个SendRandomEventV4(按顺序判断)"); FsmEvent[] array5 = (FsmEvent[])(object)new FsmEvent[val4.events.Length + 1]; FsmFloat[] array6 = (FsmFloat[])(object)new FsmFloat[val4.weights.Length + 1]; FsmInt[] array7 = (FsmInt[])(object)new FsmInt[val4.eventMax.Length + 1]; FsmInt[] array8 = (FsmInt[])(object)new FsmInt[val4.missedMax.Length + 1]; for (int k = 0; k < val4.events.Length; k++) { array5[k] = val4.events[k]; array7[k] = val4.eventMax[k]; array8[k] = val4.missedMax[k]; if (val4.events[k] != null && val4.events[k].Name == "HAND ATTACK") { array6[k] = new FsmFloat(FsmFloat.op_Implicit(0.6f)); Log.Info($"第二个动作 - HAND ATTACK权重: {val4.weights[k].Value} -> 0.6f"); } else if (val4.events[k] != null && val4.events[k].Name == "DASH ATTACK") { array6[k] = new FsmFloat(FsmFloat.op_Implicit(0.2f)); Log.Info($"第二个动作 - DASH ATTACK权重: {val4.weights[k].Value} -> 0.2f"); } else { array6[k] = val4.weights[k]; } } int num2 = val4.events.Length; array5[num2] = _silkBallAttackEvent; array6[num2] = new FsmFloat(FsmFloat.op_Implicit(0.2f)); array7[num2] = new FsmInt(FsmInt.op_Implicit(1)); array8[num2] = new FsmInt(FsmInt.op_Implicit(4)); val4.events = array5; val4.weights = array6; val4.eventMax = array7; val4.missedMax = array8; } private FsmState CreateSilkBallRingPrepareState() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Ring Prepare", "丝球攻击Prepare Cast"); List list = new List(); SendEventByName val2 = CloneAction("Web Lift", 0, (Func?)null); if (val2 != null) { list.Add((FsmStateAction)(object)val2); } list.Add((FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" }, fsm = _bossControlFsm, variableName = new FsmString("Attack Prepare") { Value = "Attack Prepare" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); val.Actions = list.ToArray(); return val; } private FsmState CreateSilkBallRingCastState() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Ring Cast", "丝球攻击Cast动画,同时向上移动"); List list = new List(); SetVelocity2d val2 = CloneAction("Web Cast", 0, (Func?)null); if (val2 != null) { list.Add((FsmStateAction)(object)val2); } list.Add((FsmStateAction)new Tk2dPlayAnimationWithEventsV2 { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Cast") { Value = "Cast" }, animationTriggerEvent = FsmEvent.Finished, animationCompleteEvent = _nullEvent, animationInterruptedEvent = _nullEvent, _sprite = ((Component)((Component)this).gameObject.transform).GetComponent(), hasExpectedClip = true, expectedClip = ((IEnumerable)((Component)((Component)this).gameObject.transform).GetComponent().Library.clips).FirstOrDefault((Func)((tk2dSpriteAnimationClip s) => s.name == "Cast")) }); val.Actions = list.ToArray(); Log.Info("创建Silk Ball Cast状态(Cast动画 + 向上移动)"); return val; } private FsmState CreateSilkBallRingLiftState() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Ring Lift", "向上移动到高点"); List list = new List(); SetVelocity2d val2 = CloneAction("Web Lift", 0, (Func?)null); if (val2 != null) { list.Add((FsmStateAction)(object)val2); } DecelerateV2 val3 = CloneAction("Web Lift", 0, (Func?)null); if (val3 != null) { list.Add((FsmStateAction)(object)val3); } list.Add((FsmStateAction)new Tk2dWatchAnimationEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animationCompleteEvent = _nullEvent, animationTriggerEvent = FsmEvent.Finished }); CheckYPositionV2 val4 = CloneAction("Web Lift", 0, (Func?)null); if (val4 != null) { list.Add((FsmStateAction)(object)val4); } SetVelocity2dBool val5 = CloneAction("Web Lift", 0, (Func?)null); if (val5 != null) { list.Add((FsmStateAction)(object)val5); } list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(2f)), finishEvent = FsmEvent.Finished, realTime = false }); val.Actions = list.ToArray(); Log.Info("创建Silk Ball Lift状态(只上升 + 2秒超时保护)"); return val; } private FsmState CreateSilkBallRingAnticState() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Ring Antic", "在高点召唤8个丝球"); List list = new List(); SetVelocity2d val2 = CloneAction("Roar Antic", 0, (Func?)null); if (val2 != null) { list.Add((FsmStateAction)(object)val2); } CallMethod val3 = new CallMethod(); val3.behaviour = new FsmObject { Value = (Object)(object)this }; val3.methodName = new FsmString("StartSilkBallSummonAtHighPoint") { Value = "StartSilkBallSummonAtHighPoint" }; val3.parameters = (FsmVar[])(object)new FsmVar[0]; val3.everyFrame = false; list.Add((FsmStateAction)(object)val3); val.Actions = list.ToArray(); Log.Info("创建Silk Ball Antic状态(在高点召唤)"); return val; } private FsmState CreateSilkBallRingReleaseState() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Ring Release", "释放所有丝球并触发冲击波"); List list = new List(); CallMethod val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("ReleaseSilkBalls") { Value = "ReleaseSilkBalls" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; CallMethod item = val2; list.Add((FsmStateAction)(object)item); val.Actions = list.ToArray(); Log.Info("创建Silk Ball Release状态(无Roar动画)"); return val; } private FsmState CreateSilkBallRingEndState() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Ring End", "丝球攻击结束"); List list = new List(); list.Add((FsmStateAction)new Tk2dWatchAnimationEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animationCompleteEvent = FsmEvent.Finished, animationTriggerEvent = _nullEvent }); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(2f)), finishEvent = FsmEvent.Finished, realTime = false }); val.Actions = list.ToArray(); Log.Info("创建Silk Ball End状态"); return val; } private FsmState CreateSilkBallRingRecoverState() { //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Ring Recover", "丝球攻击结束,简单下降"); List list = new List(); SendEventByName val2 = CloneAction("Web Recover", 0, (Func?)delegate(SendEventByName action) { FsmString sendEvent = action.sendEvent; string text = ((sendEvent != null) ? sendEvent.Value : null); return !string.IsNullOrEmpty(text) && text.Equals("IDLE", StringComparison.OrdinalIgnoreCase); }); if (val2 != null) { list.Add((FsmStateAction)(object)val2); } Tk2dPlayAnimation val3 = CloneAction("Web Recover", 0, (Func?)null); if (val3 != null) { list.Add((FsmStateAction)(object)val3); } SetVelocity2d val4 = CloneAction("Web Recover", 0, (Func?)null); if (val4 != null) { list.Add((FsmStateAction)(object)val4); } DecelerateV2 val5 = CloneAction("Web Recover", 0, (Func?)null); if (val5 != null) { list.Add((FsmStateAction)(object)val5); } list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.5f)), finishEvent = FsmEvent.Finished, realTime = false }); val.Actions = list.ToArray(); Log.Info("创建Silk Ball Recover状态(下降后转Move Restart)"); return val; } private void InitializeSilkBallDashVariables() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Expected O, but got Unknown //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Expected O, but got Unknown //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Expected O, but got Unknown //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Expected O, but got Unknown if (!((Object)(object)_attackControlFsm == (Object)null)) { _isGeneratingSilkBall = _attackControlFsm.FsmVariables.FindFsmBool("Is Generating Silk Ball"); if (_isGeneratingSilkBall == null) { _isGeneratingSilkBall = new FsmBool("Is Generating Silk Ball") { Value = false }; List list = _attackControlFsm.FsmVariables.BoolVariables.ToList(); list.Add(_isGeneratingSilkBall); _attackControlFsm.FsmVariables.BoolVariables = list.ToArray(); } _totalDistanceTraveled = _attackControlFsm.FsmVariables.FindFsmFloat("Total Distance Traveled"); if (_totalDistanceTraveled == null) { _totalDistanceTraveled = new FsmFloat("Total Distance Traveled") { Value = 0f }; List list2 = _attackControlFsm.FsmVariables.FloatVariables.ToList(); list2.Add(_totalDistanceTraveled); _attackControlFsm.FsmVariables.FloatVariables = list2.ToArray(); } _lastBallPosition = _attackControlFsm.FsmVariables.FindFsmVector2("Last Ball Position"); if (_lastBallPosition == null) { _lastBallPosition = new FsmVector2("Last Ball Position") { Value = Vector2.zero }; List list3 = _attackControlFsm.FsmVariables.Vector2Variables.ToList(); list3.Add(_lastBallPosition); _attackControlFsm.FsmVariables.Vector2Variables = list3.ToArray(); } FsmBool val = _attackControlFsm.FsmVariables.FindFsmBool("Special Attack"); if (val == null) { val = new FsmBool("Special Attack") { Value = false }; List list4 = _attackControlFsm.FsmVariables.BoolVariables.ToList(); list4.Add(val); _attackControlFsm.FsmVariables.BoolVariables = list4.ToArray(); } FsmBool val2 = _attackControlFsm.FsmVariables.FindFsmBool("Do P6 Web Attack"); if (val2 == null) { val2 = new FsmBool("Do P6 Web Attack") { Value = false }; List list5 = _attackControlFsm.FsmVariables.BoolVariables.ToList(); list5.Add(val2); _attackControlFsm.FsmVariables.BoolVariables = list5.ToArray(); } _spikeFloorsX = _attackControlFsm.FsmVariables.FindFsmGameObject("Spike Floors X"); if (_spikeFloorsX == null || (Object)(object)_spikeFloorsX.Value == (Object)null) { _spikeFloorsX = new FsmGameObject("Spike Floors X") { Value = null }; List list6 = _attackControlFsm.FsmVariables.GameObjectVariables.ToList(); list6.Add(_spikeFloorsX); _attackControlFsm.FsmVariables.GameObjectVariables = list6.ToArray(); } _attackControlFsm.FsmVariables.Init(); } } private FsmState CreateSilkBallMovePrepareState() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Move Prepare", "移动丝球准备:计算路线并触发Boss移动"); List list = new List(); CallMethod val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("CalculateAndSetDashRoute") { Value = "CalculateAndSetDashRoute" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; list.Add((FsmStateAction)(object)val2); list.Add((FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" }, fsm = _bossControlFsm, variableName = new FsmString("Silk Ball Dash Pending") { Value = "Silk Ball Dash Pending" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("StartGeneratingSilkBall") { Value = "StartGeneratingSilkBall" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; list.Add((FsmStateAction)(object)val2); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(10f)), finishEvent = FsmEvent.Finished, realTime = false }); val.Actions = list.ToArray(); return val; } private FsmState CreateSilkBallMoveEndState() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Move End", "移动丝球结束:停止生成"); List list = new List(); CallMethod val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("StopGeneratingSilkBall") { Value = "StopGeneratingSilkBall" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; list.Add((FsmStateAction)(object)val2); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished, realTime = false }); val.Actions = list.ToArray(); return val; } private void CheckAndSpawnSilkBall() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) Vector2 val = Vector2.op_Implicit(((Component)this).transform.position); if (_lastBallPosition.Value == Vector2.zero) { _lastBallPosition.Value = val; return; } float num = Vector2.Distance(val, _lastBallPosition.Value); FsmFloat? totalDistanceTraveled = _totalDistanceTraveled; totalDistanceTraveled.Value += num; _lastBallPosition.Value = val; if (_totalDistanceTraveled.Value >= 5f) { SpawnSilkBallAtPosition(val); _totalDistanceTraveled.Value = 0f; } } private void SpawnSilkBallAtPosition(Vector2 position) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_silkBallManager == (Object)null) { Log.Warn("SilkBallManager未初始化,无法生成丝球"); return; } Vector3 position2 = default(Vector3); ((Vector3)(ref position2))..ctor(position.x, position.y, 0f); SilkBallBehavior silkBallBehavior = _silkBallManager.SpawnSilkBall(position2, 35f, 25f, 8f, 1f); if ((Object)(object)silkBallBehavior != (Object)null) { ((MonoBehaviour)this).StartCoroutine(DelayedReleaseSilkBallForDash(silkBallBehavior)); } } [IteratorStateMachine(typeof(d__171))] private IEnumerator DelayedReleaseSilkBallForDash(SilkBallBehavior behavior) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__171(0) { <>4__this = this, behavior = behavior }; } public void CalculateAndSetDashRoute() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_bossControlFsm == (Object)null) { Log.Error("BossControl FSM未初始化,无法设置路线"); return; } Vector2 val = Vector2.op_Implicit(((Component)this).transform.position); FsmBool val2 = _bossControlFsm.FsmVariables.FindFsmBool("Hero Is Far"); bool flag = val2 != null && val2.Value; PlayMakerFSM? attackControlFsm = _attackControlFsm; FsmBool val3 = ((attackControlFsm != null) ? attackControlFsm.FsmVariables.FindFsmBool("Special Attack") : null); bool flag2 = val3 != null && val3.Value; BossZone bossZone = GetBossZone(val.x); Vector3? pointSpecial = null; Vector3 val4; Vector3 val5; if (bossZone == BossZone.Middle) { if (Random.value > 0.5f) { val4 = POS_LEFT_UP; val5 = POS_RIGHT_UP; if (flag2) { pointSpecial = POS_LEFT_DOWN; } Log.Info(flag2 ? "中区Phase2路线: 左上→左下→右上→中下" : "中区路线: 左上→右上→中下"); } else { val4 = POS_RIGHT_UP; val5 = POS_LEFT_UP; if (flag2) { pointSpecial = POS_RIGHT_DOWN; } Log.Info(flag2 ? "中区Phase2路线: 右上→右下→左上→中下" : "中区路线: 右上→左上→中下"); } } else if (flag) { val4 = POS_MIDDLE_UP; if (bossZone == BossZone.Left) { val5 = POS_LEFT_UP; if (flag2) { pointSpecial = POS_LEFT_DOWN; } Log.Info(flag2 ? "左区+远距离Phase2路线: 中上→左下→左上→中下" : "左区+远距离: 中上→左上→中下"); } else { val5 = POS_RIGHT_UP; if (flag2) { pointSpecial = POS_RIGHT_DOWN; } Log.Info(flag2 ? "右区+远距离Phase2路线: 中上→右下→右上→中下" : "右区+远距离: 中上→右上→中下"); } } else if (bossZone == BossZone.Left) { val4 = POS_RIGHT_UP; val5 = POS_LEFT_UP; if (flag2) { pointSpecial = POS_RIGHT_DOWN; } Log.Info(flag2 ? "左区+近距离Phase2路线: 右上→右下→左上→中下" : "左区+近距离: 右上→左上→中下"); } else { val4 = POS_LEFT_UP; val5 = POS_RIGHT_UP; if (flag2) { pointSpecial = POS_LEFT_DOWN; } Log.Info(flag2 ? "右区+近距离Phase2路线: 左上→左下→右上→中下" : "右区+近距离: 左上→右上→中下"); } Vector3 pOS_MIDDLE_DOWN = POS_MIDDLE_DOWN; if (flag2 && pointSpecial.HasValue) { SetRoutePointSpecial(pointSpecial.Value); } SetRoutePoint(0, val4); SetRoutePoint(1, val5); SetRoutePoint(2, pOS_MIDDLE_DOWN); BossBehavior component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.UpdateTargetPointPositions(val4, val5, pOS_MIDDLE_DOWN, pointSpecial); } else { Log.Warn("未找到BossBehavior组件,无法更新隐形目标点位置"); } string text = ((flag2 && pointSpecial.HasValue) ? $"{val4} → Special({pointSpecial.Value}) → {val5} → {pOS_MIDDLE_DOWN}" : $"{val4} → {val5} → {pOS_MIDDLE_DOWN}"); Log.Info("路线已设置: " + text); } private BossZone GetBossZone(float x) { if (x < 31f) { return BossZone.Left; } if (x > 46f) { return BossZone.Right; } return BossZone.Middle; } private void SetRoutePointSpecial(Vector3 value) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) BossBehavior component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { Log.Error("未找到BossBehavior组件,无法设置Special路线点"); } else if (component.RoutePointSpecialX != null && component.RoutePointSpecialY != null) { component.RoutePointSpecialX.Value = value.x; component.RoutePointSpecialY.Value = value.y; Log.Info($"设置Special路线点: X={value.x}, Y={value.y}"); } else { Log.Error("RoutePointSpecialX 或 RoutePointSpecialY 为 null"); } } private void SetRoutePoint(int index, Vector3 value) { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) BossBehavior component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { Log.Error("未找到BossBehavior组件,无法设置路线点"); return; } switch (index) { case 0: if (component.RoutePoint0X != null && component.RoutePoint0Y != null) { component.RoutePoint0X.Value = value.x; component.RoutePoint0Y.Value = value.y; Log.Info($"设置路线点 0: X={value.x}, Y={value.y}"); } else { Log.Error("RoutePoint0X 或 RoutePoint0Y 为 null"); } break; case 1: if (component.RoutePoint1X != null && component.RoutePoint1Y != null) { component.RoutePoint1X.Value = value.x; component.RoutePoint1Y.Value = value.y; Log.Info($"设置路线点 1: X={value.x}, Y={value.y}"); } else { Log.Error("RoutePoint1X 或 RoutePoint1Y 为 null"); } break; case 2: if (component.RoutePoint2X != null && component.RoutePoint2Y != null) { component.RoutePoint2X.Value = value.x; component.RoutePoint2Y.Value = value.y; Log.Info($"设置路线点 2: X={value.x}, Y={value.y}"); } else { Log.Error("RoutePoint2X 或 RoutePoint2Y 为 null"); } break; default: Log.Error($"无效的路线点索引: {index}"); break; } } public void StartGeneratingSilkBall() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if (_isGeneratingSilkBall != null) { _isGeneratingSilkBall.Value = true; _totalDistanceTraveled.Value = 0f; _lastBallPosition.Value = Vector2.op_Implicit(((Component)this).transform.position); Log.Info("开始生成移动丝球"); } } public void StopGeneratingSilkBall() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) if (_isGeneratingSilkBall != null) { _isGeneratingSilkBall.Value = false; if (_totalDistanceTraveled != null) { _totalDistanceTraveled.Value = 0f; } if (_lastBallPosition != null) { _lastBallPosition.Value = Vector2.zero; } Log.Info("停止生成移动丝球并重置变量"); } } [IteratorStateMachine(typeof(d__178))] public IEnumerator SummonSilkBallsAtHighPointCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__178(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__179))] private IEnumerator SummonNormalSilkBalls() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__179(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__180))] private IEnumerator SummonPhase2DoubleSilkBalls() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__180(0) { <>4__this = this }; } public void StartSilkBallSummonAtHighPoint() { Log.Info("供FSM调用:开始在高点召唤丝球"); if (_silkBallSummonCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(_silkBallSummonCoroutine); } _silkBallSummonCoroutine = ((MonoBehaviour)this).StartCoroutine(SummonSilkBallsAtHighPointCoroutine()); } public void ReleaseSilkBalls() { ((MonoBehaviour)this).StartCoroutine(ReleaseSilkBallsCoroutine()); } [IteratorStateMachine(typeof(d__183))] private IEnumerator ReleaseSilkBallsCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__183(0) { <>4__this = this }; } } internal class BigSilkBallBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__90 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public BigSilkBallBehavior <>4__this; private float 5__1; private float 5__2; private float 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__90(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.isAbsorbing = true; <>4__this.absorbedCount = 0; <>4__this.currentScale = <>4__this.initialScale; <>4__this.shouldStopSpawning = false; <>4__this.forceOverrideScale = true; <>4__this.targetHeartScale = Vector3.one * <>4__this.currentScale; if ((Object)(object)<>4__this.collisionBoxScript != (Object)null) { <>4__this.collisionBoxScript.SetScale(<>4__this.currentScale); } Log.Info($"吸收蓄力开始 - 初始缩放: {<>4__this.currentScale}, 目标吸收数: {<>4__this.absorbCountToMax}, 每秒生成: {<>4__this.absorbSpawnRate}"); 5__1 = 0f; 5__2 = 1f / <>4__this.absorbSpawnRate; 5__3 = 0f; break; case 1: <>1__state = -1; break; } if (5__1 < <>4__this.absorbDuration && !<>4__this.shouldStopSpawning) { 5__1 += Time.deltaTime; if (5__1 >= 5__3) { <>4__this.SpawnAbsorbBall(); 5__3 = 5__1 + 5__2; } <>2__current = null; <>1__state = 1; return true; } <>4__this.isAbsorbing = false; Log.Info($"吸收蓄力完成 - 共吸收: {<>4__this.absorbedCount} 个,最终缩放: {<>4__this.currentScale}"); <>4__this.PlayBurstAnimation(); <>4__this.NotifyPhaseControl("ChargeComplete"); if ((Object)(object)<>4__this.controlFSM != (Object)null) { <>4__this.controlFSM.SendEvent("FINISHED"); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__108 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject tempInstance; public BigSilkBallBehavior <>4__this; private PlayMakerFSM 5__1; private FsmState 5__2; private FsmStateAction[] <>s__3; private int <>s__4; private FsmStateAction 5__5; private PlayAudioEvent 5__6; private Exception 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__108(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; <>s__3 = null; 5__5 = null; 5__6 = null; 5__7 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; try { if ((Object)(object)tempInstance == (Object)null) { Log.Warn("临时实例已被销毁,无法提取音效"); return false; } 5__1 = ((IEnumerable)tempInstance.GetComponents()).FirstOrDefault((Func)((PlayMakerFSM fsm) => fsm.FsmName == "Control")); if ((Object)(object)5__1 == (Object)null) { Log.Warn("无法提取吸收音效:临时实例上未找到 Control FSM"); return false; } 5__2 = ((IEnumerable)5__1.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Disappear")); if (5__2 == null) { Log.Warn("无法提取吸收音效:Control FSM 中未找到 Disappear 状态"); return false; } <>s__3 = 5__2.Actions; for (<>s__4 = 0; <>s__4 < <>s__3.Length; <>s__4++) { 5__5 = <>s__3[<>s__4]; ref PlayAudioEvent reference = ref 5__6; FsmStateAction obj = 5__5; reference = (PlayAudioEvent)(object)((obj is PlayAudioEvent) ? obj : null); if (5__6 != null) { BigSilkBallBehavior bigSilkBallBehavior = <>4__this; FsmObject audioClip = 5__6.audioClip; ref AudioClip? absorbAudioClip = ref bigSilkBallBehavior.absorbAudioClip; Object obj2 = ((audioClip != null) ? audioClip.Value : null); absorbAudioClip = (AudioClip?)(object)((obj2 is AudioClip) ? obj2 : null); BigSilkBallBehavior bigSilkBallBehavior2 = <>4__this; FsmFloat pitchMin = ((PlayAudioEventBase)5__6).pitchMin; bigSilkBallBehavior2.absorbAudioPitchMin = ((pitchMin != null) ? pitchMin.Value : 1f); BigSilkBallBehavior bigSilkBallBehavior3 = <>4__this; FsmFloat pitchMax = ((PlayAudioEventBase)5__6).pitchMax; bigSilkBallBehavior3.absorbAudioPitchMax = ((pitchMax != null) ? pitchMax.Value : 1f); BigSilkBallBehavior bigSilkBallBehavior4 = <>4__this; FsmFloat volume = ((PlayAudioEventBase)5__6).volume; bigSilkBallBehavior4.absorbAudioVolume = ((volume != null) ? volume.Value : 1f); break; } 5__6 = null; 5__5 = null; } <>s__3 = null; 5__1 = null; 5__2 = null; } catch (Exception ex) { 5__7 = ex; Log.Error("提取音效数据时出错:" + 5__7.Message); } finally { if ((Object)(object)tempInstance != (Object)null) { Object.Destroy((Object)(object)tempInstance); Log.Debug("已销毁临时音效提取实例"); } } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__101 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public BigSilkBallBehavior <>4__this; private List> 5__1; private int 5__2; private float 5__3; private float 5__4; private float 5__5; private List 5__6; private int 5__7; private float 5__8; private GameObject 5__9; private int 5__10; private List 5__11; private int 5__12; private List.Enumerator <>s__13; private GameObject 5__14; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__101(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__6 = null; 5__9 = null; 5__11 = null; <>s__13 = default(List.Enumerator); 5__14 = null; <>1__state = -2; } private bool MoveNext() { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Expected O, but got Unknown //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Expected O, but got Unknown //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info($"最终爆炸开始 - 圈数: {<>4__this.finalBurstRings}, 每圈数量: {<>4__this.ballsPerRing}"); <>2__current = (object)new WaitForSeconds(2f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = new List>(); 5__2 = 0; goto IL_0221; case 2: <>1__state = -1; goto IL_01a3; case 3: <>1__state = -1; 5__6 = null; 5__2++; goto IL_0221; case 4: <>1__state = -1; 5__10 = 0; goto IL_03e4; case 5: { <>1__state = -1; goto IL_03cc; } IL_03e4: if (5__10 < 5__1.Count) { 5__11 = 5__1[5__10]; 5__12 = 0; <>s__13 = 5__11.GetEnumerator(); try { while (<>s__13.MoveNext()) { 5__14 = <>s__13.Current; if ((Object)(object)5__14 != (Object)null) { <>4__this.BurstRingBall(5__14, 5__10 * <>4__this.ballsPerRing + 5__12); 5__12++; } 5__14 = null; } } finally { ((IDisposable)<>s__13).Dispose(); } <>s__13 = default(List.Enumerator); Log.Info($"第 {5__10 + 1}/{<>4__this.finalBurstRings} 圈已爆发"); if (5__10 < 5__1.Count - 1) { <>2__current = (object)new WaitForSeconds(<>4__this.ringSpawnInterval); <>1__state = 5; return true; } goto IL_03cc; } Log.Info("所有圈已爆发完成"); <>4__this.NotifyPhaseControl("BurstComplete"); if ((Object)(object)<>4__this.controlFSM != (Object)null) { <>4__this.controlFSM.SendEvent("FINISHED"); } return false; IL_01bb: if (5__7 < <>4__this.ballsPerRing) { 5__8 = (float)5__7 * 5__4 + 5__5; 5__9 = <>4__this.SpawnRingBall(5__3, 5__8); if ((Object)(object)5__9 != (Object)null) { 5__6.Add(5__9); } if ((5__7 + 1) % 2 == 0) { <>2__current = null; <>1__state = 2; return true; } goto IL_01a3; } 5__1.Add(5__6); <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 3; return true; IL_0221: if (5__2 < <>4__this.finalBurstRings && 5__2 < <>4__this.ringRadii.Length) { 5__3 = <>4__this.ringRadii[5__2]; 5__4 = 360f / (float)<>4__this.ballsPerRing; 5__5 = ((5__2 % 2 == 1) ? (5__4 / 2f) : 0f); 5__6 = new List(); 5__7 = 0; goto IL_01bb; } Log.Info("所有圈静止生成完毕,开始依次爆发"); <>2__current = (object)new WaitForSeconds(<>4__this.ringBurstDelay); <>1__state = 4; return true; IL_01a3: 5__9 = null; 5__7++; goto IL_01bb; IL_03cc: 5__11 = null; 5__10++; goto IL_03e4; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__95 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SilkBallBehavior behavior; public float timeout; public BigSilkBallBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__95(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(timeout); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)behavior != (Object)null && (Object)(object)((Component)behavior).gameObject != (Object)null && behavior.isActive && behavior.canBeAbsorbed) { Log.Info($"吸收小丝球超时 ({timeout}秒),自动回收"); behavior.RecycleToPoolWithZTransition(); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__94 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject silkBall; public BigSilkBallBehavior <>4__this; private PlayMakerFSM 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__94(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; if (!((Object)(object)silkBall != (Object)null)) { break; } 5__1 = silkBall.GetComponent(); if ((Object)(object)5__1 != (Object)null) { 5__1.SendEvent("PREPARE"); <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 2; return true; } goto IL_00b8; case 2: { <>1__state = -1; 5__1.SendEvent("SILK BALL RELEASE"); goto IL_00b8; } IL_00b8: 5__1 = null; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__99 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PlayMakerFSM fsm; public Rigidbody2D rb; public Vector2 velocity; public BigSilkBallBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__99(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; case 1: <>1__state = -1; fsm.SendEvent("HAS_GRAVITY"); <>2__current = null; <>1__state = 2; return true; case 2: <>1__state = -1; if ((Object)(object)rb != (Object)null) { rb.linearVelocity = velocity; } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__97 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public BigSilkBallBehavior <>4__this; private int 5__1; private (float spawnAngle, float radiusMult, float shootAngle, int ballCount, float interval) 5__2; private int 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__97(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info($"抛射波次开始 - 总波数: {<>4__this._shootWaveConfigs.Length}"); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = 0; break; case 2: <>1__state = -1; 5__1++; break; } if (5__1 < <>4__this._shootWaveConfigs.Length) { 5__2 = <>4__this._shootWaveConfigs[5__1]; 5__3 = 0; while (5__3 < 5__2.ballCount) { <>4__this.SpawnShootBall(5__2.spawnAngle, 5__2.radiusMult, 5__2.shootAngle); 5__3++; } Log.Info($"第 {5__1 + 1}/{<>4__this._shootWaveConfigs.Length} 波抛射完成 - 生成{5__2.ballCount}个球"); <>2__current = (object)new WaitForSeconds(5__2.interval); <>1__state = 2; return true; } Log.Info("抛射波次完成"); <>4__this.NotifyPhaseControl("ShootComplete"); if ((Object)(object)<>4__this.controlFSM != (Object)null) { <>4__this.controlFSM.SendEvent("FINISHED"); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [Header("Boss引用")] public GameObject? bossObject; private PhaseControlBehavior? phaseControlBehavior; [Header("位置参数")] public Vector3 chestOffset = new Vector3(0f, -1f, 0f); [Header("碰撞箱参数")] public float collisionBoxRadius = 5f; public float initialScale = 0.1f; public float maxScale = 0.7f; [Header("爆炸参数")] public string burstAnimationName = "Silk_Cocoon_Intro_Burst"; public float burstDuration = 11.53f; public int ballsPerWave = 3; [Header("吸收蓄力参数")] public float absorbDuration = 10f; public float absorbSpawnRate = 10f; public float absorbSpawnRadius = 40f; public int absorbCountToMax = 30; public float scaleIncreasePerAbsorb = 0.012f; public float lowerHalfProbability = 0.7f; public float absorbAudioVolumeMultiplier = 3f; [Header("抛射波次参数")] public float shootSpeed = 23f; public float shootSpeedRandomRange = 8f; public float shootAngleRandomRange = 15f; public float shootGravityScale = 0.35f; private readonly (float spawnAngle, float radiusMult, float shootAngle, int ballCount, float interval)[] _shootWaveConfigs = new(float, float, float, int, float)[7] { (352.5f, 0.5f, 45f, 4, 0.8f), (0f, 0f, 35f, 4, 0.4f), (45f, 0.125f, 40f, 4, 0.4f), (130f, 0.5f, 115f, 7, 0.6f), (0f, 0f, 60f, 4, 0.4f), (0f, 0f, 145f, 7, 1.3f), (0f, 0f, 90f, 7, 0.6f) }; [Header("最终爆炸参数")] public int finalBurstRings = 4; public int ballsPerRing = 20; public float[] ringRadii = new float[4] { 1f, 2f, 3f, 4f }; public float ringSpawnInterval = 0.5f; public float ringBurstDelay = 1.6f; public float burstSpeed = 18f; public float innerRingSpeedMultiplier = 1.2f; public float outerRingSpeedMultiplier = 0.8f; public float finalBurstGravityScale = 0f; private PlayMakerFSM? controlFSM; private Animator? animator; private SilkBallManager? silkBallManager; [Header("内部引用")] public Transform? heartTransform; public GameObject? collisionBox; public Transform? collisionBoxTransform; private BigSilkBallCollisionBox? collisionBoxScript; private GameObject? heroObject; private float lastHeroX = 0f; private Vector3 collisionBoxBaseLocalPos; private readonly Vector3 collisionBoxVisualAnchorLocalPos = new Vector3(-6.4f, -5f, 0f); private readonly Vector3 collisionBoxWorldOffset = new Vector3(-1.75f, 1.75f, 0f); private AudioClip? absorbAudioClip; private float absorbAudioPitchMin = 1f; private float absorbAudioPitchMax = 1f; private float absorbAudioVolume = 1f; private FsmGameObject? bossTransformVar; private FsmVector3? chestOffsetVar; private FsmFloat? maxScaleVar; private FsmEvent? startChargeEvent; private FsmEvent? animationCompleteEvent; private bool isInitialized = false; private bool isAbsorbing = false; private int absorbedCount = 0; private float currentScale = 0.1f; private bool shouldStopSpawning = false; private bool shouldUpdateCollisionBoxPosition = true; private bool forceOverrideScale = false; private Vector3 targetHeartScale; private Vector3 savedBurstCenter; public void Initialize(GameObject rootObject, GameObject boss, Transform? heart = null) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) if (isInitialized) { Log.Warn("大丝球已初始化"); return; } bossObject = boss; heartTransform = heart; if ((Object)(object)heartTransform != (Object)null) { Log.Info($"heart保持原版相对位置: {heartTransform.localPosition}"); Log.Info("将只调整根物品XY轴跟随BOSS,Z轴保持原版"); } if ((Object)(object)boss != (Object)null) { phaseControlBehavior = boss.GetComponent(); if ((Object)(object)phaseControlBehavior == (Object)null) { Log.Warn("未找到 PhaseControlBehavior 组件"); } } HeroController instance = HeroController.instance; heroObject = ((instance != null) ? ((Component)instance).gameObject : null); if ((Object)(object)heroObject != (Object)null) { lastHeroX = heroObject.transform.position.x; Log.Info($"成功获取英雄引用,初始X位置: {lastHeroX}"); } SilkSpool instance2 = SilkSpool.Instance; GetComponentReferences(rootObject); CreateCollisionBox(); CreateControlFSM(); isInitialized = true; Log.Info("大丝球初始化完成,heart引用: " + (((Object)(object)heartTransform != (Object)null) ? "已设置" : "未设置") + ",碰撞箱: " + (((Object)(object)collisionBox != (Object)null) ? "已创建" : "未创建")); } private void Update() { UpdateCollisionBoxPosition(); } private void UpdateCollisionBoxPosition() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) if (shouldUpdateCollisionBoxPosition && !((Object)(object)collisionBox == (Object)null)) { if (TryProjectVisualAnchorToWorldZ0(out var projectedCenter)) { collisionBox.transform.position = projectedCenter; } else { collisionBox.transform.localPosition = collisionBoxBaseLocalPos; } } } private bool TryProjectVisualAnchorToWorldZ0(out Vector3 projectedCenter) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) projectedCenter = Vector3.zero; GameCameras silentInstance = GameCameras.SilentInstance; Camera val = (((Object)(object)silentInstance != (Object)null) ? silentInstance.mainCamera : Camera.main); if ((Object)(object)val == (Object)null) { val = Camera.main; } if ((Object)(object)val == (Object)null) { return false; } Vector3 val2 = ((Component)this).transform.TransformPoint(collisionBoxVisualAnchorLocalPos); Vector3 val3 = val.WorldToViewportPoint(val2); if (val3.z <= 0f) { return false; } Ray val4 = val.ViewportPointToRay(new Vector3(val3.x, val3.y, 0f)); Plane val5 = default(Plane); ((Plane)(ref val5))..ctor(Vector3.forward, Vector3.zero); float num = default(float); if (!((Plane)(ref val5)).Raycast(val4, ref num)) { return false; } projectedCenter = ((Ray)(ref val4)).GetPoint(num); projectedCenter.z = 0f; projectedCenter += collisionBoxWorldOffset; return true; } private void LateUpdate() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)heartTransform != (Object)null && forceOverrideScale) { heartTransform.localScale = targetHeartScale; } UpdateCollisionBoxPosition(); } private void GetComponentReferences(GameObject rootObject) { animator = rootObject.GetComponent(); if ((Object)(object)animator == (Object)null) { Log.Warn("未找到 Animator 组件"); } else { RuntimeAnimatorController runtimeAnimatorController = animator.runtimeAnimatorController; Log.Info("找到 Animator 组件,RuntimeAnimatorController: " + (((runtimeAnimatorController != null) ? ((Object)runtimeAnimatorController).name : null) ?? "null")); if ((Object)(object)animator.runtimeAnimatorController != (Object)null) { AnimationClip[] animationClips = animator.runtimeAnimatorController.animationClips; if (animationClips != null && animationClips.Length != 0) { Log.Info($"Animator 包含 {animationClips.Length} 个动画片段"); AnimationClip[] array = animationClips; foreach (AnimationClip val in array) { Log.Info($" - {((Object)val).name} ({val.length:F2}s)"); } } else { Log.Warn("Animator 没有动画片段"); } } } GameObject val2 = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val2 != (Object)null) { silkBallManager = val2.GetComponent(); if ((Object)(object)silkBallManager == (Object)null) { Log.Warn("未找到 SilkBallManager 组件"); } else { ExtractAbsorbAudioAction(); } } else { Log.Warn("未找到 AnySilkBossManager 对象"); } } private void CreateCollisionBox() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) collisionBox = new GameObject("CollisionBox"); collisionBox.transform.parent = ((Component)this).transform; collisionBoxBaseLocalPos = new Vector3(-6.4f, -5f, -57.4491f) + collisionBoxWorldOffset; collisionBox.transform.localPosition = collisionBoxBaseLocalPos; collisionBoxScript = collisionBox.AddComponent(); collisionBoxScript.parentBehavior = this; collisionBoxTransform = collisionBox.transform; collisionBox.transform.localScale = Vector3.one * initialScale; collisionBox.layer = LayerMask.NameToLayer("Terrain"); Log.Info($"碰撞箱已创建 - 世界位置: {collisionBox.transform.position}, 本地位置: {collisionBox.transform.localPosition}, 初始缩放: {initialScale}"); } private void CreateControlFSM() { if ((Object)(object)controlFSM != (Object)null) { Log.Warn("Control FSM 已存在"); return; } controlFSM = ((Component)this).gameObject.AddComponent(); controlFSM.FsmName = "Big Silk Ball Control"; FsmState val = CreateInitState(); FsmState val2 = CreateFollowBossState(); FsmState val3 = CreateAbsorbChargeState(); FsmState val4 = CreateShootWavesState(); FsmState val5 = CreateFinalBurstState(); FsmState val6 = CreateDestroyState(); controlFSM.Fsm.States = (FsmState[])(object)new FsmState[6] { val, val2, val3, val4, val5, val6 }; RegisterFSMEvents(); CreateFSMVariables(); AddInitActions(val); AddFollowBossActions(val2); AddAbsorbChargeActions(val3); AddShootWavesActions(val4); AddFinalBurstActions(val5); AddDestroyActions(val6); AddInitTransitions(val, val2); AddFollowBossTransitions(val2, val3); AddAbsorbChargeTransitions(val3, val4); AddShootWavesTransitions(val4, val5); AddFinalBurstTransitions(val5, val6); controlFSM.Fsm.InitData(); Type type = ((object)controlFSM.Fsm).GetType(); FieldInfo field = type.GetField("started", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { field.SetValue(controlFSM.Fsm, true); } controlFSM.Fsm.SetState(val.Name); Log.Info("=== 大丝球 Control FSM 创建完成,当前状态: " + controlFSM.Fsm.ActiveStateName + " ==="); } private void RegisterFSMEvents() { startChargeEvent = FsmEvent.GetFsmEvent("START CHARGE"); animationCompleteEvent = FsmEvent.GetFsmEvent("ANIMATION COMPLETE"); List list = controlFSM.Fsm.Events.ToList(); if (!list.Contains(startChargeEvent)) { list.Add(startChargeEvent); } if (!list.Contains(animationCompleteEvent)) { list.Add(animationCompleteEvent); } controlFSM.Fsm.Events = list.ToArray(); Log.Info("FSM 事件注册完成"); } private void CreateFSMVariables() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown bossTransformVar = new FsmGameObject("Boss Transform") { Value = bossObject }; controlFSM.FsmVariables.GameObjectVariables = (FsmGameObject[])(object)new FsmGameObject[1] { bossTransformVar }; chestOffsetVar = new FsmVector3("Chest Offset") { Value = chestOffset }; controlFSM.FsmVariables.Vector3Variables = (FsmVector3[])(object)new FsmVector3[1] { chestOffsetVar }; maxScaleVar = new FsmFloat("Max Scale") { Value = maxScale }; controlFSM.FsmVariables.FloatVariables = (FsmFloat[])(object)new FsmFloat[1] { maxScaleVar }; controlFSM.FsmVariables.IntVariables = (FsmInt[])(object)new FsmInt[0]; controlFSM.FsmVariables.Init(); } private FsmState CreateInitState() { return FsmStateBuilder.CreateState(controlFSM.Fsm, "Init", "初始化状态"); } private FsmState CreateFollowBossState() { return FsmStateBuilder.CreateState(controlFSM.Fsm, "Follow Boss", "跟随Boss胸前"); } private FsmState CreateAbsorbChargeState() { return FsmStateBuilder.CreateState(controlFSM.Fsm, "Absorb Charge", "吸收蓄力"); } private FsmState CreateShootWavesState() { return FsmStateBuilder.CreateState(controlFSM.Fsm, "Shoot Waves", "抛射波次"); } private FsmState CreateFinalBurstState() { return FsmStateBuilder.CreateState(controlFSM.Fsm, "Final Burst", "最终爆炸"); } private FsmState CreateDestroyState() { return FsmStateBuilder.CreateState(controlFSM.Fsm, "Destroy", "销毁自身"); } private void AddInitActions(FsmState initState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SetInitialScale") { Value = "SetInitialScale" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished }; initState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, (FsmStateAction)val3 }; } private void AddFollowBossActions(FsmState followBossState) { BigSilkBallFollowAction bigSilkBallFollowAction = new BigSilkBallFollowAction { bigSilkBallBehavior = this }; followBossState.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { bigSilkBallFollowAction }; } private void AddAbsorbChargeActions(FsmState absorbChargeState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartAbsorbChargeCoroutine") { Value = "StartAbsorbChargeCoroutine" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; BigSilkBallFollowAction bigSilkBallFollowAction = new BigSilkBallFollowAction { bigSilkBallBehavior = this }; absorbChargeState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, bigSilkBallFollowAction }; } private void AddShootWavesActions(FsmState shootWavesState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("FixPosition") { Value = "FixPosition" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartShootWavesCoroutine") { Value = "StartShootWavesCoroutine" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val3 = val; Wait val4 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(6f)), finishEvent = FsmEvent.Finished }; shootWavesState.Actions = (FsmStateAction[])(object)new FsmStateAction[3] { (FsmStateAction)val2, (FsmStateAction)val3, (FsmStateAction)val4 }; } private void AddFinalBurstActions(FsmState finalBurstState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartFinalBurstCoroutine") { Value = "StartFinalBurstCoroutine" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(8f)), finishEvent = FsmEvent.Finished }; finalBurstState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, (FsmStateAction)val3 }; } private void AddDestroyActions(FsmState destroyState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("DestroySelf") { Value = "DestroySelf" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; destroyState.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)val2 }; } private void AddInitTransitions(FsmState initState, FsmState followBossState) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown initState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.Finished, toState = "Follow Boss", toFsmState = followBossState } }; } private void AddFollowBossTransitions(FsmState followBossState, FsmState absorbChargeState) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown followBossState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = startChargeEvent, toState = "Absorb Charge", toFsmState = absorbChargeState } }; } private void AddAbsorbChargeTransitions(FsmState absorbChargeState, FsmState shootWavesState) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown absorbChargeState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.Finished, toState = "Shoot Waves", toFsmState = shootWavesState } }; } private void AddShootWavesTransitions(FsmState shootWavesState, FsmState finalBurstState) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown shootWavesState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.Finished, toState = "Final Burst", toFsmState = finalBurstState } }; } private void AddFinalBurstTransitions(FsmState finalBurstState, FsmState destroyState) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown finalBurstState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.Finished, toState = "Destroy", toFsmState = destroyState } }; } public void SetInitialScale() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)heartTransform != (Object)null) { targetHeartScale = Vector3.one * initialScale; forceOverrideScale = true; Log.Info($"设置heart初始缩放: {initialScale}(启用强制覆盖)"); } else { Log.Warn("heartTransform为null,无法设置初始缩放"); } } public void FixPosition() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)heartTransform != (Object)null) { targetHeartScale = heartTransform.localScale; forceOverrideScale = true; Log.Info($"固定状态 - 根物品位置: {((Component)this).transform.position}, heart缩放: {targetHeartScale}"); } else { Log.Info($"固定根物品位置: {((Component)this).transform.position}"); } } public void StartAbsorbChargeCoroutine() { Log.Info("开始吸收蓄力阶段"); ((MonoBehaviour)this).StartCoroutine(AbsorbChargeCoroutine()); } [IteratorStateMachine(typeof(d__90))] private IEnumerator AbsorbChargeCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__90(0) { <>4__this = this }; } private void PlayBurstAnimation() { if ((Object)(object)animator != (Object)null) { Log.Info("播放爆炸动画: " + burstAnimationName); animator.Play(burstAnimationName); RuntimeAnimatorController runtimeAnimatorController = animator.runtimeAnimatorController; AnimationClip[] array = ((runtimeAnimatorController != null) ? runtimeAnimatorController.animationClips : null); if (array != null) { AnimationClip val = ((IEnumerable)array).FirstOrDefault((Func)((AnimationClip c) => ((Object)c).name == burstAnimationName)); if ((Object)(object)val != (Object)null) { Log.Info($"动画长度: {val.length:F2}s"); } else { Log.Warn("未找到动画片段: " + burstAnimationName); } } } else { Log.Warn("Animator 为 null,无法播放动画"); } } public void OnAbsorbBall(SilkBallBehavior silkBall) { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)silkBall == (Object)null || !silkBall.canBeAbsorbed) { return; } if (!isAbsorbing) { silkBall.RecycleToPoolWithZTransition(); return; } if (shouldStopSpawning) { Log.Info("已达到最大缩放,立即回收超额丝球"); silkBall.RecycleToPoolWithZTransition(); return; } absorbedCount++; currentScale += scaleIncreasePerAbsorb; if (currentScale >= maxScale) { currentScale = maxScale; shouldStopSpawning = true; Log.Info($"达到最大缩放 {maxScale},停止生成新的小丝球"); } targetHeartScale = Vector3.one * currentScale; if ((Object)(object)collisionBoxScript != (Object)null) { collisionBoxScript.SetScale(currentScale); } Log.Info($"吸收小丝球 #{absorbedCount} - 当前缩放: {currentScale:F2}"); PlayAbsorbAudio(); silkBall.RecycleToPoolWithZTransition(); } private void SpawnAbsorbBall() { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)silkBallManager == (Object)null) && !((Object)(object)collisionBoxTransform == (Object)null)) { float num = ((!(Random.value < lowerHalfProbability)) ? Random.Range(90f, 270f) : Random.Range(-90f, 90f)); float num2 = num * (MathF.PI / 180f); Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(Mathf.Cos(num2), Mathf.Sin(num2)); Vector3 position = collisionBoxTransform.position + new Vector3(val.x, val.y, 0f) * absorbSpawnRadius; SilkBallBehavior silkBallBehavior = silkBallManager.SpawnSilkBall(position, 10f, 15f, 100f, 1f, enableRotation: true, collisionBoxTransform, ignoreWall: true, delayDamageActivation: false); if ((Object)(object)silkBallBehavior != (Object)null) { silkBallBehavior.canBeAbsorbed = true; ((MonoBehaviour)this).StartCoroutine(RecycleAbsorbBallAfterTimeout(silkBallBehavior, 15f)); ((MonoBehaviour)this).StartCoroutine(ReleaseAbsorbBall(((Component)silkBallBehavior).gameObject)); } } } [IteratorStateMachine(typeof(d__94))] private IEnumerator ReleaseAbsorbBall(GameObject silkBall) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__94(0) { <>4__this = this, silkBall = silkBall }; } [IteratorStateMachine(typeof(d__95))] private IEnumerator RecycleAbsorbBallAfterTimeout(SilkBallBehavior behavior, float timeout) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__95(0) { <>4__this = this, behavior = behavior, timeout = timeout }; } public void StartShootWavesCoroutine() { Log.Info("开始抛射波次阶段"); ((MonoBehaviour)this).StartCoroutine(ShootWavesCoroutine()); } [IteratorStateMachine(typeof(d__97))] private IEnumerator ShootWavesCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__97(0) { <>4__this = this }; } private void SpawnShootBall(float spawnAngle, float radiusMult, float shootAngle) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)silkBallManager == (Object)null || (Object)(object)collisionBoxTransform == (Object)null) { return; } float num = collisionBoxRadius; float num2 = num * radiusMult; float num3 = spawnAngle * (MathF.PI / 180f); Vector2 val = new Vector2(Mathf.Cos(num3), Mathf.Sin(num3)) * num2; Vector3 position = collisionBoxTransform.position + new Vector3(val.x, val.y, 0f); float num4 = Random.Range(0f - shootAngleRandomRange, shootAngleRandomRange); float num5 = shootAngle + num4; float num6 = num5 * (MathF.PI / 180f); Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(Mathf.Cos(num6), Mathf.Sin(num6)); float num7 = Random.Range(0f - shootSpeedRandomRange, shootSpeedRandomRange); float num8 = shootSpeed + num7; SilkBallBehavior silkBallBehavior = silkBallManager.SpawnSilkBall(position, 0f, num8, 10f, 1f, enableRotation: true, null, ignoreWall: false, delayDamageActivation: false); if (!((Object)(object)silkBallBehavior != (Object)null)) { return; } Rigidbody2D component = ((Component)silkBallBehavior).GetComponent(); if ((Object)(object)component != (Object)null) { component.gravityScale = shootGravityScale + Random.Range(-0.1f, 0.1f); component.bodyType = (RigidbodyType2D)0; silkBallBehavior.StartProtectionTime(1f); PlayMakerFSM component2 = ((Component)silkBallBehavior).GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.SendEvent("PREPARE"); ((MonoBehaviour)this).StartCoroutine(SetShootBallVelocityWithPrepare(component2, component, val2 * num8)); } } } [IteratorStateMachine(typeof(d__99))] private IEnumerator SetShootBallVelocityWithPrepare(PlayMakerFSM fsm, Rigidbody2D rb, Vector2 velocity) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__99(0) { <>4__this = this, fsm = fsm, rb = rb, velocity = velocity }; } public void StartFinalBurstCoroutine() { //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) Log.Info("开始最终爆炸阶段"); if ((Object)(object)silkBallManager != (Object)null) { Log.Info($"[BigSilkBall] FinalBurst需求数量: {finalBurstRings * ballsPerRing} (圈数:{finalBurstRings}, 每圈:{ballsPerRing})"); silkBallManager.LogPoolStatus(); } shouldUpdateCollisionBoxPosition = false; if ((Object)(object)collisionBoxTransform != (Object)null) { savedBurstCenter = collisionBoxTransform.position; } else { savedBurstCenter = ((Component)this).transform.position; } savedBurstCenter += Vector3.up * 1.3f; if ((Object)(object)collisionBox != (Object)null) { collisionBox.SetActive(false); } ((MonoBehaviour)this).StartCoroutine(FinalBurstCoroutine()); } [IteratorStateMachine(typeof(d__101))] private IEnumerator FinalBurstCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__101(0) { <>4__this = this }; } private GameObject? SpawnRingBall(float radius, float angle) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)silkBallManager == (Object)null) { return null; } float num = angle * (MathF.PI / 180f); Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(Mathf.Cos(num), Mathf.Sin(num)); Vector3 position = savedBurstCenter + new Vector3(val.x, val.y, 0f) * radius; SilkBallBehavior silkBallBehavior = silkBallManager.SpawnSilkBall(position, 0f, burstSpeed, 10f, 1f, enableRotation: true, null, ignoreWall: false, delayDamageActivation: false); if ((Object)(object)silkBallBehavior != (Object)null) { Rigidbody2D component = ((Component)silkBallBehavior).GetComponent(); if ((Object)(object)component != (Object)null) { component.gravityScale = finalBurstGravityScale; component.bodyType = (RigidbodyType2D)0; component.linearVelocity = Vector2.zero; silkBallBehavior.StartProtectionTime(2f); silkBallBehavior.SendFsmEvent("SILK BALL RELEASE"); return ((Component)silkBallBehavior).gameObject; } } return null; } private void BurstRingBall(GameObject ball, int index) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ball == (Object)null) { return; } Rigidbody2D component = ball.GetComponent(); SilkBallBehavior component2 = ball.GetComponent(); if (!((Object)(object)component == (Object)null) && !((Object)(object)component2 == (Object)null)) { Vector3 val = ball.transform.position - savedBurstCenter; Vector3 normalized = ((Vector3)(ref val)).normalized; float num = Vector3.Distance(ball.transform.position, savedBurstCenter); float num2 = 1f; if (num <= ringRadii[0] + 0.5f) { num2 = innerRingSpeedMultiplier; } else if (num >= ringRadii[ringRadii.Length - 1] - 0.5f) { num2 = outerRingSpeedMultiplier; } Vector2 linearVelocity = new Vector2(normalized.x, normalized.y) * burstSpeed * num2; component.linearVelocity = linearVelocity; } } private void NotifyPhaseControl(string eventName) { if ((Object)(object)phaseControlBehavior != (Object)null) { Log.Info("通知 PhaseControl: " + eventName); phaseControlBehavior.OnBigSilkBallEvent(eventName); } else { Log.Warn("PhaseControlBehavior 为 null,无法发送通知"); } } public void DestroySelf() { Log.Info("销毁大丝球"); Object.Destroy((Object)(object)((Component)this).gameObject); } public void StartCharge() { if ((Object)(object)controlFSM != (Object)null) { Log.Info("发送 START CHARGE 事件,当前状态: " + controlFSM.ActiveStateName); controlFSM.SendEvent("START CHARGE"); Log.Info("事件发送后状态: " + controlFSM.ActiveStateName); } else { Log.Error("controlFSM 为 null,无法发送 START CHARGE 事件"); } } private void ExtractAbsorbAudioAction() { GameObject val = null; try { GameObject val2 = null; GameObject val3 = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val3 != (Object)null) { AssetManager component = val3.GetComponent(); if ((Object)(object)component != (Object)null) { val2 = component.Get("Reaper Silk Bundle"); } } if ((Object)(object)val2 == (Object)null && (Object)(object)silkBallManager?.CustomSilkBallPrefab != (Object)null) { val2 = silkBallManager.CustomSilkBallPrefab; } if ((Object)(object)val2 == (Object)null) { Log.Warn("无法提取吸收音效:找不到预制体"); return; } val = Object.Instantiate(val2); val.SetActive(false); ((Object)val).name = "TempSilkBallForAudioExtraction"; Log.Info("临时实例化预制体用于提取音效: " + ((Object)val).name); ((MonoBehaviour)this).StartCoroutine(ExtractAudioAfterFrame(val)); } catch (Exception ex) { Log.Error("提取吸收音效失败:" + ex.Message); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } } [IteratorStateMachine(typeof(d__108))] private IEnumerator ExtractAudioAfterFrame(GameObject tempInstance) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__108(0) { <>4__this = this, tempInstance = tempInstance }; } private void PlayAbsorbAudio() { //IL_00b5: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)absorbAudioClip == (Object)null) { return; } try { HeroController instance = HeroController.instance; if ((Object)(object)instance != (Object)null) { float num = absorbAudioVolume * absorbAudioVolumeMultiplier; float num2 = Random.Range(absorbAudioPitchMin, absorbAudioPitchMax); AudioSource component = ((Component)instance).GetComponent(); if ((Object)(object)component != (Object)null) { component.pitch = num2; component.PlayOneShot(absorbAudioClip, num); Log.Debug($"通过英雄播放吸收音效: {((Object)absorbAudioClip).name}, pitch={num2:F2}"); } else { AudioSource.PlayClipAtPoint(absorbAudioClip, ((Component)Camera.main).transform.position, num); Log.Debug("通过摄像机播放吸收音效: " + ((Object)absorbAudioClip).name); } } } catch (Exception ex) { Log.Error("播放吸收音效失败:" + ex.Message); } } } internal class BigSilkBallFollowAction : FsmStateAction { public BigSilkBallBehavior? bigSilkBallBehavior; public override void Reset() { bigSilkBallBehavior = null; } public override void OnEnter() { if ((Object)(object)bigSilkBallBehavior == (Object)null) { Debug.LogError((object)"BigSilkBallFollowAction: bigSilkBallBehavior 为 null"); ((FsmStateAction)this).Finish(); } } public override void OnUpdate() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)bigSilkBallBehavior == (Object)null) && !((Object)(object)bigSilkBallBehavior.bossObject == (Object)null)) { Vector3 position = bigSilkBallBehavior.bossObject.transform.position; Vector3 val = position + bigSilkBallBehavior.chestOffset; Vector3 position2 = ((Component)bigSilkBallBehavior).transform.position; position2.x = val.x; position2.y = val.y; ((Component)bigSilkBallBehavior).transform.position = position2; } } } internal class BigSilkBallCollisionBox : MonoBehaviour { public BigSilkBallBehavior? parentBehavior; private CircleCollider2D? circleCollider; private Rigidbody2D? rb; private void Awake() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) rb = ((Component)this).gameObject.AddComponent(); if ((Object)(object)rb != (Object)null) { rb.bodyType = (RigidbodyType2D)1; rb.useFullKinematicContacts = true; rb.gravityScale = 0f; rb.constraints = (RigidbodyConstraints2D)4; Log.Info($"碰撞箱Rigidbody2D已创建 - BodyType: {rb.bodyType}, useFullKinematicContacts: {rb.useFullKinematicContacts}"); } circleCollider = ((Component)this).gameObject.AddComponent(); if ((Object)(object)circleCollider != (Object)null) { circleCollider.radius = 5f; ((Collider2D)circleCollider).isTrigger = true; Log.Info($"碰撞箱CircleCollider2D已创建 - 半径: {circleCollider.radius}, isTrigger: {((Collider2D)circleCollider).isTrigger}"); } Log.Info("碰撞箱组件设置完成 - Layer: " + LayerMask.LayerToName(((Component)this).gameObject.layer)); } private void OnEnable() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) Log.Info($"碰撞箱已激活 - 位置: {((Component)this).transform.position}, Layer: {LayerMask.LayerToName(((Component)this).gameObject.layer)}"); } private void OnTriggerEnter2D(Collider2D other) { if ((Object)(object)parentBehavior == (Object)null) { Log.Warn("[大丝球碰撞箱] parentBehavior为null,无法处理吸收"); return; } SilkBallBehavior silkBallBehavior = ((Component)other).GetComponent(); if ((Object)(object)silkBallBehavior == (Object)null) { silkBallBehavior = ((Component)other).GetComponentInParent(); } if ((Object)(object)silkBallBehavior != (Object)null) { parentBehavior.OnAbsorbBall(silkBallBehavior); } } public void OnCollisionWithSilkBall(SilkBallBehavior silkBall) { if ((Object)(object)parentBehavior == (Object)null) { Log.Warn("[大丝球碰撞箱] parentBehavior为null,无法处理吸收"); return; } Log.Info("[大丝球碰撞箱] 小丝球主动报告碰撞: " + ((Object)((Component)silkBall).gameObject).name); parentBehavior.OnAbsorbBall(silkBall); } public void SetScale(float scale) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.localScale = Vector3.one * scale; } } [RequireComponent(typeof(tk2dSpriteAnimator))] [RequireComponent(typeof(Rigidbody2D))] [RequireComponent(typeof(PlayMakerFSM))] internal class BossBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__38 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public BossBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__38(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SetupBoss()); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__61 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public BossBehavior <>4__this; private SendEventToRegister 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__61(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_008c: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(3.5f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = new SendEventToRegister { Fsm = <>4__this._bossControlFsm.Fsm, eventName = new FsmString("BLADES RETURN") { Value = "BLADES RETURN" } }; ((FsmStateAction)5__1).OnEnter(); Log.Info("延迟发送 BLADES RETURN(针对 Stagger Finish 状态)"); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 2; return true; case 2: <>1__state = -1; ((FsmStateAction)5__1).OnEnter(); Log.Info("第二次发送 BLADES RETURN(针对 Rise 状态)"); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__39 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public BossBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__39(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.GetComponents(); <>4__this.ModifyBossControlFSM(); Log.Info("Boss行为控制器初始化完成"); <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public string fsmName = "Control"; private PlayMakerFSM? _bossControlFsm; private AttackControlBehavior? _attackControlBehavior; private bool[] phaseFlags = new bool[10]; private const float DASH_SPEED = 8f; private const float DASH_ANTIC_TIME = 0.3f; private const float DASH_ANTIC_TIME_FIRST = 0.6f; private const float IDLE_WAIT_TIME = 0.6f; private const float MAX_DASH_TIME = 4f; private static readonly Vector3 POS_LEFT_DOWN = new Vector3(25f, 137f, 0f); private static readonly Vector3 POS_LEFT_UP = new Vector3(25f, 142.5f, 0f); private static readonly Vector3 POS_MIDDLE_UP = new Vector3(39.5f, 142.5f, 0f); private static readonly Vector3 POS_MIDDLE_DOWN = new Vector3(39.5f, 137f, 0f); private static readonly Vector3 POS_RIGHT_UP = new Vector3(51.5f, 142.5f, 0f); private static readonly Vector3 POS_RIGHT_DOWN = new Vector3(51.5f, 137f, 0f); public FsmFloat? RoutePoint0X; public FsmFloat? RoutePoint0Y; public FsmFloat? RoutePoint1X; public FsmFloat? RoutePoint1Y; public FsmFloat? RoutePoint2X; public FsmFloat? RoutePoint2Y; public FsmFloat? RoutePointSpecialX; public FsmFloat? RoutePointSpecialY; public FsmFloat? IdleWaitTime; private GameObject? _silkHair; private GameObject? _targetPoint0; private GameObject? _targetPoint1; private GameObject? _targetPoint2; private GameObject? _targetPointSpecial; private FsmGameObject? _fsmTargetPoint0; private FsmGameObject? _fsmTargetPoint1; private FsmGameObject? _fsmTargetPoint2; private FsmGameObject? _fsmTargetPointSpecial; private string _lastStateName = ""; private Vector3 _currentRoamTarget; private float _roamMoveStartTime; private bool _roamMoveComplete = false; private bool _collider2DWasEnabled = true; private Collider2D? _bossCollider2D; private void Awake() { } private void Start() { ((MonoBehaviour)this).StartCoroutine(DelayedSetup()); } private void OnDestroy() { CleanupAllSilkBallsOnDestroy(); } private void OnDisable() { CleanupAllSilkBallsOnDestroy(); } [IteratorStateMachine(typeof(d__38))] private IEnumerator DelayedSetup() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__38(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__39))] private IEnumerator SetupBoss() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__39(0) { <>4__this = this }; } private void GetComponents() { _bossControlFsm = FSMUtility.LocateMyFSM(((Component)this).gameObject, fsmName); _attackControlBehavior = ((Component)this).GetComponent(); if ((Object)(object)_attackControlBehavior == (Object)null) { Log.Warn("未找到AttackControlBehavior组件,部分眩晕清理逻辑将无效"); } _silkHair = ((Component)((Component)this).transform.parent.Find("Silk_Hair")).gameObject; } private void AddStunInterruptHandling() { if (!((Object)(object)_bossControlFsm == (Object)null)) { Log.Info("=== 添加眩晕中断处理 ==="); AddCleanupToStunStagger(); AddRecoveryEventToStunRecover(); Log.Info("眩晕中断处理添加完成"); } } private void AddCleanupToStunStagger() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown FsmState val = ((IEnumerable)_bossControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Stun Stagger")); if (val == null) { Log.Warn("未找到 Stun Stagger 状态,跳过清理逻辑添加"); return; } List list = val.Actions.ToList(); CallMethod val2 = new CallMethod(); val2.behaviour = FsmObject.op_Implicit((Object)(object)this); val2.methodName = new FsmString("CleanupSilkBallsOnStun") { Value = "CleanupSilkBallsOnStun" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; list.Insert(0, (FsmStateAction)(object)val2); val.Actions = list.ToArray(); Log.Info("已在 Stun Stagger 状态添加丝球清理、中断事件和状态同步"); } private void AddRecoveryEventToStunRecover() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00af: Expected O, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown FsmState val = ((IEnumerable)_bossControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Stun Recover")); if (val == null) { Log.Warn("未找到 Stun Recover 状态,跳过恢复事件添加"); return; } List list = val.Actions.ToList(); list.Insert(0, (FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" } }, sendEvent = new FsmString("SILK BALL RECOVER") { Value = "SILK BALL RECOVER" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); val.Actions = list.ToArray(); Log.Info("已在 Stun Recover 状态添加恢复事件发送"); } public void CleanupSilkBallsOnStun() { Log.Info("Boss眩晕,开始清理丝球"); if ((Object)(object)_attackControlBehavior != (Object)null) { _attackControlBehavior.StopGeneratingSilkBall(); _attackControlBehavior.ClearActiveSilkBalls(); } GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { SilkBallManager component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.RecycleAllActiveSilkBalls(); Log.Info("已通过SilkBallManager清理所有丝球"); } else { Log.Warn("未找到SilkBallManager组件"); } } else { Log.Warn("未找到AnySilkBossManager GameObject"); } } private void CleanupAllSilkBallsOnDestroy() { Log.Info("场景切换/对象销毁,执行完全清理"); ((MonoBehaviour)this).StopAllCoroutines(); if ((Object)(object)_attackControlBehavior != (Object)null) { _attackControlBehavior.StopGeneratingSilkBall(); _attackControlBehavior.ClearActiveSilkBalls(); _attackControlBehavior.StopAllSilkBallCoroutines(); } GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { SilkBallManager component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.RecycleAllActiveSilkBalls(); Log.Info("完全清理:已通过SilkBallManager回收所有丝球"); } } } private void CreateClimbRoamStates() { if (!((Object)(object)_bossControlFsm == (Object)null)) { Log.Info("=== 开始创建爬升阶段状态链 ==="); RegisterClimbRoarEvents(); FsmState[] array = FsmStateBuilder.CreateStates(_bossControlFsm.Fsm, ("Climb Roar Prepare", "Boss吼叫准备"), ("Climb Roar", "Boss吼叫"), ("Climb Roar End", "Boss吼叫结束"), ("Climb Roar Done", "Boss吼叫完成"), ("Climb Roam Init", "漫游初始化"), ("Climb Roam Select Target", "选择漫游目标"), ("Climb Roam Move", "移动到目标"), ("Climb Roam Idle", "短暂停留")); FsmStateBuilder.AddStatesToFsm(_bossControlFsm, array); FsmState val = array[0]; FsmState val2 = array[1]; FsmState roarEndState = array[2]; FsmState roarDoneState = array[3]; FsmState val3 = array[4]; FsmState selectState = array[5]; FsmState moveState = array[6]; FsmState idleState = array[7]; FsmState idleState2 = FsmStateBuilder.FindState(_bossControlFsm, "Idle"); AddClimbRoarPrepareActions(val); AddClimbRoarActions(val2); AddClimbRoarEndActions(roarEndState); AddClimbRoarDoneActions(roarDoneState); AddClimbRoamInitActions(val3); AddClimbRoamSelectTargetActions(selectState); AddClimbRoamMoveActions(moveState); AddClimbRoamIdleActions(idleState); AddClimbRoarTransitions(val, val2, roarEndState, roarDoneState); AddClimbRoamTransitions(val3, selectState, moveState, idleState); AddClimbPhaseGlobalTransitionsNew(val, val3, idleState2); FsmStateBuilder.ReinitializeFsmVariables(_bossControlFsm); Log.Info("=== 爬升阶段状态链创建完成 ==="); } } private void RegisterClimbRoarEvents() { FsmStateBuilder.RegisterEvents(_bossControlFsm, "CLIMB ROAR START", "CLIMB ROAR DONE"); Log.Info("Climb Roar 事件注册完成"); } private void AddClimbRoamInitActions(FsmState initState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = FsmVector2.op_Implicit(new Vector2(0f, 0f)), x = new FsmFloat { UseVariable = false }, y = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("DisableBossCollider") { Value = "DisableBossCollider" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("InitClimbRoamParameters") { Value = "InitClimbRoamParameters" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.2f)), finishEvent = FsmEvent.Finished }); initState.Actions = list.ToArray(); } private void AddClimbRoamSelectTargetActions(FsmState selectState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("CalculateClimbRoamTarget") { Value = "CalculateClimbRoamTarget" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished }); selectState.Actions = list.ToArray(); } private void AddClimbRoamMoveActions(FsmState moveState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SelectRoamAnimation") { Value = "SelectRoamAnimation" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("MoveToRoamTarget") { Value = "MoveToRoamTarget" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = true; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("CheckRoamMoveTimeout") { Value = "CheckRoamMoveTimeout" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = true; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(999f)), finishEvent = null }); moveState.Actions = list.ToArray(); } private void AddClimbRoamIdleActions(FsmState idleState) { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_00f4: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown List list = new List(); if ((Object)(object)HeroController.instance != (Object)null) { list.Add((FsmStateAction)new FaceObjectV2 { objectA = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, objectB = new FsmGameObject { Value = ((Component)HeroController.instance).gameObject }, spriteFacesRight = FsmBool.op_Implicit(false), playNewAnimation = false, newAnimationClip = new FsmString("") { Value = "" }, resetFrame = false, pauseBetweenTurns = 0.5f, everyFrame = false }); } list.Add((FsmStateAction)new Tk2dPlayAnimation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animLibName = new FsmString("") { Value = "" }, clipName = new FsmString("Idle") { Value = "Idle" } }); list.Add((FsmStateAction)new WaitRandom { timeMin = new FsmFloat(FsmFloat.op_Implicit(1f)), timeMax = new FsmFloat(FsmFloat.op_Implicit(2f)), finishEvent = FsmEvent.Finished }); idleState.Actions = list.ToArray(); } private void AddClimbRoamTransitions(FsmState initState, FsmState selectState, FsmState moveState, FsmState idleState) { FsmStateBuilder.SetFinishedTransition(initState, selectState); FsmStateBuilder.SetFinishedTransition(selectState, moveState); FsmStateBuilder.SetFinishedTransition(moveState, idleState); FsmStateBuilder.SetFinishedTransition(idleState, selectState); Log.Info("漫游状态转换设置完成"); } private void AddClimbRoarPrepareActions(FsmState roarPrepareState) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_003b: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_0081: Expected O, but got Unknown //IL_0086: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown List list = new List(); SendEventToRegister item = new SendEventToRegister { Fsm = _bossControlFsm.Fsm, eventName = new FsmString("ATTACK CLEAR") { Value = "ATTACK CLEAR" } }; list.Add((FsmStateAction)(object)item); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = _silkHair } } }, sendEvent = FsmString.op_Implicit("ROAR"), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); Tk2dPlayAnimationWithEvents item2 = new Tk2dPlayAnimationWithEvents { Fsm = _bossControlFsm.Fsm, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Roar") { Value = "Roar" }, animationTriggerEvent = FsmEvent.Finished }; list.Add((FsmStateAction)(object)item2); roarPrepareState.Actions = list.ToArray(); } private void AddClimbRoarActions(FsmState climbRoarState) { //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Expected O, but got Unknown //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Expected O, but got Unknown //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Expected O, but got Unknown List list = new List(); FsmState val = ((IEnumerable)_bossControlFsm.FsmStates).FirstOrDefault((Func)((FsmState x) => x.Name == "Rerise Roar")); if (val == null) { Log.Error("Could not find 'Rerise Roar' state in Boss Control FSM"); return; } FsmStateAction? obj = ((IEnumerable)val.Actions).FirstOrDefault((Func)((FsmStateAction x) => x is StartRoarEmitter)); StartRoarEmitter val2 = (StartRoarEmitter)(object)((obj is StartRoarEmitter) ? obj : null); List list2 = val.Actions.Where((FsmStateAction x) => x is PlayAudioEvent).Cast().ToList(); if (val2 == null) { Log.Error("Missing StartRoarEmitter in 'Rerise Roar' state"); return; } StartRoarEmitter item = new StartRoarEmitter { Fsm = _bossControlFsm.Fsm, spawnPoint = val2.spawnPoint, delay = val2.delay, stunHero = new FsmBool(FsmBool.op_Implicit(true)) { Value = true }, roarBurst = val2.roarBurst, isSmall = val2.isSmall, noVisualEffect = val2.noVisualEffect, forceThroughBind = val2.forceThroughBind, stopOnExit = val2.stopOnExit }; list.Add((FsmStateAction)(object)item); Tk2dWatchAnimationEvents item2 = new Tk2dWatchAnimationEvents { Fsm = _bossControlFsm.Fsm, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animationTriggerEvent = FsmEvent.Finished }; list.Add((FsmStateAction)(object)item2); foreach (PlayAudioEvent item4 in list2) { PlayAudioEvent item3 = new PlayAudioEvent { Fsm = _bossControlFsm.Fsm, audioClip = item4.audioClip, volume = ((PlayAudioEventBase)item4).volume, pitchMin = ((PlayAudioEventBase)item4).pitchMin, pitchMax = ((PlayAudioEventBase)item4).pitchMax, audioPlayerPrefab = ((PlayAudioEventBase)item4).audioPlayerPrefab, spawnPoint = ((PlayAudioEventBase)item4).spawnPoint, spawnPosition = ((PlayAudioEventBase)item4).spawnPosition, SpawnedPlayerRef = ((PlayAudioEventBase)item4).SpawnedPlayerRef }; list.Add((FsmStateAction)(object)item3); } climbRoarState.Actions = list.ToArray(); Log.Info($"Climb Roar 状态添加了 {list.Count} 个 Actions(含 {list2.Count} 个音效)"); } private void AddClimbRoarEndActions(FsmState roarEndState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0045: Expected O, but got Unknown //IL_004a: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = _silkHair } } }, sendEvent = FsmString.op_Implicit("IDLE"), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new Tk2dWatchAnimationEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animationCompleteEvent = FsmEvent.Finished }); roarEndState.Actions = list.ToArray(); } private void AddClimbRoarDoneActions(FsmState roarDoneState) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_0085: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown //IL_00f9: Expected O, but got Unknown //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Expected O, but got Unknown //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0171: Expected O, but got Unknown //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Expected O, but got Unknown //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Expected O, but got Unknown List list = new List(); MusicCue val = ((IEnumerable)Resources.FindObjectsOfTypeAll()).FirstOrDefault((Func)((MusicCue mc) => ((Object)mc).name == "Silk Boss B")); if ((Object)(object)val != (Object)null) { list.Add((FsmStateAction)new ApplyMusicCue { musicCue = new FsmObject { Value = (Object)(object)val }, delayTime = new FsmFloat(FsmFloat.op_Implicit(0f)), transitionTime = new FsmFloat(FsmFloat.op_Implicit(0f)) }); Log.Info("已添加二阶段音乐 ApplyMusicCue (Silk Boss B)"); } else { Log.Warn("未找到 Silk Boss B MusicCue,二阶段音乐可能无法播放"); } list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Phase Control") { Value = "Phase Control" } }, sendEvent = new FsmString("CLIMB ROAR DONE") { Value = "CLIMB ROAR DONE" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new Tk2dPlayAnimation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Idle") { Value = "Idle" } }); CallMethod val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("SendBladesReturnDelayed") { Value = "SendBladesReturnDelayed" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; list.Add((FsmStateAction)(object)val2); roarDoneState.Actions = list.ToArray(); } public void SendBladesReturnDelayed() { ((MonoBehaviour)this).StartCoroutine(SendBladesReturnDelayedCoroutine()); } [IteratorStateMachine(typeof(d__61))] private IEnumerator SendBladesReturnDelayedCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__61(0) { <>4__this = this }; } private void AddClimbRoarTransitions(FsmState roarPrepareState, FsmState roarState, FsmState roarEndState, FsmState roarDoneState) { FsmStateBuilder.SetFinishedTransition(roarPrepareState, roarState); FsmStateBuilder.SetFinishedTransition(roarState, roarEndState); FsmStateBuilder.SetFinishedTransition(roarEndState, roarDoneState); roarDoneState.Transitions = Array.Empty(); } private void AddClimbPhaseGlobalTransitionsNew(FsmState climbRoarPrepare, FsmState climbRoamInit, FsmState? idleState) { List list = _bossControlFsm.Fsm.GlobalTransitions.ToList(); list.Add(FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB ROAR START"), climbRoarPrepare)); list.Add(FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB PHASE START"), climbRoamInit)); if (idleState != null) { list.Add(FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB PHASE END"), idleState)); } _bossControlFsm.Fsm.GlobalTransitions = list.ToArray(); Log.Info("爬升阶段全局转换添加完成(含Roar)"); } private void AddClimbPhaseGlobalTransitions(FsmState climbRoamInit, FsmState? idleState) { List list = _bossControlFsm.Fsm.GlobalTransitions.ToList(); list.Add(FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB PHASE START"), climbRoamInit)); if (idleState != null) { list.Add(FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB PHASE END"), idleState)); } _bossControlFsm.Fsm.GlobalTransitions = list.ToArray(); Log.Info("爬升阶段全局转换添加完成"); } public void InitClimbRoamParameters() { Log.Info("漫游参数初始化完成"); } public void CalculateClimbRoamTarget() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) HeroController instance = HeroController.instance; if ((Object)(object)instance == (Object)null) { Log.Warn("HeroController 未找到,使用默认目标点"); _currentRoamTarget = new Vector3(39.5f, 140f, 0f); return; } Vector3 position = instance.transform.position; float num = 25f; float num2 = 55f; float num3 = position.y + 12f; float num4 = 145f; float num5 = Mathf.Clamp(position.x + Random.Range(-8f, 8f), num, num2); float num6 = Mathf.Clamp(position.y + 17f + Random.Range(-5f, 5f), num3, num4); _currentRoamTarget = new Vector3(num5, num6, 0f); Log.Info($"选择漫游目标: {_currentRoamTarget}(玩家上方12-22单位)"); } public void SelectRoamAnimation() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)this).transform.position; bool flag = _currentRoamTarget.x > position.x; tk2dSpriteAnimator component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { component.Play(flag ? "Drift F" : "Drift B"); } _roamMoveStartTime = Time.time; _roamMoveComplete = false; Log.Info("选择动画: " + (flag ? "Drift F" : "Drift B")); } public void MoveToRoamTarget() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) if (_roamMoveComplete) { return; } Vector3 position = ((Component)this).transform.position; float num = Vector3.Distance(position, _currentRoamTarget); if (num < 0.5f) { _roamMoveComplete = true; if ((Object)(object)_bossControlFsm != (Object)null) { _bossControlFsm.SendEvent("FINISHED"); Log.Info("到达漫游目标"); } } else { float num2 = 9f; Vector3 val = _currentRoamTarget - position; Vector3 normalized = ((Vector3)(ref val)).normalized; Transform transform = ((Component)this).transform; transform.position += normalized * num2 * Time.deltaTime; } } public void CheckRoamMoveTimeout() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (!_roamMoveComplete && Time.time - _roamMoveStartTime > 3f) { Log.Warn($"漫游移动超时(3秒),强制完成。当前位置: {((Component)this).transform.position},目标: {_currentRoamTarget}"); _roamMoveComplete = true; if ((Object)(object)_bossControlFsm != (Object)null) { _bossControlFsm.SendEvent("FINISHED"); } } } public void CheckAndTriggerDashPath() { if ((Object)(object)_bossControlFsm == (Object)null) { return; } FsmBool val = _bossControlFsm.FsmVariables.FindFsmBool("Silk Ball Dash Pending"); if (val != null && val.Value) { FsmBool val2 = _bossControlFsm.FsmVariables.FindFsmBool("Special Attack"); bool flag = val2 != null && val2.Value; val.Value = false; if (flag) { _bossControlFsm.SendEvent("SILK BALL DASH BRIDGE"); Log.Info("触发Phase2 Dash路径,Special将在Point 0后插入"); } else { _bossControlFsm.SendEvent("SILK BALL DASH BRIDGE"); Log.Info("触发普通Dash路径"); } } } private void InitializeClimbCastProtection() { PlayMakerFSM val = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Control"); if (!((Object)(object)val == (Object)null)) { CreateClimbCastPrepareState(); val.Fsm.InitData(); Log.Info("爬升Cast保护初始化完成"); } } private void CreateClimbCastPrepareState() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_008d: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown PlayMakerFSM val = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Control"); if ((Object)(object)val == (Object)null) { return; } if (FsmStateBuilder.StateExists(val, "Climb Cast Prepare")) { Log.Info("Climb Cast Prepare状态已存在,跳过创建"); return; } FsmState val2 = FsmStateBuilder.CreateAndAddState(val, "Climb Cast Prepare", "爬升Cast动画保护状态(长Wait时间)"); List list = new List(); FsmBool boolVariable = EnsureBoolVariable(val, "Climb Cast Pending"); list.Add((FsmStateAction)new SetBoolValue { boolVariable = boolVariable, boolValue = new FsmBool(FsmBool.op_Implicit(false)) }); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(2.5f)), finishEvent = FsmEvent.Finished, realTime = false }); val2.Actions = list.ToArray(); FsmState val3 = FsmStateBuilder.FindState(val, "Idle"); if (val3 != null) { FsmStateBuilder.SetFinishedTransition(val2, val3); } Log.Info("创建Climb Cast Prepare状态完成"); } private void SetupControlIdlePendingTransitions() { //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Expected O, but got Unknown //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Expected O, but got Unknown //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Expected O, but got Unknown //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Expected O, but got Unknown //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Expected O, but got Unknown //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Expected O, but got Unknown //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Expected O, but got Unknown if ((Object)(object)_bossControlFsm == (Object)null) { Log.Warn("_bossControlFsm未初始化,无法配置Idle布尔检测"); return; } FsmState val = ((IEnumerable)_bossControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Idle")); if (val == null) { Log.Warn("未找到Idle状态,无法配置布尔检测"); return; } FsmState val2 = ((IEnumerable)_bossControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Climb Cast Prepare")); FsmState val3 = ((IEnumerable)_bossControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Dash Antic 0")); FsmState val4 = ((IEnumerable)_bossControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Dash Antic Special")); FsmBool climbPendingVar = EnsureBoolVariable(_bossControlFsm, "Climb Cast Pending"); FsmBool dashPendingVar = EnsureBoolVariable(_bossControlFsm, "Silk Ball Dash Pending"); FsmBool val5 = EnsureBoolVariable(_bossControlFsm, "Special Attack"); List list = val.Actions?.ToList() ?? new List(); list.RemoveAll(delegate(FsmStateAction action) { BoolTest val7 = (BoolTest)(object)((action is BoolTest) ? action : null); return val7 != null && (val7.boolVariable == climbPendingVar || val7.boolVariable == dashPendingVar); }); FsmEvent climbBridgeEvent = FsmEvent.GetFsmEvent("CLIMB CAST BRIDGE"); FsmEvent dashBridgeEvent = FsmEvent.GetFsmEvent("SILK BALL DASH BRIDGE"); FsmEvent dashSpecialBridgeEvent = FsmEvent.GetFsmEvent("SILK BALL DASH SPECIAL BRIDGE"); if (val4 != null && val3 != null) { CallMethod val6 = new CallMethod(); val6.behaviour = new FsmObject { Value = (Object)(object)this }; val6.methodName = new FsmString("CheckAndTriggerDashPath") { Value = "CheckAndTriggerDashPath" }; val6.parameters = (FsmVar[])(object)new FsmVar[0]; val6.everyFrame = true; list.Insert(2, (FsmStateAction)(object)val6); } else if (val3 != null) { list.Insert(2, (FsmStateAction)new BoolTest { boolVariable = dashPendingVar, isTrue = dashBridgeEvent, isFalse = FsmEvent.GetFsmEvent("NULL"), everyFrame = true }); } if (val2 != null) { list.Insert(2, (FsmStateAction)new BoolTest { boolVariable = climbPendingVar, isTrue = climbBridgeEvent, isFalse = FsmEvent.GetFsmEvent("NULL"), everyFrame = true }); } val.Actions = list.ToArray(); List list2 = val.Transitions?.ToList() ?? new List(); list2.RemoveAll((FsmTransition t) => t.FsmEvent == climbBridgeEvent || t.FsmEvent == dashBridgeEvent || t.FsmEvent == dashSpecialBridgeEvent); if (val2 != null) { list2.Add(new FsmTransition { FsmEvent = climbBridgeEvent, toState = val2.Name, toFsmState = val2 }); } if (val4 != null && val3 != null) { list2.Add(new FsmTransition { FsmEvent = dashSpecialBridgeEvent, toState = val3.Name, toFsmState = val3 }); } if (val3 != null) { list2.Add(new FsmTransition { FsmEvent = dashBridgeEvent, toState = val3.Name, toFsmState = val3 }); } val.Transitions = list2.ToArray(); Log.Info("Idle状态布尔检测配置完成"); } private FsmBool EnsureBoolVariable(PlayMakerFSM targetFsm, string variableName) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown string variableName2 = variableName; List list = targetFsm.FsmVariables.BoolVariables.ToList(); FsmBool val = ((IEnumerable)list).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == variableName2)); if (val != null) { return val; } FsmBool val2 = new FsmBool(variableName2) { Value = false }; list.Add(val2); targetFsm.FsmVariables.BoolVariables = list.ToArray(); targetFsm.FsmVariables.Init(); Log.Info("创建Control FSM Bool变量: " + variableName2); return val2; } public void DisableBossCollider() { if ((Object)(object)_bossCollider2D == (Object)null) { _bossCollider2D = ((Component)this).GetComponent(); } if ((Object)(object)_bossCollider2D != (Object)null) { _collider2DWasEnabled = ((Behaviour)_bossCollider2D).enabled; ((Behaviour)_bossCollider2D).enabled = false; Log.Info("已禁用Boss Collider2D(爬升漫游阶段)"); } else { Log.Warn("未找到Boss Collider2D组件"); } } public void EnableBossCollider() { if ((Object)(object)_bossCollider2D != (Object)null) { ((Behaviour)_bossCollider2D).enabled = _collider2DWasEnabled; Log.Info("已恢复Boss Collider2D"); } } private void ModifyBossControlFSM() { if ((Object)(object)_bossControlFsm == (Object)null) { Log.Error("BossControl FSM未初始化,无法修改"); return; } Log.Info("修改Boss Control FSM"); CreateSilkBallDashStates(); CreateBigSilkBallLockState(); CreateClimbRoamStates(); AddGlobalEventListeners(); AddStunInterruptHandling(); InitializeClimbCastProtection(); SetupControlIdlePendingTransitions(); FsmStateBuilder.ReinitializeFsmVariables(_bossControlFsm); Log.Info("Boss Control FSM修改完成"); } private void CreateSilkBallDashStates() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Expected O, but got Unknown //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Expected O, but got Unknown if (!((Object)(object)_bossControlFsm == (Object)null)) { Log.Info("=== 开始创建移动丝球攻击状态链 ==="); CreateInvisibleTargetPoints(); RoutePoint0X = new FsmFloat("Route Point 0 X") { Value = 0f }; RoutePoint0Y = new FsmFloat("Route Point 0 Y") { Value = 0f }; RoutePoint1X = new FsmFloat("Route Point 1 X") { Value = 0f }; RoutePoint1Y = new FsmFloat("Route Point 1 Y") { Value = 0f }; RoutePoint2X = new FsmFloat("Route Point 2 X") { Value = 0f }; RoutePoint2Y = new FsmFloat("Route Point 2 Y") { Value = 0f }; RoutePointSpecialX = new FsmFloat("Route Point Special X") { Value = 0f }; RoutePointSpecialY = new FsmFloat("Route Point Special Y") { Value = 0f }; IdleWaitTime = new FsmFloat("Idle Wait Time") { Value = 0.6f }; _fsmTargetPoint0 = new FsmGameObject("Target Point 0") { Value = _targetPoint0 }; _fsmTargetPoint1 = new FsmGameObject("Target Point 1") { Value = _targetPoint1 }; _fsmTargetPoint2 = new FsmGameObject("Target Point 2") { Value = _targetPoint2 }; _fsmTargetPointSpecial = new FsmGameObject("Target Point Special") { Value = _targetPointSpecial }; List list = _bossControlFsm.FsmVariables.FloatVariables.ToList(); list.Add(RoutePoint0X); list.Add(RoutePoint0Y); list.Add(RoutePoint1X); list.Add(RoutePoint1Y); list.Add(RoutePoint2X); list.Add(RoutePoint2Y); list.Add(RoutePointSpecialX); list.Add(RoutePointSpecialY); list.Add(IdleWaitTime); _bossControlFsm.FsmVariables.FloatVariables = list.ToArray(); List list2 = _bossControlFsm.FsmVariables.GameObjectVariables.ToList(); list2.Add(_fsmTargetPoint0); list2.Add(_fsmTargetPoint1); list2.Add(_fsmTargetPoint2); list2.Add(_fsmTargetPointSpecial); _bossControlFsm.FsmVariables.GameObjectVariables = list2.ToArray(); EnsureBoolVariable(_bossControlFsm, "Special Attack"); Log.Info("Route Point变量(包括Special)、时间变量、目标点GameObject变量和Special Attack变量已创建"); FsmState val = CreateDashAnticState(-1); FsmState val2 = CreateDashToPointState(-1); FsmState val3 = CreateIdleAtPointState(-1); FsmState val4 = CreateDashAnticState(0); FsmState val5 = CreateDashToPointState(0); FsmState val6 = CreateIdleAtPointState(0); FsmState val7 = CreateDashSpecialCheckState(); FsmState val8 = CreateDashAnticState(1); FsmState val9 = CreateDashToPointState(1); FsmState val10 = CreateIdleAtPointState(1); FsmState val11 = CreateDashAnticState(2); FsmState val12 = CreateDashToPointState(2); FsmState val13 = CreateSilkBallDashEndState(); FsmStateBuilder.AddStatesToFsm(_bossControlFsm, val, val2, val3, val4, val5, val6, val7, val8, val9, val10, val11, val12, val13); SetupSilkBallDashTransitions(val, val2, val3, val4, val5, val6, val7, val8, val9, val10, val11, val12, val13); Log.Info("移动丝球状态链创建完成"); } } private void SetupSilkBallDashTransitions(FsmState dashAnticSpecial, FsmState dashToSpecial, FsmState idleAtSpecial, FsmState dashAntic0, FsmState dashToPoint0, FsmState idleAtPoint0, FsmState dashSpecialCheck, FsmState dashAntic1, FsmState dashToPoint1, FsmState idleAtPoint1, FsmState dashAntic2, FsmState dashToPoint2, FsmState dashEnd) { FsmStateBuilder.SetFinishedTransition(dashAnticSpecial, dashToSpecial); FsmStateBuilder.SetFinishedTransition(dashToSpecial, idleAtSpecial); FsmStateBuilder.SetFinishedTransition(idleAtSpecial, dashAntic1); FsmStateBuilder.SetFinishedTransition(dashAntic0, dashToPoint0); FsmStateBuilder.SetFinishedTransition(dashToPoint0, idleAtPoint0); FsmStateBuilder.SetFinishedTransition(idleAtPoint0, dashSpecialCheck); FsmEvent fsmEvent = FsmEvent.GetFsmEvent("DASH SPECIAL"); dashSpecialCheck.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(fsmEvent, dashAnticSpecial), FsmStateBuilder.CreateFinishedTransition(dashAntic1) }; FsmStateBuilder.SetFinishedTransition(dashAntic1, dashToPoint1); FsmStateBuilder.SetFinishedTransition(dashToPoint1, idleAtPoint1); FsmStateBuilder.SetFinishedTransition(idleAtPoint1, dashAntic2); FsmStateBuilder.SetFinishedTransition(dashAntic2, dashToPoint2); FsmStateBuilder.SetFinishedTransition(dashToPoint2, dashEnd); FsmState val = FsmStateBuilder.FindState(_bossControlFsm, "Idle"); if (val != null) { FsmStateBuilder.SetFinishedTransition(dashEnd, val); } Log.Info("移动丝球状态链转换设置完成(包括Special路径)"); } private FsmState CreateDashSpecialCheckState() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_bossControlFsm.Fsm, "Dash Special Check", "二阶段Dash Special插入判断"); FsmBool boolVariable = EnsureBoolVariable(_bossControlFsm, "Special Attack"); val.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)new BoolTest { boolVariable = boolVariable, isTrue = FsmEvent.GetFsmEvent("DASH SPECIAL"), isFalse = FsmEvent.Finished, everyFrame = false } }; return val; } private FsmState CreateDashAnticState(int pointIndex) { //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Expected O, but got Unknown //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Expected O, but got Unknown //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Expected O, but got Unknown //IL_01eb: Expected O, but got Unknown string name = ((pointIndex == -1) ? "Dash Antic Special" : $"Dash Antic {pointIndex}"); string description = ((pointIndex == -1) ? "准备冲刺到Special点位" : $"准备冲刺到点位 {pointIndex}"); FsmState val = FsmStateBuilder.CreateState(_bossControlFsm.Fsm, name, description); List list = new List(); FsmGameObject val2 = null; switch (pointIndex) { case -1: val2 = _fsmTargetPointSpecial; break; case 0: val2 = _fsmTargetPoint0; break; case 1: val2 = _fsmTargetPoint1; break; case 2: val2 = _fsmTargetPoint2; break; } if (val2 == null) { Log.Error($"CreateDashAnticState: Target object for point {pointIndex} is null."); return val; } list.Add((FsmStateAction)new FaceObjectV2 { objectA = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, objectB = val2, spriteFacesRight = FsmBool.op_Implicit(false), playNewAnimation = false, resetFrame = false, pauseBetweenTurns = 0f, everyFrame = false }); list.Add((FsmStateAction)new Tk2dPlayAnimationWithEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Dash Antic") { Value = "Dash Antic" }, animationCompleteEvent = null }); float num = ((pointIndex == 0) ? 0.6f : 0.3f); list.Add((FsmStateAction)new Wait { time = FsmFloat.op_Implicit(num), finishEvent = FsmEvent.Finished, realTime = false }); if (pointIndex == 0 && (Object)(object)_bossControlFsm != (Object)null) { FsmBool boolVariable = EnsureBoolVariable(_bossControlFsm, "Silk Ball Dash Pending"); list.Insert(0, (FsmStateAction)new SetBoolValue { boolVariable = boolVariable, boolValue = new FsmBool(FsmBool.op_Implicit(false)) }); } val.Actions = list.ToArray(); return val; } private void CreateBigSilkBallLockState() { if (!((Object)(object)_bossControlFsm == (Object)null)) { Log.Info("创建大丝球大招锁定状态"); FsmState val = FsmStateBuilder.CreateAndAddState(_bossControlFsm, "Big Silk Ball Lock", "大丝球大招期间锁定BOSS,只播放Idle动画"); val.Actions = Array.Empty(); FsmState val2 = FsmStateBuilder.FindState(_bossControlFsm, "Idle"); if (val2 != null) { val.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("BIG SILK BALL UNLOCK"), val2) }; } Log.Info("大丝球大招锁定状态创建完成"); } } private void AddGlobalEventListeners() { if ((Object)(object)_bossControlFsm == (Object)null) { return; } FsmState val = FsmStateBuilder.FindState(_bossControlFsm, "Idle"); if (val == null) { Log.Error("未找到Idle状态,跳过添加FORCE IDLE全局监听"); return; } FsmState val2 = FsmStateBuilder.FindState(_bossControlFsm, "Big Silk Ball Lock"); if (val2 == null) { Log.Warn("未找到Big Silk Ball Lock状态,跳过添加BIG SILK BALL LOCK全局监听"); } List list = _bossControlFsm.FsmGlobalTransitions.ToList(); list.Add(FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("FORCE IDLE"), val)); if (val2 != null) { list.Add(FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("BIG SILK BALL LOCK"), val2)); } _bossControlFsm.Fsm.GlobalTransitions = list.ToArray(); } private FsmState CreateDashToPointState(int pointIndex) { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_00de: Expected O, but got Unknown //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Expected O, but got Unknown //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Expected O, but got Unknown //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Expected O, but got Unknown //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Expected O, but got Unknown //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Expected O, but got Unknown //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Expected O, but got Unknown //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Expected O, but got Unknown //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Expected O, but got Unknown //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Expected O, but got Unknown //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Expected O, but got Unknown //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Expected O, but got Unknown //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Expected O, but got Unknown //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Expected O, but got Unknown //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Expected O, but got Unknown //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Expected O, but got Unknown //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Expected O, but got Unknown string name = ((pointIndex == -1) ? "Dash To Special" : $"Dash To Point {pointIndex}"); string description = ((pointIndex == -1) ? "冲刺到Special点位" : $"冲刺到点位 {pointIndex}"); FsmState val = FsmStateBuilder.CreateState(_bossControlFsm.Fsm, name, description); List list = new List(); FsmFloat val2 = null; FsmFloat val3 = null; switch (pointIndex) { case -1: val2 = RoutePointSpecialX; val3 = RoutePointSpecialY; break; case 0: val2 = RoutePoint0X; val3 = RoutePoint0Y; list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 } }, sendEvent = new FsmString("STUN CONTROL STOP") { Value = "STUN CONTROL STOP" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); break; case 1: val2 = RoutePoint1X; val3 = RoutePoint1Y; break; case 2: val2 = RoutePoint2X; val3 = RoutePoint2Y; break; } if (val2 == null || val3 == null) { Log.Error($"CreateDashToPointState: Route Point for point {pointIndex} is null"); return val; } list.Add((FsmStateAction)new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = FsmVector2.op_Implicit(new Vector2(0f, 0f)), x = new FsmFloat { UseVariable = false }, y = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new Tk2dPlayAnimationWithEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Dash") { Value = "Dash" }, animationTriggerEvent = null, animationCompleteEvent = FsmEvent.Finished }); list.Add((FsmStateAction)new AnimateXPositionTo { GameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, ToValue = val2, localSpace = false, time = new FsmFloat(FsmFloat.op_Implicit(4f)), speed = new FsmFloat(FsmFloat.op_Implicit(8f)), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), easeType = (EaseType)21, reverse = new FsmBool(FsmBool.op_Implicit(false)), realTime = false }); list.Add((FsmStateAction)new AnimateYPositionTo { GameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, ToValue = val3, localSpace = false, time = new FsmFloat(FsmFloat.op_Implicit(4f)), speed = new FsmFloat(FsmFloat.op_Implicit(8f)), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), easeType = (EaseType)21, reverse = new FsmBool(FsmBool.op_Implicit(false)), realTime = false }); val.Actions = list.ToArray(); Log.Info($"创建Dash To Point {pointIndex}状态(动态计算时间和动画速度)"); return val; } private FsmState CreateIdleAtPointState(int pointIndex) { //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_0137: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown string name = ((pointIndex == -1) ? "Idle At Special" : $"Idle At Point {pointIndex}"); string description = ((pointIndex == -1) ? "在Special点位等待" : $"在点位 {pointIndex} 等待"); FsmState val = FsmStateBuilder.CreateState(_bossControlFsm.Fsm, name, description); List list = new List(); if ((Object)(object)HeroController.instance != (Object)null) { list.Add((FsmStateAction)new FaceObjectV2 { objectA = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, objectB = FsmGameObject.op_Implicit(((Component)HeroController.instance).gameObject), spriteFacesRight = FsmBool.op_Implicit(false), playNewAnimation = false, newAnimationClip = new FsmString("") { Value = "" }, resetFrame = false, pauseBetweenTurns = 0f, everyFrame = false }); } list.Add((FsmStateAction)new Tk2dPlayAnimation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animLibName = new FsmString("") { Value = "" }, clipName = new FsmString("Idle") { Value = "Idle" } }); list.Add((FsmStateAction)new Wait { time = IdleWaitTime, finishEvent = FsmEvent.Finished, realTime = false }); val.Actions = list.ToArray(); Log.Info($"创建Idle At Point {pointIndex}状态(面向英雄+Idle动画+等待)"); return val; } private FsmState CreateSilkBallDashEndState() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_007a: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_00f4: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Expected O, but got Unknown //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Expected O, but got Unknown //IL_0188: Expected O, but got Unknown //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_bossControlFsm.Fsm, "Silk Ball Move End", "移动丝球结束,恢复硬直并通知AttackControl停止生成"); List list = new List(); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" } }, sendEvent = new FsmString("SILK BALL DASH END") { Value = "SILK BALL DASH END" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 } }, sendEvent = new FsmString("STUN CONTROL START") { Value = "STUN CONTROL START" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new Tk2dPlayAnimation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animLibName = new FsmString("") { Value = "" }, clipName = new FsmString("Idle") { Value = "Idle" } }); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.5f)), finishEvent = FsmEvent.Finished, realTime = false }); val.Actions = list.ToArray(); Log.Info("创建Silk Ball Dash End状态(优先通知AttackControl停止生成)"); return val; } private void CreateInvisibleTargetPoints() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) _targetPointSpecial = new GameObject("DashTargetPointSpecial"); _targetPointSpecial.transform.position = Vector3.zero; _targetPointSpecial.SetActive(true); _targetPoint0 = new GameObject("DashTargetPoint0"); _targetPoint0.transform.position = Vector3.zero; _targetPoint0.SetActive(true); _targetPoint1 = new GameObject("DashTargetPoint1"); _targetPoint1.transform.position = Vector3.zero; _targetPoint1.SetActive(true); _targetPoint2 = new GameObject("DashTargetPoint2"); _targetPoint2.transform.position = Vector3.zero; _targetPoint2.SetActive(true); Log.Info("已创建隐形目标点GameObject(包括Special)"); } public void UpdateTargetPointPositions(Vector3 point0, Vector3 point1, Vector3 point2, Vector3? pointSpecial = null) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) if (pointSpecial.HasValue && (Object)(object)_targetPointSpecial != (Object)null) { _targetPointSpecial.transform.position = pointSpecial.Value; } if ((Object)(object)_targetPoint0 != (Object)null) { _targetPoint0.transform.position = point0; } if ((Object)(object)_targetPoint1 != (Object)null) { _targetPoint1.transform.position = point1; } if ((Object)(object)_targetPoint2 != (Object)null) { _targetPoint2.transform.position = point2; } Log.Info($"已更新目标点位置: P0={point0}, P1={point1}, P2={point2}"); } } internal class FingerBladeBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__23 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FingerBladeBehavior <>4__this; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__23(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)<>4__this.controlFSM == (Object)null) { return false; } <>4__this.controlFSM.FsmVariables.Init(); <>4__this.controlFSM.Fsm.InitStates(); <>4__this.controlFSM.Fsm.InitData(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [Header("Finger Blade配置")] public int bladeIndex = -1; public string parentHandName = ""; public HandControlBehavior? parentHand; [Header("环绕参数")] public float orbitRadius = 7f; public float orbitSpeed = 200f; public float orbitOffset = 0f; private PlayMakerFSM? controlFSM; private PlayMakerFSM? tinkFSM; private Transform? playerTransform; private FsmFloat? _orbitRadiusVar; private FsmFloat? _orbitSpeedVar; private FsmFloat? _orbitOffsetVar; private FsmFloat? _trackTimeVar; private FsmBool? _specialAttackVar; private MeshRenderer? _meshRenderer; private FsmEvent? _orbitStartEvent; private FsmEvent? _shootEvent; public void Initialize(int index, string handName, HandControlBehavior hand) { int num = ((handName == "Hand L") ? index : (index + 3)); bladeIndex = num; parentHandName = handName; parentHand = hand; HeroController val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { playerTransform = val.transform; } InitializeFSMs(); } private void InitializeFSMs() { PlayMakerFSM[] components = ((Component)this).GetComponents(); PlayMakerFSM[] array = components; foreach (PlayMakerFSM val in array) { if (val.FsmName == "Control") { controlFSM = val; } else if (val.FsmName == "Tink") { tinkFSM = val; } } if ((Object)(object)controlFSM == (Object)null) { Log.Warn($"Finger Blade {bladeIndex} ({((Object)((Component)this).gameObject).name}) 未找到Control FSM"); } _meshRenderer = ((Component)this).GetComponent(); if ((Object)(object)_meshRenderer == (Object)null) { Log.Warn($"Finger Blade {bladeIndex} ({((Object)((Component)this).gameObject).name}) 未找到 MeshRenderer,无法控制显示层级"); } AddDynamicVariables(); AddCustomStompStates(); AddCustomSwipeStates(); ModifyAnticPullState(); ModifyAnticPauseState(); ModifyThunkState(); RelinkFingerBladeEventReferences(); } public void AddDynamicVariables() { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown if (!((Object)(object)controlFSM == (Object)null)) { List list = controlFSM.FsmVariables.FloatVariables.ToList(); _orbitRadiusVar = ((IEnumerable)list).FirstOrDefault((Func)((FsmFloat v) => ((NamedVariable)v).Name == "OrbitRadius")); _orbitSpeedVar = ((IEnumerable)list).FirstOrDefault((Func)((FsmFloat v) => ((NamedVariable)v).Name == "OrbitSpeed")); _orbitOffsetVar = ((IEnumerable)list).FirstOrDefault((Func)((FsmFloat v) => ((NamedVariable)v).Name == "OrbitOffset")); bool flag = false; if (_orbitRadiusVar == null) { _orbitRadiusVar = new FsmFloat("OrbitRadius") { Value = orbitRadius }; list.Add(_orbitRadiusVar); flag = true; } else { _orbitRadiusVar.Value = orbitRadius; } if (_orbitSpeedVar == null) { _orbitSpeedVar = new FsmFloat("OrbitSpeed") { Value = orbitSpeed }; list.Add(_orbitSpeedVar); flag = true; } else { _orbitSpeedVar.Value = orbitSpeed; } if (_orbitOffsetVar == null) { _orbitOffsetVar = new FsmFloat("OrbitOffset") { Value = orbitOffset }; list.Add(_orbitOffsetVar); flag = true; } else { _orbitOffsetVar.Value = orbitOffset; } if (flag) { controlFSM.FsmVariables.FloatVariables = list.ToArray(); } } } [Obsolete("此方法已废弃,请使用Hand中的SetFsmFloat直接设置FSM变量")] public void SetOrbitParameters(float radius, float speed, float offset) { Log.Warn($"Finger Blade {bladeIndex} SetOrbitParameters 已废弃,请使用SetFsmFloat"); } private void RegisterFingerBladeEvents() { if (!((Object)(object)controlFSM == (Object)null)) { _orbitStartEvent = FsmEvent.GetFsmEvent($"ORBIT START {parentHandName} Blade {bladeIndex}"); _shootEvent = FsmEvent.GetFsmEvent($"SHOOT {parentHandName} Blade {bladeIndex}"); List list = controlFSM.FsmEvents.ToList(); if (!list.Contains(_orbitStartEvent)) { list.Add(_orbitStartEvent); } if (!list.Contains(_shootEvent)) { list.Add(_shootEvent); } Type type = ((object)controlFSM.Fsm).GetType(); FieldInfo field = type.GetField("events", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { field.SetValue(controlFSM.Fsm, list.ToArray()); } else { Log.Error($"Finger Blade {bladeIndex} ({((Object)((Component)this).gameObject).name}) 未找到events字段"); } } } private void RelinkFingerBladeEventReferences() { ((MonoBehaviour)this).StartCoroutine(MyCoroutine()); } [IteratorStateMachine(typeof(d__23))] private IEnumerator MyCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__23(0) { <>4__this = this }; } public void AddOrbitGlobalTransition() { if ((Object)(object)controlFSM == (Object)null) { return; } RegisterFingerBladeEvents(); FsmState val = CreateOrbitStartState(); if (val == null) { Log.Error($"Finger Blade {bladeIndex} ({((Object)((Component)this).gameObject).name}) 创建Orbit Start状态失败"); return; } FsmState val2 = CreateOrbitPrepareState(); if (val2 == null) { Log.Error($"Finger Blade {bladeIndex} ({((Object)((Component)this).gameObject).name}) 创建Orbit Prepare状态失败"); return; } FsmState val3 = CreateOrbitShootState(); if (val3 == null) { Log.Error($"Finger Blade {bladeIndex} ({((Object)((Component)this).gameObject).name}) 创建Orbit Shoot状态失败"); return; } AddOrbitStartActions(val); AddOrbitPrepareActions(val2); AddOrbitShootActions(val3); if (_shootEvent != null) { val.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(_shootEvent, val2) }; } FsmStateBuilder.SetFinishedTransition(val2, val3); FsmState val4 = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Shoot")); if (val4 != null) { FsmStateBuilder.SetFinishedTransition(val3, val4); } FsmTransition item = FsmStateBuilder.CreateTransition(_orbitStartEvent, val); List list = controlFSM.fsm.globalTransitions.ToList(); list.Add(item); controlFSM.fsm.globalTransitions = list.ToArray(); } private FsmState? CreateOrbitStartState() { if ((Object)(object)controlFSM == (Object)null) { return null; } FsmState val = FsmStateBuilder.CreateState(controlFSM.Fsm, "Orbit Start", $"Finger Blade {bladeIndex} 环绕开始状态"); FsmStateBuilder.AddStateToFsm(controlFSM, val); return val; } private FsmState? CreateOrbitPrepareState() { if ((Object)(object)controlFSM == (Object)null) { return null; } FsmState val = FsmStateBuilder.CreateState(controlFSM.Fsm, "Orbit Prepare", $"Finger Blade {bladeIndex} 环绕准备状态"); FsmStateBuilder.AddStateToFsm(controlFSM, val); return val; } private FsmState? CreateOrbitShootState() { if ((Object)(object)controlFSM == (Object)null) { return null; } FsmState val = FsmStateBuilder.CreateState(controlFSM.Fsm, "Orbit Shoot", $"Finger Blade {bladeIndex} 环绕发射状态"); FsmStateBuilder.AddStateToFsm(controlFSM, val); return val; } private void AddOrbitStartActions(FsmState orbitStartState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Expected O, but got Unknown //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("UpdateRenderOrder") { Value = "UpdateRenderOrder" }; val.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar(typeof(bool)) { boolValue = true } }; val.everyFrame = false; CallMethod val2 = val; OrbitAroundTargetAction orbitAroundTargetAction = new OrbitAroundTargetAction { orbitRadius = (_orbitRadiusVar ?? controlFSM.FsmVariables.GetFsmFloat("OrbitRadius")), orbitSpeed = (_orbitSpeedVar ?? controlFSM.FsmVariables.GetFsmFloat("OrbitSpeed")), orbitAngleOffset = (_orbitOffsetVar ?? controlFSM.FsmVariables.GetFsmFloat("OrbitOffset")), followTarget = FsmBool.op_Implicit(true), positionLerpSpeed = FsmFloat.op_Implicit(30f), rotateToFaceCenter = FsmBool.op_Implicit(true), pointOutward = FsmBool.op_Implicit(true), rotationOffset = FsmFloat.op_Implicit(0f), applyDirectionalRotationOffset = FsmBool.op_Implicit(true), directionalRotationOffset = FsmFloat.op_Implicit(8f), rotationLerpSpeed = FsmFloat.op_Implicit(30f), zeroVelocityOnEnter = FsmBool.op_Implicit(true), zeroVelocityOnExit = FsmBool.op_Implicit(true) }; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(19f)), finishEvent = _shootEvent }; orbitStartState.Actions = (FsmStateAction[])(object)new FsmStateAction[3] { (FsmStateAction)val2, orbitAroundTargetAction, (FsmStateAction)val3 }; } private void AddOrbitPrepareActions(FsmState orbitPrepareState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_0081: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown //IL_011c: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StopOrbitImmediately") { Value = "StopOrbitImmediately" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; CallMethod val2 = val; SetVelocity2d val3 = new SetVelocity2d { x = new FsmFloat(FsmFloat.op_Implicit(0f)), y = new FsmFloat(FsmFloat.op_Implicit(0f)) }; val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SetAttackParameters") { Value = "SetAttackParameters" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; CallMethod val4 = val; ActivateGameObject val5 = new ActivateGameObject(); FsmOwnerDefault val6 = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1 }; FsmGameObject val7 = new FsmGameObject(); Transform obj = ((Component)this).gameObject.transform.Find("silk_boss_finger_antic"); val7.Value = ((obj != null) ? ((Component)obj).gameObject : null); val6.gameObject = val7; val5.gameObject = val6; val5.activate = new FsmBool(FsmBool.op_Implicit(true)); val5.recursive = new FsmBool(FsmBool.op_Implicit(false)); val5.resetOnExit = true; ActivateGameObject val8 = val5; Wait val9 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.2f)), finishEvent = FsmEvent.Finished }; orbitPrepareState.Actions = (FsmStateAction[])(object)new FsmStateAction[5] { (FsmStateAction)val2, (FsmStateAction)val3, (FsmStateAction)val4, (FsmStateAction)val8, (FsmStateAction)val9 }; } private void AddOrbitShootActions(FsmState orbitShootState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_001c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_004c: Expected O, but got Unknown //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00ae: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_0113: Expected O, but got Unknown //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Expected O, but got Unknown SetGravity2dScale val = new SetGravity2dScale { gravityScale = new FsmFloat(FsmFloat.op_Implicit(0f)) }; SetVelocity2d val2 = new SetVelocity2d { x = new FsmFloat(FsmFloat.op_Implicit(0f)), y = new FsmFloat(FsmFloat.op_Implicit(0f)) }; FsmGameObject fsmGameObject = controlFSM.FsmVariables.GetFsmGameObject("Damager"); FsmGameObject fsmGameObject2 = controlFSM.FsmVariables.GetFsmGameObject("Phys Collider"); ActivateGameObjectDelay val3 = new ActivateGameObjectDelay { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((fsmGameObject != null) ? fsmGameObject.Value : null) } }, activate = new FsmBool(FsmBool.op_Implicit(true)), delay = new FsmFloat(FsmFloat.op_Implicit(0.1f)), resetOnExit = true }; ActivateGameObject val4 = new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((fsmGameObject2 != null) ? fsmGameObject2.Value : null) } }, activate = new FsmBool(FsmBool.op_Implicit(true)), recursive = new FsmBool(FsmBool.op_Implicit(false)), resetOnExit = true }; Wait val5 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished }; orbitShootState.Actions = (FsmStateAction[])(object)new FsmStateAction[5] { (FsmStateAction)val, (FsmStateAction)val2, (FsmStateAction)val3, (FsmStateAction)val4, (FsmStateAction)val5 }; } public void SetAttackParameters() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)controlFSM == (Object)null)) { Vector3 position = ((Component)this).transform.position; Vector3 val = (((Object)(object)playerTransform != (Object)null) ? playerTransform.position : Vector3.zero); Vector3 val2 = val - position; Vector3 normalized = ((Vector3)(ref val2)).normalized; float value = Mathf.Atan2(normalized.y, normalized.x) * 57.29578f - 3f; FsmFloat fsmFloat = controlFSM.FsmVariables.GetFsmFloat("Attack Rotation"); if (fsmFloat != null) { fsmFloat.Value = value; } else { Log.Warn("未找到Attack Rotation变量"); } FsmFloat fsmFloat2 = controlFSM.FsmVariables.GetFsmFloat("Attack Angle"); if (fsmFloat2 != null) { fsmFloat2.Value = value; } else { Log.Warn("未找到Attack Angle变量"); } FsmFloat fsmFloat3 = controlFSM.FsmVariables.GetFsmFloat("Attack Y Scale"); if (fsmFloat3 != null) { fsmFloat3.Value = 1f; } else { Log.Warn("未找到Attack Y Scale变量"); } FsmFloat fsmFloat4 = controlFSM.FsmVariables.GetFsmFloat("Travel Time Multiplier"); if (fsmFloat4 != null) { fsmFloat4.Value = 0.02f; } else { Log.Warn("未找到Travel Time Multiplier变量"); } FsmFloat fsmFloat5 = controlFSM.FsmVariables.GetFsmFloat("Wait Min"); if (fsmFloat5 != null) { fsmFloat5.Value = 0f; } else { Log.Warn("未找到Wait Min变量"); } FsmFloat fsmFloat6 = controlFSM.FsmVariables.GetFsmFloat("Wait Max"); if (fsmFloat6 != null) { fsmFloat6.Value = 0f; } else { Log.Warn("未找到Wait Max变量"); } FsmBool fsmBool = controlFSM.FsmVariables.GetFsmBool("Quick Recover"); if (fsmBool != null) { fsmBool.Value = false; } else { Log.Warn("未找到Quick Recover变量"); } FsmFloat fsmFloat7 = controlFSM.FsmVariables.GetFsmFloat("Thunk Time"); if (fsmFloat7 != null) { fsmFloat7.Value = Random.Range(0.75f, 0.9f); } else { Log.Warn("未找到Thunk Time变量"); } FsmBool fsmBool2 = controlFSM.FsmVariables.GetFsmBool("Ready"); if (fsmBool2 != null) { fsmBool2.Value = false; } else { Log.Warn("未找到Ready变量"); } } } public void AddCustomStompStates() { if (!((Object)(object)controlFSM == (Object)null)) { CreateStompState("CUSTOM_STOMP_CENTER", "Custom Stomp Center Prepare", 90f, 1f, trackX: true, trackY: false); CreateStompState("CUSTOM_STOMP_LEFT", "Custom Stomp Left Prepare", 120f, 1f, trackX: false, trackY: false); CreateStompState("CUSTOM_STOMP_RIGHT", "Custom Stomp Right Prepare", 60f, 1f, trackX: false, trackY: false); } } private void CreateStompState(string eventName, string paramsStateName, float rotation, float yScale, bool trackX, bool trackY) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Expected O, but got Unknown //IL_014f: Expected O, but got Unknown //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Expected O, but got Unknown //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Expected O, but got Unknown //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Expected O, but got Unknown //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Expected O, but got Unknown //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Expected O, but got Unknown //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Expected O, but got Unknown //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Expected O, but got Unknown //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Expected O, but got Unknown //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Expected O, but got Unknown //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Expected O, but got Unknown //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Expected O, but got Unknown if (!((Object)(object)controlFSM == (Object)null)) { FsmEvent fsmEvent = FsmEvent.GetFsmEvent(eventName); List list = controlFSM.Fsm.Events.ToList(); if (!list.Contains(fsmEvent)) { list.Add(fsmEvent); controlFSM.Fsm.Events = list.ToArray(); } FsmState val = FsmStateBuilder.CreateState(controlFSM.Fsm, paramsStateName); List list2 = new List(); FsmFloat fsmFloat = controlFSM.FsmVariables.GetFsmFloat("Attack Rotation"); SetFloatValue item = new SetFloatValue { floatVariable = fsmFloat, floatValue = new FsmFloat(FsmFloat.op_Implicit(rotation)), everyFrame = false }; list2.Add((FsmStateAction)(object)item); FsmFloat fsmFloat2 = controlFSM.FsmVariables.GetFsmFloat("Ground Y"); FsmFloat fsmFloat3 = controlFSM.FsmVariables.GetFsmFloat("Attack Y"); SetFloatValue item2 = new SetFloatValue { floatVariable = fsmFloat3, floatValue = fsmFloat2, everyFrame = false }; FloatAddRandom item3 = new FloatAddRandom { floatVariable = fsmFloat3, addMin = new FsmFloat(FsmFloat.op_Implicit(11f)), addMax = new FsmFloat(FsmFloat.op_Implicit(12f)) }; list2.Add((FsmStateAction)(object)item2); list2.Add((FsmStateAction)(object)item3); FsmFloat fsmFloat4 = controlFSM.FsmVariables.GetFsmFloat("Attack Y Scale"); SetFloatValue item4 = new SetFloatValue { floatVariable = fsmFloat4, floatValue = new FsmFloat(FsmFloat.op_Implicit(yScale)), everyFrame = false }; list2.Add((FsmStateAction)(object)item4); FsmFloat fsmFloat5 = controlFSM.FsmVariables.GetFsmFloat("Wait Min"); FsmFloat fsmFloat6 = controlFSM.FsmVariables.GetFsmFloat("Wait Max"); SetFloatValue item5 = new SetFloatValue { floatVariable = fsmFloat5, floatValue = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }; SetFloatValue item6 = new SetFloatValue { floatVariable = fsmFloat6, floatValue = new FsmFloat(FsmFloat.op_Implicit(0.2f)), everyFrame = false }; list2.Add((FsmStateAction)(object)item5); list2.Add((FsmStateAction)(object)item6); FsmBool fsmBool = controlFSM.FsmVariables.GetFsmBool("Quick Recover"); SetBoolValue item7 = new SetBoolValue { boolVariable = fsmBool, boolValue = new FsmBool(FsmBool.op_Implicit(false)), everyFrame = false }; list2.Add((FsmStateAction)(object)item7); FsmFloat fsmFloat7 = controlFSM.FsmVariables.GetFsmFloat("X Target Min"); FsmFloat fsmFloat8 = controlFSM.FsmVariables.GetFsmFloat("X Target Max"); SetFloatValue item8 = new SetFloatValue { floatVariable = fsmFloat7, floatValue = new FsmFloat(FsmFloat.op_Implicit(20f)), everyFrame = false }; SetFloatValue item9 = new SetFloatValue { floatVariable = fsmFloat8, floatValue = new FsmFloat(FsmFloat.op_Implicit(57f)), everyFrame = false }; list2.Add((FsmStateAction)(object)item8); list2.Add((FsmStateAction)(object)item9); val.Actions = list2.ToArray(); FsmState val2 = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Attack Start Pause")); if (val2 != null) { FsmStateBuilder.SetFinishedTransition(val, val2); } FsmStateBuilder.AddStateToFsm(controlFSM, val); List list3 = controlFSM.FsmGlobalTransitions.ToList(); list3.Add(FsmStateBuilder.CreateTransition(fsmEvent, val)); controlFSM.Fsm.GlobalTransitions = list3.ToArray(); } } public void AddCustomSwipeStates() { if (!((Object)(object)controlFSM == (Object)null)) { CreateSwipeState("CUSTOM_SWIPE_L", "Custom Swipe L Prepare", 0f, -1f, 23f, 55f); CreateSwipeState("CUSTOM_SWIPE_R", "Custom Swipe R Prepare", 180f, 1f, 23f, 55f); } } private void CreateSwipeState(string eventName, string paramsStateName, float rotation, float yScale, float xMin, float xMax) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Expected O, but got Unknown //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Expected O, but got Unknown //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Expected O, but got Unknown //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Expected O, but got Unknown //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Expected O, but got Unknown //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Expected O, but got Unknown //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Expected O, but got Unknown //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Expected O, but got Unknown //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Expected O, but got Unknown //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Expected O, but got Unknown if (!((Object)(object)controlFSM == (Object)null)) { FsmEvent fsmEvent = FsmEvent.GetFsmEvent(eventName); List list = controlFSM.Fsm.Events.ToList(); if (!list.Contains(fsmEvent)) { list.Add(fsmEvent); controlFSM.Fsm.Events = list.ToArray(); } FsmState val = FsmStateBuilder.CreateState(controlFSM.Fsm, paramsStateName); List list2 = new List(); FsmFloat fsmFloat = controlFSM.FsmVariables.GetFsmFloat("Attack Rotation"); SetFloatValue item = new SetFloatValue { floatVariable = fsmFloat, floatValue = new FsmFloat(FsmFloat.op_Implicit(rotation)), everyFrame = false }; list2.Add((FsmStateAction)(object)item); FsmFloat fsmFloat2 = controlFSM.FsmVariables.GetFsmFloat("Attack Y Scale"); SetFloatValue item2 = new SetFloatValue { floatVariable = fsmFloat2, floatValue = new FsmFloat(FsmFloat.op_Implicit(yScale)), everyFrame = false }; list2.Add((FsmStateAction)(object)item2); FsmFloat fsmFloat3 = controlFSM.FsmVariables.GetFsmFloat("Wait Min"); FsmFloat fsmFloat4 = controlFSM.FsmVariables.GetFsmFloat("Wait Max"); SetFloatValue item3 = new SetFloatValue { floatVariable = fsmFloat3, floatValue = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }; SetFloatValue item4 = new SetFloatValue { floatVariable = fsmFloat4, floatValue = new FsmFloat(FsmFloat.op_Implicit(0.2f)), everyFrame = false }; list2.Add((FsmStateAction)(object)item3); list2.Add((FsmStateAction)(object)item4); FsmBool fsmBool = controlFSM.FsmVariables.GetFsmBool("Quick Recover"); SetBoolValue item5 = new SetBoolValue { boolVariable = fsmBool, boolValue = new FsmBool(FsmBool.op_Implicit(false)), everyFrame = false }; list2.Add((FsmStateAction)(object)item5); FsmFloat fsmFloat5 = controlFSM.FsmVariables.GetFsmFloat("X Target Min"); FsmFloat fsmFloat6 = controlFSM.FsmVariables.GetFsmFloat("X Target Max"); SetFloatValue item6 = new SetFloatValue { floatVariable = fsmFloat5, floatValue = new FsmFloat(FsmFloat.op_Implicit(xMin)), everyFrame = false }; SetFloatValue item7 = new SetFloatValue { floatVariable = fsmFloat6, floatValue = new FsmFloat(FsmFloat.op_Implicit(xMax)), everyFrame = false }; list2.Add((FsmStateAction)(object)item6); list2.Add((FsmStateAction)(object)item7); val.Actions = list2.ToArray(); FsmState val2 = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Attack Start Pause")); if (val2 != null) { val.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.Finished, toState = "Attack Start Pause", toFsmState = val2 } }; } List list3 = controlFSM.FsmStates.ToList(); list3.Add(val); controlFSM.Fsm.States = list3.ToArray(); List list4 = controlFSM.FsmGlobalTransitions.ToList(); list4.Add(new FsmTransition { FsmEvent = fsmEvent, toState = paramsStateName, toFsmState = val }); controlFSM.Fsm.GlobalTransitions = list4.ToArray(); } } public void StopOrbitImmediately() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)this).gameObject != (Object)null) { Rigidbody2D component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.linearVelocity = Vector2.zero; component.angularVelocity = 0f; } } } public void CheckAndSendPhase2SwipeEvent() { if ((Object)(object)controlFSM == (Object)null) { return; } FsmFloat fsmFloat = controlFSM.FsmVariables.GetFsmFloat("Attack Rotation"); FsmBool fsmBool = controlFSM.FsmVariables.GetFsmBool("Special Attack"); if (fsmFloat != null && fsmBool != null) { float value = fsmFloat.Value; bool value2 = fsmBool.Value; bool flag = Mathf.Abs(value) < 2f || Mathf.Abs(value - 180f) < 2f; if (flag && value2) { controlFSM.SendEvent("IS_PHASE2_SWIPE"); } } } private void ModifyThunkState() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown if (!((Object)(object)controlFSM == (Object)null)) { FsmState val = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Thunk")); if (val == null) { Log.Warn($"Finger Blade {bladeIndex} 未找到 Thunk 状态"); return; } CallMethod val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("UpdateRenderOrder") { Value = "UpdateRenderOrder" }; val2.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar(typeof(bool)) { boolValue = false } }; val2.everyFrame = false; CallMethod item = val2; List list = val.Actions.ToList(); list.Insert(0, (FsmStateAction)(object)item); val.Actions = list.ToArray(); } } private void ModifyAnticPullState() { //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown if ((Object)(object)controlFSM == (Object)null) { return; } FsmState val = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Antic Pull")); if (val == null) { Log.Warn($"Finger Blade {bladeIndex} 未找到 Antic Pull 状态"); return; } List list = val.Actions.ToList(); int num = 0; int num2 = 0; for (int i = 0; i < list.Count; i++) { FsmStateAction obj = list[i]; Wait val2 = (Wait)(object)((obj is Wait) ? obj : null); if (val2 != null) { num++; if (num == 1) { val2.time = new FsmFloat(FsmFloat.op_Implicit(0.48f)); } continue; } FsmStateAction obj2 = list[i]; WaitBool val3 = (WaitBool)(object)((obj2 is WaitBool) ? obj2 : null); if (val3 != null) { num2++; if (num2 == 1) { val3.time = new FsmFloat(FsmFloat.op_Implicit(0.36f)); } } } list.Insert(0, (FsmStateAction)new WaitBool { boolTest = controlFSM.FsmVariables.GetFsmBool("Special Attack"), time = new FsmFloat(FsmFloat.op_Implicit(0.25f)), finishEvent = FsmEvent.Finished, realTime = false }); val.Actions = list.ToArray(); } private void ModifyAnticPauseState() { //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown if ((Object)(object)controlFSM == (Object)null) { return; } FsmState val = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Antic Pause")); if (val == null) { Log.Warn($"Finger Blade {bladeIndex} 未找到 Antic Pause 状态"); return; } List list = controlFSM.FsmVariables.BoolVariables.ToList(); _specialAttackVar = ((IEnumerable)list).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == "Special Attack")); if (_specialAttackVar == null) { _specialAttackVar = new FsmBool("Special Attack") { Value = false }; list.Add(_specialAttackVar); controlFSM.FsmVariables.BoolVariables = list.ToArray(); } List list2 = controlFSM.FsmVariables.FloatVariables.ToList(); _trackTimeVar = ((IEnumerable)list2).FirstOrDefault((Func)((FsmFloat v) => ((NamedVariable)v).Name == "Track Time")); if (_trackTimeVar == null) { _trackTimeVar = new FsmFloat("Track Time") { Value = 1f }; list2.Add(_trackTimeVar); controlFSM.FsmVariables.FloatVariables = list2.ToArray(); } CreatePhase2TrackState(); } private void CreatePhase2TrackState() { //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Expected O, but got Unknown if (!((Object)(object)controlFSM == (Object)null)) { FsmState val = FsmStateBuilder.CreateState(controlFSM.Fsm, "Phase2 Track"); List list = new List(); SoftLockTrackAction item = new SoftLockTrackAction { followX = FsmBool.op_Implicit(false), followY = FsmBool.op_Implicit(true), followZ = FsmBool.op_Implicit(false), maintainInitialOffset = FsmBool.op_Implicit(true), positionLerpSpeed = FsmFloat.op_Implicit(3f), useRigidbody = FsmBool.op_Implicit(true), useMinY = FsmBool.op_Implicit(true), minY = FsmFloat.op_Implicit(132f), rotationZ = controlFSM.FsmVariables.GetFsmFloat("Attack Rotation"), rotationLerpSpeed = FsmFloat.op_Implicit(20f), zeroVelocityOnEnter = FsmBool.op_Implicit(true), zeroVelocityOnExit = FsmBool.op_Implicit(true) }; list.Add((FsmStateAction)(object)item); Wait item2 = new Wait { time = _trackTimeVar, finishEvent = FsmEvent.Finished }; list.Add((FsmStateAction)(object)item2); val.Actions = list.ToArray(); FsmState val2 = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Antic Pull")); if (val2 != null) { val.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.Finished, toState = "Antic Pull", toFsmState = val2 } }; } List list2 = controlFSM.Fsm.States.ToList(); list2.Add(val); controlFSM.Fsm.States = list2.ToArray(); FsmStateAction[] actions = val.Actions; foreach (FsmStateAction val3 in actions) { val3.Init(val); } ModifyAnticPauseTransitions(val); } } private void ModifyAnticPauseTransitions(FsmState trackState) { //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Expected O, but got Unknown //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Expected O, but got Unknown if ((Object)(object)controlFSM == (Object)null) { return; } FsmState val = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Antic Pause")); if (val != null) { List list = val.Actions.ToList(); FsmFloat fsmFloat = controlFSM.FsmVariables.GetFsmFloat("Attack Rotation"); FsmBool specialAttackVar = _specialAttackVar; List list2 = controlFSM.FsmVariables.BoolVariables.ToList(); FsmBool val2 = ((IEnumerable)list2).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == "Is Swipe")); if (val2 == null) { val2 = new FsmBool("Is Swipe") { Value = false }; list2.Add(val2); controlFSM.FsmVariables.BoolVariables = list2.ToArray(); } List list3 = controlFSM.Fsm.Events.ToList(); FsmEvent fsmEvent = FsmEvent.GetFsmEvent("IS_PHASE2_SWIPE"); if (!list3.Contains(fsmEvent)) { list3.Add(fsmEvent); } controlFSM.Fsm.Events = list3.ToArray(); CallMethod val3 = new CallMethod(); val3.behaviour = FsmObject.op_Implicit((Object)(object)this); val3.methodName = FsmString.op_Implicit("CheckAndSendPhase2SwipeEvent"); val3.parameters = (FsmVar[])(object)new FsmVar[0]; val3.everyFrame = false; CallMethod item = val3; list.Add((FsmStateAction)(object)item); val.Actions = list.ToArray(); List list4 = val.Transitions.ToList(); list4.Add(new FsmTransition { FsmEvent = fsmEvent, toState = "Phase2 Track", toFsmState = trackState }); val.Transitions = list4.ToArray(); } } public void UpdateRenderOrder(bool toFront) { if (!((Object)(object)_meshRenderer == (Object)null)) { if (toFront) { ((Renderer)_meshRenderer).sortingOrder = 10; } else { ((Renderer)_meshRenderer).sortingOrder = 0; } } } } internal class HandControlBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__10 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public HandControlBehavior <>4__this; private HeroController 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.handName = ((Object)((Component)<>4__this).gameObject).name; Log.Info("初始化手部: " + <>4__this.handName); 5__1 = Object.FindFirstObjectByType(); if ((Object)(object)5__1 != (Object)null) { <>4__this.playerTransform = 5__1.transform; } else { Log.Error(<>4__this.handName + " 未找到玩家Transform"); } <>4__this.handFSM = ((Component)<>4__this).GetComponent(); if (!((Object)(object)<>4__this.handFSM != (Object)null)) { Log.Warn(<>4__this.handName + " 未找到FSM"); } <>4__this.InitializeFingerBlades(); <>4__this.AddOrbitAttackState(); <>4__this.ModifyStompState_New(); <>4__this.ModifySwipeStates_New(); <>4__this.ModifyOriginalSwipeStates(); <>4__this.handFSM.FsmVariables.Init(); <>4__this.handFSM.Fsm.InitData(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__27 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public HandControlBehavior <>4__this; private int 5__1; private PlayMakerFSM 5__2; private int 5__3; private string 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__27(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; 5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; goto IL_0062; } <>1__state = -1; 5__1 = 0; goto IL_0186; IL_0062: if ((Object)(object)<>4__this.fingerBladeBehaviors[5__1] != (Object)null) { 5__2 = ((IEnumerable)((Component)<>4__this.fingerBladeBehaviors[5__1]).GetComponents()).FirstOrDefault((Func)((PlayMakerFSM fsm) => fsm.FsmName == "Control")); if ((Object)(object)5__2 != (Object)null) { 5__3 = ((<>4__this.handName == "Hand L") ? 5__1 : (5__1 + 3)); 5__4 = $"SHOOT {<>4__this.handName} Blade {5__3}"; 5__2.SendEvent(5__4); 5__4 = null; } else { Log.Warn($"{<>4__this.handName} -> Finger Blade {5__1} 未找到Control FSM"); } 5__2 = null; } 5__1++; goto IL_0186; IL_0186: if (5__1 < <>4__this.fingerBladeBehaviors.Length) { if (5__1 > 0) { <>2__current = (object)new WaitForSeconds(<>4__this.bladeShootInterval); <>1__state = 1; return true; } goto IL_0062; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [Header("手部配置")] public string handName = ""; [Header("Finger Blade配置")] public Transform[] fingerBlades = (Transform[])(object)new Transform[3]; public FingerBladeBehavior[] fingerBladeBehaviors = new FingerBladeBehavior[3]; [Header("环绕攻击配置")] public float orbitRotationDirection = 1f; public float bladeShootInterval = 0.5f; private PlayMakerFSM? handFSM; private Transform? playerTransform; private FsmEvent? _orbitStartEvent; private FsmEvent? _shootEvent; private void Start() { ((MonoBehaviour)this).StartCoroutine(InitializeHand()); } [IteratorStateMachine(typeof(d__10))] private IEnumerator InitializeHand() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__10(0) { <>4__this = this }; } private void ModifyStompState_New() { //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Expected O, but got Unknown //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Expected O, but got Unknown //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Expected O, but got Unknown //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Expected O, but got Unknown if (!((Object)(object)handFSM == (Object)null)) { CreateStompState("Custom Hand Stomp Center", "CUSTOM_STOMP_CENTER", 90f, new float[3] { -6f, 0f, 6f }); CreateStompState("Custom Hand Stomp Left", "CUSTOM_STOMP_LEFT", 135f, new float[3] { -6f, 0f, 6f }); CreateStompState("Custom Hand Stomp Right", "CUSTOM_STOMP_RIGHT", 45f, new float[3] { -6f, 0f, 6f }); string text = "Custom Stomp Decision"; FsmState val = FsmStateBuilder.CreateState(handFSM.Fsm, text); List list = new List(); FsmBool val2 = handFSM.FsmVariables.GetFsmBool("Stomp Random Bool"); if (val2 == null) { val2 = new FsmBool("Stomp Random Bool"); List list2 = handFSM.FsmVariables.BoolVariables.ToList(); list2.Add(val2); handFSM.FsmVariables.BoolVariables = list2.ToArray(); } List list3 = handFSM.Fsm.Events.ToList(); FsmEvent fsmEvent = FsmEvent.GetFsmEvent("CUSTOM_STOMP_L_DECISION"); FsmEvent fsmEvent2 = FsmEvent.GetFsmEvent("CUSTOM_STOMP_R_DECISION"); if (!list3.Contains(fsmEvent)) { list3.Add(fsmEvent); } if (!list3.Contains(fsmEvent2)) { list3.Add(fsmEvent2); } handFSM.Fsm.Events = list3.ToArray(); list.Add((FsmStateAction)new RandomBool { storeResult = val2 }); FsmBool fsmBool = handFSM.FsmVariables.GetFsmBool("Ready"); if (fsmBool != null) { list.Add((FsmStateAction)new SetBoolValue { boolVariable = fsmBool, boolValue = FsmBool.op_Implicit(false), everyFrame = false }); } list.Add((FsmStateAction)new BoolTest { boolVariable = val2, isTrue = FsmEvent.GetFsmEvent("CUSTOM_STOMP_L_DECISION"), isFalse = FsmEvent.GetFsmEvent("CUSTOM_STOMP_R_DECISION"), everyFrame = false }); val.Actions = list.ToArray(); FsmState targetState = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Custom Hand Stomp Left")); FsmState targetState2 = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Custom Hand Stomp Right")); val.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CUSTOM_STOMP_L_DECISION"), targetState), FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CUSTOM_STOMP_R_DECISION"), targetState2) }; List list4 = handFSM.FsmStates.ToList(); list4.Add(val); handFSM.Fsm.States = list4.ToArray(); List list5 = handFSM.FsmGlobalTransitions.ToList(); FsmTransition val3 = ((IEnumerable)list5).FirstOrDefault((Func)((FsmTransition t) => t.FsmEvent.Name == "STOMP")); if (val3 != null) { val3.toState = text; val3.toFsmState = val; } handFSM.Fsm.GlobalTransitions = list5.ToArray(); } } private void CreateStompState(string stateName, string eventName, float rotation, float[] xOffsets) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0095: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Expected O, but got Unknown //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Expected O, but got Unknown //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Expected O, but got Unknown //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Expected O, but got Unknown //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Expected O, but got Unknown //IL_0252: Expected O, but got Unknown //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Expected O, but got Unknown //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Expected O, but got Unknown //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Expected O, but got Unknown //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Expected O, but got Unknown //IL_02d3: Expected O, but got Unknown //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Expected O, but got Unknown //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Expected O, but got Unknown //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Expected O, but got Unknown //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Expected O, but got Unknown //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Expected O, but got Unknown //IL_037c: Expected O, but got Unknown //IL_0381: Expected O, but got Unknown //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Expected O, but got Unknown //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Expected O, but got Unknown if ((Object)(object)handFSM == (Object)null) { return; } FsmState val = FsmStateBuilder.CreateState(handFSM.Fsm, stateName); List list = new List(); FsmFloat fsmFloat = handFSM.FsmVariables.GetFsmFloat("Hero X"); FsmFloat fsmFloat2 = handFSM.FsmVariables.GetFsmFloat("Hero Y"); GetPosition item = new GetPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)HeroController.instance).gameObject } }, vector = new FsmVector3(), x = fsmFloat, y = fsmFloat2, z = new FsmFloat(), space = (Space)0, everyFrame = false }; list.Add((FsmStateAction)(object)item); FloatClamp item2 = new FloatClamp { floatVariable = fsmFloat, minValue = new FsmFloat(FsmFloat.op_Implicit(22f)), maxValue = new FsmFloat(FsmFloat.op_Implicit(55f)), everyFrame = false }; list.Add((FsmStateAction)(object)item2); for (int i = 0; i < fingerBlades.Length; i++) { if (!((Object)(object)fingerBlades[i] == (Object)null)) { string name = ((Object)fingerBlades[i]).name; float num = 0f; if (name.Contains("Blade L")) { num = xOffsets[0]; } else if (name.Contains("Blade M")) { num = xOffsets[1]; } else if (name.Contains("Blade R")) { num = xOffsets[2]; } FsmFloat fsmFloat3 = handFSM.FsmVariables.GetFsmFloat($"Attack X {i}"); SetFloatValue item3 = new SetFloatValue { floatVariable = fsmFloat3, floatValue = fsmFloat, everyFrame = false }; FloatAdd item4 = new FloatAdd { floatVariable = fsmFloat3, add = new FsmFloat(FsmFloat.op_Implicit(num)), everyFrame = false }; list.Add((FsmStateAction)(object)item3); list.Add((FsmStateAction)(object)item4); SetFsmFloat item5 = new SetFsmFloat { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Attack X") { Value = "Attack X" }, setValue = fsmFloat3, everyFrame = false }; SetFsmFloat item6 = new SetFsmFloat { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Attack Rotation") { Value = "Attack Rotation" }, setValue = new FsmFloat(FsmFloat.op_Implicit(rotation)), everyFrame = false }; list.Add((FsmStateAction)(object)item5); list.Add((FsmStateAction)(object)item6); SendEventByName item7 = new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } } }, sendEvent = FsmString.op_Implicit(eventName), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }; list.Add((FsmStateAction)(object)item7); } } Wait item8 = new Wait { time = FsmFloat.op_Implicit(2f), finishEvent = FsmEvent.Finished }; list.Add((FsmStateAction)(object)item8); val.Actions = list.ToArray(); List list2 = handFSM.FsmStates.ToList(); list2.Add(val); handFSM.Fsm.States = list2.ToArray(); FsmState targetState = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Attack Ready Frame")); FsmStateBuilder.SetFinishedTransition(val, targetState); } private void ModifySwipeStates_New() { if ((Object)(object)handFSM == (Object)null) { return; } CreateSwipeState("Custom Hand Swipe L", "CUSTOM_SWIPE_L", 11.5f, 180f, 1f); CreateSwipeState("Custom Hand Swipe R", "CUSTOM_SWIPE_R", -11.5f, 0f, -1f); CreateSwipeDirState(); List list = handFSM.FsmGlobalTransitions.ToList(); FsmTransition val = ((IEnumerable)list).FirstOrDefault((Func)((FsmTransition t) => t.FsmEvent.Name == "SWIPE")); if (val != null) { FsmState toFsmState = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Custom Hand Swipe Dir")); val.toState = "Custom Hand Swipe Dir"; val.toFsmState = toFsmState; } handFSM.Fsm.GlobalTransitions = list.ToArray(); } private void CreateSwipeDirState() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Expected O, but got Unknown //IL_0111: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Expected O, but got Unknown //IL_0212: Expected O, but got Unknown //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Expected O, but got Unknown //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Expected O, but got Unknown //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Expected O, but got Unknown //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Expected O, but got Unknown //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Expected O, but got Unknown //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Expected O, but got Unknown //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Expected O, but got Unknown //IL_02b6: Expected O, but got Unknown //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Expected O, but got Unknown //IL_02f3: Expected O, but got Unknown //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Expected O, but got Unknown //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Expected O, but got Unknown //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Expected O, but got Unknown //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Expected O, but got Unknown //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Expected O, but got Unknown //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Expected O, but got Unknown //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Expected O, but got Unknown //IL_0397: Expected O, but got Unknown //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Expected O, but got Unknown //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Expected O, but got Unknown //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Expected O, but got Unknown //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Expected O, but got Unknown if (!((Object)(object)handFSM == (Object)null)) { FsmState val = FsmStateBuilder.CreateState(handFSM.Fsm, "Custom Hand Swipe Dir"); List list = new List(); FsmBool fsmBool = handFSM.FsmVariables.GetFsmBool("Ready"); if (fsmBool != null) { list.Add((FsmStateAction)new SetBoolValue { boolVariable = fsmBool, boolValue = FsmBool.op_Implicit(false), everyFrame = false }); } CallMethod val2 = new CallMethod(); val2.behaviour = FsmObject.op_Implicit((Object)(object)this); val2.methodName = FsmString.op_Implicit("SetFingerBladePhase2Parameters"); val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; CallMethod item = val2; list.Add((FsmStateAction)(object)item); FsmFloat fsmFloat = handFSM.FsmVariables.GetFsmFloat("Hero X"); GetPosition item2 = new GetPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)HeroController.instance).gameObject } }, vector = new FsmVector3(), x = fsmFloat, y = new FsmFloat(), z = new FsmFloat(), space = (Space)0, everyFrame = false }; list.Add((FsmStateAction)(object)item2); FsmEvent fsmEvent = FsmEvent.GetFsmEvent("SWIPE_DIR_L"); FsmEvent fsmEvent2 = FsmEvent.GetFsmEvent("SWIPE_DIR_R"); FsmEvent fsmEvent3 = FsmEvent.GetFsmEvent("NULL"); List list2 = handFSM.Fsm.Events.ToList(); if (!list2.Contains(fsmEvent)) { list2.Add(fsmEvent); } if (!list2.Contains(fsmEvent2)) { list2.Add(fsmEvent2); } handFSM.Fsm.Events = list2.ToArray(); CheckXPosition item3 = new CheckXPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)HeroController.instance).gameObject } }, compareTo = new FsmFloat(FsmFloat.op_Implicit(47f)), compareToOffset = new FsmFloat(FsmFloat.op_Implicit(0f)), tolerance = new FsmFloat(FsmFloat.op_Implicit(0f)), equal = fsmEvent3, equalBool = new FsmBool(FsmBool.op_Implicit(false)), greaterThan = fsmEvent2, greaterThanBool = new FsmBool(FsmBool.op_Implicit(false)), lessThan = fsmEvent3, lessThanBool = new FsmBool(FsmBool.op_Implicit(false)), everyFrame = false, activeBool = new FsmBool(FsmBool.op_Implicit(false)) }; list.Add((FsmStateAction)(object)item3); CheckXPosition item4 = new CheckXPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)HeroController.instance).gameObject } }, compareTo = new FsmFloat(FsmFloat.op_Implicit(33f)), compareToOffset = new FsmFloat(FsmFloat.op_Implicit(0f)), tolerance = new FsmFloat(FsmFloat.op_Implicit(0f)), equal = fsmEvent3, equalBool = new FsmBool(FsmBool.op_Implicit(false)), greaterThan = fsmEvent3, greaterThanBool = new FsmBool(FsmBool.op_Implicit(false)), lessThan = fsmEvent, lessThanBool = new FsmBool(FsmBool.op_Implicit(false)), everyFrame = false, activeBool = new FsmBool(FsmBool.op_Implicit(false)) }; list.Add((FsmStateAction)(object)item4); SendRandomEvent val3 = new SendRandomEvent(); val3.events = (FsmEvent[])(object)new FsmEvent[2] { fsmEvent, fsmEvent2 }; val3.weights = (FsmFloat[])(object)new FsmFloat[2] { new FsmFloat(FsmFloat.op_Implicit(1f)), new FsmFloat(FsmFloat.op_Implicit(1f)) }; val3.delay = new FsmFloat(FsmFloat.op_Implicit(0f)); SendRandomEvent item5 = val3; list.Add((FsmStateAction)(object)item5); val.Actions = list.ToArray(); FsmState targetState = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Custom Hand Swipe L")); FsmState targetState2 = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Custom Hand Swipe R")); val.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(fsmEvent, targetState), FsmStateBuilder.CreateTransition(fsmEvent2, targetState2) }; List list3 = handFSM.FsmStates.ToList(); list3.Add(val); handFSM.Fsm.States = list3.ToArray(); } } private void CreateSwipeState(string stateName, string eventName, float xOffset, float rotation, float yScale) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0095: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Expected O, but got Unknown //IL_0581: Unknown result type (might be due to invalid IL or missing references) //IL_0586: Unknown result type (might be due to invalid IL or missing references) //IL_0596: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Expected O, but got Unknown //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Expected O, but got Unknown //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Expected O, but got Unknown //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Expected O, but got Unknown //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Expected O, but got Unknown //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Expected O, but got Unknown //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Expected O, but got Unknown //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Expected O, but got Unknown //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Expected O, but got Unknown //IL_02e4: Expected O, but got Unknown //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Expected O, but got Unknown //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Expected O, but got Unknown //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Expected O, but got Unknown //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Expected O, but got Unknown //IL_0365: Expected O, but got Unknown //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Expected O, but got Unknown //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Expected O, but got Unknown //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Expected O, but got Unknown //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Expected O, but got Unknown //IL_03e6: Expected O, but got Unknown //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Expected O, but got Unknown //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Expected O, but got Unknown //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Expected O, but got Unknown //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Expected O, but got Unknown //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Expected O, but got Unknown //IL_0471: Expected O, but got Unknown //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_048d: Expected O, but got Unknown //IL_048d: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Expected O, but got Unknown //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Expected O, but got Unknown //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Expected O, but got Unknown //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Expected O, but got Unknown //IL_052d: Expected O, but got Unknown //IL_0532: Expected O, but got Unknown //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_053e: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Expected O, but got Unknown //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Expected O, but got Unknown if ((Object)(object)handFSM == (Object)null) { return; } FsmState val = FsmStateBuilder.CreateState(handFSM.Fsm, stateName); List list = new List(); FsmFloat fsmFloat = handFSM.FsmVariables.GetFsmFloat("Hero X"); FsmFloat fsmFloat2 = handFSM.FsmVariables.GetFsmFloat("Hero Y"); GetPosition item = new GetPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)HeroController.instance).gameObject } }, vector = new FsmVector3(), x = fsmFloat, y = fsmFloat2, z = new FsmFloat(), space = (Space)0, everyFrame = false }; list.Add((FsmStateAction)(object)item); float[] array = new float[3] { 2f, 0f, -2f }; for (int i = 0; i < fingerBlades.Length; i++) { if (!((Object)(object)fingerBlades[i] == (Object)null)) { string name = ((Object)fingerBlades[i]).name; float num = 0f; if (name.Contains("Blade L")) { num = array[0]; } else if (name.Contains("Blade M")) { num = array[1]; } else if (name.Contains("Blade R")) { num = array[2]; } FsmFloat fsmFloat3 = handFSM.FsmVariables.GetFsmFloat($"Attack X {i}"); SetFloatValue item2 = new SetFloatValue { floatVariable = fsmFloat3, floatValue = fsmFloat, everyFrame = false }; FloatAdd item3 = new FloatAdd { floatVariable = fsmFloat3, add = new FsmFloat(FsmFloat.op_Implicit(xOffset)), everyFrame = false }; FloatClamp item4 = new FloatClamp { floatVariable = fsmFloat3, minValue = new FsmFloat(FsmFloat.op_Implicit(23f)), maxValue = new FsmFloat(FsmFloat.op_Implicit(55f)), everyFrame = false }; list.Add((FsmStateAction)(object)item2); list.Add((FsmStateAction)(object)item3); list.Add((FsmStateAction)(object)item4); FsmFloat fsmFloat4 = handFSM.FsmVariables.GetFsmFloat($"Attack Y {i}"); SetFloatValue item5 = new SetFloatValue { floatVariable = fsmFloat4, floatValue = fsmFloat2, everyFrame = false }; FloatAdd item6 = new FloatAdd { floatVariable = fsmFloat4, add = new FsmFloat(FsmFloat.op_Implicit(num)), everyFrame = false }; list.Add((FsmStateAction)(object)item5); list.Add((FsmStateAction)(object)item6); SetFsmFloat item7 = new SetFsmFloat { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Attack X") { Value = "Attack X" }, setValue = fsmFloat3, everyFrame = false }; SetFsmFloat item8 = new SetFsmFloat { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Attack Y") { Value = "Attack Y" }, setValue = fsmFloat4, everyFrame = false }; SetFsmFloat item9 = new SetFsmFloat { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Attack Rotation") { Value = "Attack Rotation" }, setValue = new FsmFloat(FsmFloat.op_Implicit(rotation)), everyFrame = false }; SetFsmFloat item10 = new SetFsmFloat { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Attack Y Scale") { Value = "Attack Y Scale" }, setValue = new FsmFloat(FsmFloat.op_Implicit(yScale)), everyFrame = false }; list.Add((FsmStateAction)(object)item7); list.Add((FsmStateAction)(object)item8); list.Add((FsmStateAction)(object)item9); list.Add((FsmStateAction)(object)item10); SendEventByName item11 = new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } } }, sendEvent = FsmString.op_Implicit(eventName), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }; list.Add((FsmStateAction)(object)item11); } } Wait item12 = new Wait { time = FsmFloat.op_Implicit(2.5f), finishEvent = FsmEvent.Finished }; list.Add((FsmStateAction)(object)item12); val.Actions = list.ToArray(); List list2 = handFSM.FsmStates.ToList(); list2.Add(val); handFSM.Fsm.States = list2.ToArray(); FsmState targetState = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Attack Ready Frame")); FsmStateBuilder.SetFinishedTransition(val, targetState); } private void InitializeFingerBlades() { Transform[] componentsInChildren = ((Component)this).GetComponentsInChildren(); Transform[] array = componentsInChildren.Where((Transform t) => ((Object)t).name == "Finger Blade L" || ((Object)t).name == "Finger Blade M" || ((Object)t).name == "Finger Blade R").ToArray(); int num = 0; Transform[] array2 = array; foreach (Transform val in array2) { if (num >= fingerBlades.Length) { break; } GameObject gameObject = ((Component)val).gameObject; fingerBlades[num] = val; FingerBladeBehavior fingerBladeBehavior = gameObject.GetComponent(); if ((Object)(object)fingerBladeBehavior == (Object)null) { fingerBladeBehavior = CreateFingerBladeBehavior(gameObject); } InitializeFingerBlade(fingerBladeBehavior, num); fingerBladeBehaviors[num] = fingerBladeBehavior; fingerBladeBehavior.AddOrbitGlobalTransition(); num++; } Log.Info($"{handName} 初始化完成,找到 {num} 根Finger Blade"); } private FingerBladeBehavior CreateFingerBladeBehavior(GameObject bladeObj) { return bladeObj.AddComponent(); } private void InitializeFingerBlade(FingerBladeBehavior bladeBehavior, int bladeIndex) { bladeBehavior.Initialize(bladeIndex, handName, this); } public void AddOrbitAttackState() { if (!((Object)(object)handFSM == (Object)null)) { RegisterHandEvents(); FsmState val = FsmStateBuilder.CreateState(handFSM.Fsm, "Orbit Start", handName + " 启动环绕状态"); FsmState val2 = FsmStateBuilder.CreateState(handFSM.Fsm, "Orbit Shoot", handName + " 环绕发射状态"); List list = handFSM.FsmStates.ToList(); list.Add(val); list.Add(val2); handFSM.Fsm.States = list.ToArray(); AddOrbitStartActions(val); AddOrbitShootActions(val2); AddOrbitAttackGlobalTransition(val, val2); AddOrbitStartTransitions(val, val2); AddOrbitShootTransitions(val2, ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Attack Ready Frame"))); RelinkHandEventReferences(); } } private void OnDestroy() { ((MonoBehaviour)this).StopAllCoroutines(); fingerBlades = (Transform[])(object)new Transform[3]; fingerBladeBehaviors = new FingerBladeBehavior[3]; } private void RegisterHandEvents() { if (!((Object)(object)handFSM == (Object)null)) { _orbitStartEvent = FsmEvent.GetFsmEvent("ORBIT START " + handName); _shootEvent = FsmEvent.GetFsmEvent("SHOOT " + handName); List list = handFSM.Fsm.Events.ToList(); if (!list.Contains(_orbitStartEvent)) { list.Add(_orbitStartEvent); } if (!list.Contains(_shootEvent)) { list.Add(_shootEvent); } handFSM.Fsm.Events = list.ToArray(); } } private void RelinkHandEventReferences() { if (!((Object)(object)handFSM == (Object)null)) { Log.Info(handName + " 重新链接Hand FSM事件引用"); handFSM.Fsm.InitData(); Log.Info(handName + " Hand FSM事件引用重新链接完成"); } } private void AddOrbitAttackGlobalTransition(FsmState orbitStartState, FsmState orbitShootState) { //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown if (_orbitStartEvent == null) { Log.Error(handName + " 未找到ORBIT START事件: ORBIT START " + handName); return; } FsmState val = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Idle")); if (val != null) { FsmTransition item = new FsmTransition { FsmEvent = _orbitStartEvent, toState = "Orbit Start", toFsmState = orbitStartState }; List list = val.Transitions.ToList(); list.Add(item); val.Transitions = list.ToArray(); } List list2 = handFSM.Fsm.GlobalTransitions.ToList(); list2.Add(new FsmTransition { FsmEvent = _orbitStartEvent, toState = "Orbit Start", toFsmState = orbitStartState }); handFSM.Fsm.GlobalTransitions = list2.ToArray(); } public void StartOrbitAttackSequence() { float[] array = ((!(handName == "Hand L")) ? new float[3] { 60f, 180f, 300f } : new float[3] { 0f, 120f, 240f }); for (int i = 0; i < fingerBladeBehaviors.Length; i++) { if (!((Object)(object)fingerBladeBehaviors[i] != (Object)null)) { continue; } PlayMakerFSM val = ((IEnumerable)((Component)fingerBladeBehaviors[i]).GetComponents()).FirstOrDefault((Func)((PlayMakerFSM fsm) => fsm.FsmName == "Control")); if ((Object)(object)val != (Object)null) { float num = 200f * orbitRotationDirection; float num2 = array[i] * orbitRotationDirection; FsmFloat fsmFloat = val.FsmVariables.GetFsmFloat("OrbitRadius"); if (fsmFloat != null) { fsmFloat.Value = 7f; } FsmFloat fsmFloat2 = val.FsmVariables.GetFsmFloat("OrbitSpeed"); if (fsmFloat2 != null) { fsmFloat2.Value = num; } FsmFloat fsmFloat3 = val.FsmVariables.GetFsmFloat("OrbitOffset"); if (fsmFloat3 != null) { fsmFloat3.Value = num2; } FsmBool fsmBool = val.FsmVariables.GetFsmBool("Ready"); if (fsmBool != null) { fsmBool.Value = false; } int num3 = ((handName == "Hand L") ? i : (i + 3)); string text = $"ORBIT START {handName} Blade {num3}"; val.SendEvent(text); Log.Info($"{handName} Finger Blade {i}: Radius=7, Speed={num}, Offset={num2}"); } else { Log.Warn($"{handName} -> Finger Blade {i} 未找到Control FSM"); } } } public void StartShootSequence() { ((MonoBehaviour)this).StartCoroutine(ShootSequence()); } public void SetOrbitAttackConfig(float rotationDirection, float shootInterval) { orbitRotationDirection = rotationDirection; bladeShootInterval = shootInterval; Log.Info($"{handName} 设置环绕攻击参数: 方向={rotationDirection}, 间隔={shootInterval}秒"); } [IteratorStateMachine(typeof(d__27))] private IEnumerator ShootSequence() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__27(0) { <>4__this = this }; } private void AddOrbitStartActions(FsmState orbitStartState) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown if (_shootEvent == null) { Log.Error(handName + " 未找到SHOOT事件: SHOOT " + handName); return; } CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartOrbitAttackSequence") { Value = "StartOrbitAttackSequence" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; CallMethod val2 = val; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(6f)), finishEvent = _shootEvent }; orbitStartState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, (FsmStateAction)val3 }; } private void AddOrbitShootActions(FsmState orbitShootState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartShootSequence") { Value = "StartShootSequence" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; CallMethod val2 = val; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.2f)), finishEvent = FsmEvent.Finished }; orbitShootState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, (FsmStateAction)val3 }; } private void AddOrbitStartTransitions(FsmState orbitStartState, FsmState orbitShootState) { if (_shootEvent == null) { Log.Error(handName + " 未找到SHOOT事件: SHOOT " + handName); return; } orbitStartState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(_shootEvent, orbitShootState) }; } private void AddOrbitShootTransitions(FsmState orbitShootState, FsmState attackReadyFrameState) { FsmStateBuilder.SetFinishedTransition(orbitShootState, attackReadyFrameState); } public void SetFingerBladePhase2Parameters() { GameObject val = GameObject.Find("Silk Boss"); if ((Object)(object)val == (Object)null) { Log.Warn(handName + " 未找到 Silk Boss 对象"); return; } PlayMakerFSM val2 = FSMUtility.LocateMyFSM(val, "Phase Control"); if ((Object)(object)val2 == (Object)null) { Log.Warn(handName + " 未找到 Phase Control FSM,无法设置追踪参数"); return; } FsmBool fsmBool = val2.FsmVariables.GetFsmBool("Special Attack"); if (fsmBool == null) { Log.Warn(handName + " 未找到 Phase Control FSM 的 Special Attack 变量"); return; } List list = new List { 1.2f + Random.Range(-0.1f, 0.1f), 1.55f + Random.Range(-0.1f, 0.1f), 1.9f + Random.Range(-0.1f, 0.1f) }; for (int num = list.Count - 1; num > 0; num--) { int index = Random.Range(0, num + 1); float value = list[num]; list[num] = list[index]; list[index] = value; } for (int i = 0; i < fingerBladeBehaviors.Length; i++) { FingerBladeBehavior fingerBladeBehavior = fingerBladeBehaviors[i]; if ((Object)(object)fingerBladeBehavior == (Object)null) { continue; } PlayMakerFSM component = ((Component)fingerBladeBehavior).GetComponent(); if (!((Object)(object)component == (Object)null) && !(component.FsmName != "Control")) { FsmFloat fsmFloat = component.FsmVariables.GetFsmFloat("Track Time"); if (fsmFloat != null && i < list.Count) { fsmFloat.Value = list[i]; Log.Info($"{handName} Finger Blade {i} Track Time 随机设置为 {list[i]}s"); } else { Log.Warn($"{handName} Finger Blade {i} 未找到 Track Time 变量"); } FsmBool fsmBool2 = component.FsmVariables.GetFsmBool("Special Attack"); if (fsmBool2 != null) { fsmBool2.Value = fsmBool.Value; Log.Info($"{handName} Finger Blade {i} Special Attack 同步为 {fsmBool.Value}"); } } } } private void ModifyOriginalSwipeStates() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown if (!((Object)(object)handFSM == (Object)null)) { FsmState val = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Swipe Dir")); if (val != null) { List list = val.Actions.ToList(); CallMethod val2 = new CallMethod(); val2.behaviour = FsmObject.op_Implicit((Object)(object)this); val2.methodName = FsmString.op_Implicit("SetFingerBladePhase2Parameters"); val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; CallMethod item = val2; list.Insert(0, (FsmStateAction)(object)item); val.Actions = list.ToArray(); Log.Info(handName + " Set Swipe L Q 状态已添加追踪参数设置"); } } } } internal class LaceCircleSlashBehavior : MonoBehaviour { [Header("缩放配置")] [Tooltip("缩放倍数(相对于原始大小的倍数)")] public float scaleMultiplier = 2f; [Header("定时禁用配置")] [Tooltip("激活后自动禁用的时间(秒)")] public float deactivateTime = 2f; private Vector3 _originalScale; private Vector3 _targetScale; private float _timer; private bool _initialized = false; private void Awake() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) if (!_initialized) { _originalScale = ((Component)this).transform.localScale; _targetScale = _originalScale * scaleMultiplier; _initialized = true; Log.Info($"LaceCircleSlashBehavior 初始化 - 原始大小: {_originalScale}, 目标大小: {_targetScale}"); } } private void OnEnable() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) _timer = deactivateTime; if (!_initialized) { _originalScale = ((Component)this).transform.localScale; _targetScale = _originalScale * scaleMultiplier; _initialized = true; } } private void Update() { if (_timer > 0f) { _timer -= Time.deltaTime; if (_timer <= 0f) { ((Component)this).gameObject.SetActive(false); } } } private void LateUpdate() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) Transform transform = ((Component)this).transform; transform.localScale *= scaleMultiplier; } public void SetScaleMultiplier(float multiplier) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) scaleMultiplier = multiplier; _targetScale = _originalScale * scaleMultiplier; Log.Info($"LaceCircleSlashBehavior 更新缩放倍数: {multiplier}, 新目标大小: {_targetScale}"); } public void SetDeactivateTime(float time) { deactivateTime = time; _timer = time; } public void ResetTimer() { _timer = deactivateTime; } public void DeactivateNow() { _timer = 0f; ((Component)this).gameObject.SetActive(false); } } internal class PhaseControlBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__35 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PhaseControlBehavior <>4__this; private float 5__1; private float 5__2; private float 5__3; private float 5__4; private Vector3 5__5; private Vector3 5__6; private Vector3 5__7; private Vector3 5__8; private Vector3 5__9; private float 5__10; private Vector3 5__11; private Vector3 5__12; private Vector3 5__13; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__35(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 1f; 5__2 = 60f; 5__3 = 1.8f; Log.Info($"开始BOSS Transform渐变 - 从Z={<>4__this._originalBossZ:F4}到{5__2:F4}, Scale从{<>4__this._originalBossScale}到{<>4__this._originalBossScale * 5__3}"); 5__4 = 0f; 5__5 = Extensions.Abs(<>4__this._originalBossScale); ((Component)<>4__this).transform.localScale = 5__5; 5__6 = Extensions.Abs(<>4__this._originalBossScale) * 5__3; 5__7 = <>4__this._originalHairScale; 5__8 = <>4__this._originalHairScale * 5__3; if ((Object)(object)<>4__this._hairTransform != (Object)null) { Log.Info($"开始Hair Transform渐变 - 从Z={<>4__this._originalHairZ:F4}到{5__2:F4}, Scale从{<>4__this._originalHairScale}到{5__8}"); } break; case 1: <>1__state = -1; break; } if (5__4 < 5__1) { 5__4 += Time.deltaTime; 5__10 = 5__4 / 5__1; 5__11 = ((Component)<>4__this).transform.position; 5__11.z = Mathf.Lerp(<>4__this._originalBossZ, 5__2, 5__10); ((Component)<>4__this).transform.position = 5__11; ((Component)<>4__this).transform.localScale = Vector3.Lerp(5__5, 5__6, 5__10); if ((Object)(object)<>4__this._hairTransform != (Object)null) { 5__12 = <>4__this._hairTransform.position; 5__12.z = Mathf.Lerp(<>4__this._originalHairZ, 5__2, 5__10); <>4__this._hairTransform.position = 5__12; <>4__this._hairTransform.localScale = Vector3.Lerp(5__7, 5__8, 5__10); } <>2__current = null; <>1__state = 1; return true; } 5__9 = ((Component)<>4__this).transform.position; 5__9.z = 5__2; ((Component)<>4__this).transform.position = 5__9; ((Component)<>4__this).transform.localScale = 5__6; if ((Object)(object)<>4__this._hairTransform != (Object)null) { 5__13 = <>4__this._hairTransform.position; 5__13.z = 5__2; <>4__this._hairTransform.position = 5__13; <>4__this._hairTransform.localScale = 5__8; Log.Info($"Hair Transform渐变完成 - Z={<>4__this._hairTransform.position.z:F4}, Scale={<>4__this._hairTransform.localScale}"); } Log.Info($"BOSS Transform渐变完成 - Z={((Component)<>4__this).transform.position.z:F4}, Scale={((Component)<>4__this).transform.localScale}"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__59 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject heroObj; public PhaseControlBehavior <>4__this; private float 5__1; private float 5__2; private float 5__3; private float 5__4; private float 5__5; private float 5__6; private float 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__59(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)heroObj == (Object)null) { return false; } 5__1 = heroObj.transform.position.y; 5__2 = 133.57f; 5__3 = 0.3f; 5__4 = 0f; break; case 1: <>1__state = -1; break; } if (5__4 < 5__3) { 5__4 += Time.deltaTime; 5__5 = Mathf.Clamp01(5__4 / 5__3); 5__6 = 1f - Mathf.Pow(1f - 5__5, 3f); 5__7 = Mathf.Lerp(5__1, 5__2, 5__6); heroObj.transform.position = new Vector3(heroObj.transform.position.x, 5__7, heroObj.transform.position.z); <>2__current = null; <>1__state = 1; return true; } heroObj.transform.position = new Vector3(heroObj.transform.position.x, 5__2, heroObj.transform.position.z); Log.Info($"玩家平滑移动到地面完成,最终Y={heroObj.transform.position.y:F2}"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__64 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PhaseControlBehavior <>4__this; private GameObject 5__1; private HeroController 5__2; private tk2dSpriteAnimator 5__3; private Rigidbody2D 5__4; private int 5__5; private Vector3 5__6; private float 5__7; private float 5__8; private float 5__9; private float 5__10; private float 5__11; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__64(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; 5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Expected O, but got Unknown //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Expected O, but got Unknown PlayerData instance2; switch (<>1__state) { default: return false; case 0: { <>1__state = -1; 5__1 = <>4__this.GetHeroGameObject(); 5__2 = HeroController.instance; if ((Object)(object)5__1 == (Object)null || (Object)(object)5__2 == (Object)null) { Log.Error("ClimbPhasePlayerAnimationCoroutine: 无法获取玩家对象"); return false; } 5__3 = 5__1.GetComponent(); 5__4 = 5__1.GetComponent(); Log.Info("开始穿墙下落序列"); 5__5 = 5__1.layer; 5__6 = 5__1.transform.position; 5__1.layer = LayerMask.NameToLayer("Ignore Raycast"); PlayerData instance = PlayerData.instance; if (instance != null) { instance.SetBool("isInvincible", true); } if ((Object)(object)5__4 != (Object)null) { 5__7 = 40f; 5__8 = 5__6.x; 5__9 = 2.3f; 5__10 = 5__7 - 5__8; 5__11 = 5__10 / 5__9; 5__4.linearVelocity = new Vector2(5__11, 5__4.linearVelocity.y); Log.Info($"玩家下落计算 - 当前位置:({5__8:F2}, {5__6.y:F2}), 目标X:{5__7}, X轴速度:{5__11:F2}"); } <>4__this.TryPlayAnimation(5__3, "Weak Fall"); goto IL_0226; } case 1: <>1__state = -1; goto IL_0226; case 2: <>1__state = -1; goto IL_02e7; case 3: <>1__state = -1; goto IL_03e2; case 4: <>1__state = -1; goto IL_041e; case 5: { <>1__state = -1; break; } IL_0226: if ((Object)(object)5__1 != (Object)null && 5__1.transform.position.y >= 57f) { <>2__current = null; <>1__state = 1; return true; } if ((Object)(object)5__1 == (Object)null) { return false; } 5__1.layer = 5__5; instance2 = PlayerData.instance; if (instance2 != null) { instance2.SetBool("isInvincible", false); } Log.Info($"玩家 Y < 57,恢复原始图层: {5__5},当前位置: {5__1.transform.position.y}"); goto IL_02e7; IL_041e: if (<>4__this.TryPlayAnimation(5__3, "GetUpToIdle")) { <>2__current = (object)new WaitForSeconds(0.3f); <>1__state = 5; return true; } break; IL_02e7: if ((Object)(object)5__1 != (Object)null && 5__1.transform.position.y > 53.8f) { <>2__current = null; <>1__state = 2; return true; } if ((Object)(object)5__1 == (Object)null) { return false; } Log.Info($"玩家落地,最终位置: {5__1.transform.position.y}"); if ((Object)(object)5__4 != (Object)null) { 5__4.linearVelocity = new Vector2(0f, 5__4.linearVelocity.y); } if (!((Object)(object)5__3 != (Object)null)) { break; } if (<>4__this.TryPlayAnimation(5__3, "FallToProstrate")) { <>2__current = (object)new WaitForSeconds(1f); <>1__state = 3; return true; } goto IL_03e2; IL_03e2: if (<>4__this.TryPlayAnimation(5__3, "ProstrateRiseToKneel")) { <>2__current = (object)new WaitForSeconds(1f); <>1__state = 4; return true; } goto IL_041e; } GameManager instance3 = GameManager._instance; if (instance3 != null) { InputHandler inputHandler = instance3.inputHandler; if (inputHandler != null) { inputHandler.StartAcceptingInput(); } } 5__2.RegainControl(); 5__2.StartAnimationControl(); if ((Object)(object)<>4__this._attackControl != (Object)null && !<>4__this._climbAttackEventSent) { <>4__this._attackControl.SendEvent("CLIMB PHASE ATTACK"); <>4__this._climbAttackEventSent = true; Log.Info("玩家恢复可移动,已发送 CLIMB PHASE ATTACK 事件到 Attack Control FSM"); } Log.Info("玩家动画控制完成,恢复控制权和输入"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__13 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FsmState roarState; public PhaseControlBehavior <>4__this; private int 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)<>4__this._attackControlBehavior == (Object)null) { <>4__this._attackControlBehavior = ((Component)<>4__this).gameObject.GetComponent(); } 5__1 = 0; break; case 2: <>1__state = -1; <>4__this._attackControlBehavior = ((Component)<>4__this).gameObject.GetComponent(); 5__1++; break; } if ((Object)(object)<>4__this._attackControlBehavior == (Object)null && 5__1 < 10) { <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 2; return true; } if ((Object)(object)<>4__this._attackControlBehavior == (Object)null) { Log.Error("延迟1秒后仍无法获取 AttackControlBehavior,Big Silk Ball Roar 状态可能缺少音效动作"); return false; } Log.Info("延迟添加 Big Silk Ball Roar 状态的动作"); <>4__this.AddBigSilkBallRoarActions(roarState); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__49 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FsmState catchEffectState; public PhaseControlBehavior <>4__this; private List 5__1; private PlayRandomAudioClipTable 5__2; private PlayAudioEvent 5__3; private PlayAudioEvent 5__4; private PlayAudioEvent 5__5; private PlayAudioEvent 5__6; private List 5__7; private int 5__8; private int 5__9; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__49(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; 5__4 = null; 5__5 = null; 5__6 = null; 5__7 = null; <>1__state = -2; } private bool MoveNext() { int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; 5__8++; } else { <>1__state = -1; if ((Object)(object)<>4__this._attackControlBehavior == (Object)null) { <>4__this._attackControlBehavior = ((Component)<>4__this).gameObject.GetComponent(); } if (!((Object)(object)<>4__this._attackControlBehavior != (Object)null)) { goto IL_00c0; } 5__8 = 0; } if (!<>4__this._attackControlBehavior.IsAttackControlFsmReady && 5__8 < 50) { <>2__current = null; <>1__state = 1; return true; } goto IL_00c0; IL_00c0: if ((Object)(object)<>4__this._attackControlBehavior == (Object)null || !<>4__this._attackControlBehavior.IsAttackControlFsmReady) { Log.Warn("无法获取 AttackControlBehavior 或其未初始化,Climb Catch Effect 音频动作未添加"); return false; } 5__1 = new List(); 5__2 = <>4__this._attackControlBehavior.CloneActionFromAttackControlFSM("Catch", 0, (Func?)null); 5__3 = <>4__this._attackControlBehavior.CloneActionFromAttackControlFSM("Catch", 0, (Func?)null); 5__4 = <>4__this._attackControlBehavior.CloneActionFromAttackControlFSM("Catch", 1, (Func?)null); 5__5 = <>4__this._attackControlBehavior.CloneActionFromAttackControlFSM("Catch", 2, (Func?)null); 5__6 = <>4__this._attackControlBehavior.CloneActionFromAttackControlFSM("Catch", 3, (Func?)null); if (5__2 != null) { 5__1.Add((FsmStateAction)(object)5__2); } if (5__3 != null) { 5__1.Add((FsmStateAction)(object)5__3); } if (5__4 != null) { 5__1.Add((FsmStateAction)(object)5__4); } if (5__5 != null) { 5__1.Add((FsmStateAction)(object)5__5); } if (5__6 != null) { 5__1.Add((FsmStateAction)(object)5__6); } 5__7 = new List(); 5__9 = 0; while (5__9 < catchEffectState.Actions.Length - 1) { 5__7.Add(catchEffectState.Actions[5__9]); 5__9++; } 5__7.AddRange(5__1); 5__7.Add(catchEffectState.Actions[catchEffectState.Actions.Length - 1]); catchEffectState.Actions = 5__7.ToArray(); catchEffectState.SaveActions(); catchEffectState.LoadActions(); Log.Info($"爬升阶段:Catch 音频动作已延迟添加({5__1.Count}个)"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__118 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PhaseControlBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__118(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SetupPhaseControl()); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__29 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PhaseControlBehavior <>4__this; private BigSilkBallBehavior 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__29(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)<>4__this._currentBigSilkBall != (Object)null) { 5__1 = <>4__this._currentBigSilkBall.GetComponent(); if ((Object)(object)5__1 != (Object)null) { 5__1.StartCharge(); Log.Info("大丝球开始蓄力"); } 5__1 = null; } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__74 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PhaseControlBehavior <>4__this; private GameObject 5__1; private float 5__2; private Animator 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__74(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = <>4__this.GetHeroGameObject(); if ((Object)(object)5__1 == (Object)null || (Object)(object)<>4__this._collapseGate == (Object)null) { Log.Warn("无法监控玩家X坐标或collapse_gate为null"); return false; } Log.Info("开始监控玩家X坐标以恢复collapse_gate"); break; case 1: <>1__state = -1; break; } if ((Object)(object)5__1 != (Object)null && (Object)(object)<>4__this._collapseGate != (Object)null) { 5__2 = 5__1.transform.position.x; if (5__2 > 20f && !<>4__this._collapseGate.activeSelf) { <>4__this._collapseGate.SetActive(true); 5__3 = <>4__this._collapseGate.GetComponent(); if ((Object)(object)5__3 != (Object)null) { ((Behaviour)5__3).enabled = false; } Log.Info($"玩家X坐标 > 20 ({5__2:F2}),已恢复collapse_gate GameObject,Animator保持禁用"); return false; } <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__73 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PhaseControlBehavior <>4__this; private Vector3 5__1; private Vector3 5__2; private float 5__3; private float 5__4; private BossBehavior 5__5; private float 5__6; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__73(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("开始快速移动Boss回到战斗场地"); 5__1 = ((Component)<>4__this).transform.position; 5__2 = new Vector3(5__1.x, 136f, 5__1.z); 5__3 = 1.5f; 5__4 = 0f; break; case 1: <>1__state = -1; break; } if (5__4 < 5__3) { 5__4 += Time.deltaTime; 5__6 = Mathf.SmoothStep(0f, 1f, 5__4 / 5__3); ((Component)<>4__this).transform.position = Vector3.Lerp(5__1, 5__2, 5__6); <>2__current = null; <>1__state = 1; return true; } ((Component)<>4__this).transform.position = 5__2; Log.Info($"Boss已回到战斗场地: {((Component)<>4__this).transform.position}"); 5__5 = ((Component)<>4__this).GetComponent(); if ((Object)(object)5__5 != (Object)null) { 5__5.EnableBossCollider(); } if ((Object)(object)<>4__this._attackControl != (Object)null) { <>4__this._attackControl.SendEvent("CLIMB PHASE END"); Log.Info("Boss完全恢复,已发送 CLIMB PHASE END 到 Attack Control 恢复攻击"); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__39 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PhaseControlBehavior <>4__this; private float 5__1; private Vector3 5__2; private Vector3 5__3; private float 5__4; private Vector3 5__5; private Vector3 5__6; private float 5__7; private float 5__8; private Vector3 5__9; private float 5__10; private Vector3 5__11; private Vector3 5__12; private Vector3 5__13; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__39(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 2f; 5__2 = ((Component)<>4__this).transform.position; 5__3 = ((Component)<>4__this).transform.localScale; 5__4 = 5__2.z; Log.Info($"开始恢复BOSS Transform - 从Z={5__2.z:F4}到{<>4__this._originalBossZ:F4}, Scale从{5__3}到(1,1,1)"); 5__5 = Vector3.zero; 5__6 = Vector3.one; 5__7 = 0f; if ((Object)(object)<>4__this._hairTransform != (Object)null) { 5__5 = <>4__this._hairTransform.position; 5__6 = <>4__this._hairTransform.localScale; 5__7 = 5__5.z; Log.Info($"开始恢复Hair Transform - 从Z={5__5.z:F4}到{<>4__this._originalHairZ:F4}, Scale从{5__6}到(1,1,1)"); } 5__8 = 0f; break; case 1: <>1__state = -1; break; } if (5__8 < 5__1) { 5__8 += Time.deltaTime; 5__10 = 5__8 / 5__1; 5__11 = ((Component)<>4__this).transform.position; 5__11.z = Mathf.Lerp(5__4, <>4__this._originalBossZ, 5__10); ((Component)<>4__this).transform.position = 5__11; ((Component)<>4__this).transform.localScale = Vector3.Lerp(5__3, Vector3.one, 5__10); if ((Object)(object)<>4__this._hairTransform != (Object)null) { 5__12 = <>4__this._hairTransform.position; 5__12.z = Mathf.Lerp(5__7, <>4__this._originalHairZ, 5__10); <>4__this._hairTransform.position = 5__12; <>4__this._hairTransform.localScale = Vector3.Lerp(5__6, Vector3.one, 5__10); } <>2__current = null; <>1__state = 1; return true; } 5__9 = ((Component)<>4__this).transform.position; 5__9.z = <>4__this._originalBossZ; ((Component)<>4__this).transform.position = 5__9; ((Component)<>4__this).transform.localScale = Vector3.one; if ((Object)(object)<>4__this._hairTransform != (Object)null) { 5__13 = <>4__this._hairTransform.position; 5__13.z = <>4__this._originalHairZ; <>4__this._hairTransform.position = 5__13; <>4__this._hairTransform.localScale = Vector3.one; Log.Info($"Hair Transform恢复完成 - Z={<>4__this._hairTransform.position.z:F4}, Scale={<>4__this._hairTransform.localScale}"); } Log.Info($"BOSS Transform恢复完成 - Z={((Component)<>4__this).transform.position.z:F4}, Scale={((Component)<>4__this).transform.localScale}"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__23 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PhaseControlBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__23(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(3.5f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.SendBladesReturnToAllFingerBlades(); Log.Info("第一次发送 BLADES RETURN(针对Stagger Finish状态)"); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.SendBladesReturnToAllFingerBlades(); Log.Info("第二次发送 BLADES RETURN(针对Rise状态)"); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__119 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PhaseControlBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__119(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.GetComponents(); <>4__this.GetBigSilkBallManager(); <>4__this.GetBossControlFSM(); <>4__this.ModifyPhaseBehavior(); <>4__this.AddBigSilkBallStates(); <>4__this.AddClimbPhaseStates(); Log.Info("阶段控制器行为初始化完成"); <>4__this._phaseControl.Fsm.InitData(); <>4__this._phaseControl.FsmVariables.Init(); <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__77 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float duration; public PhaseControlBehavior <>4__this; private GameObject 5__1; private float 5__2; private float 5__3; private float[] 5__4; private Vector3 5__5; private Vector3[] 5__6; private int 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__77(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__4 = null; 5__6 = null; <>1__state = -2; } private bool MoveNext() { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = <>4__this.GetHeroGameObject(); if ((Object)(object)5__1 == (Object)null) { Log.Warn("无法获取玩家对象,无法更新丝线位置"); return false; } 5__2 = 0f; 5__3 = 10f; 5__4 = new float[5] { 180f, -45f, -135f, 45f, 135f }; break; case 1: <>1__state = -1; break; } if (5__2 < duration) { if ((Object)(object)5__1 != (Object)null) { 5__5 = 5__1.transform.position; 5__6 = (Vector3[])(object)new Vector3[5] { 5__5 + new Vector3(0f, 5__3, 0f), 5__5 + new Vector3(0f - 5__3, 5__3, 0f), 5__5 + new Vector3(5__3, 5__3, 0f), 5__5 + new Vector3(0f - 5__3, 0f - 5__3, 0f), 5__5 + new Vector3(5__3, 0f - 5__3, 0f) }; 5__7 = 0; while (5__7 < 5) { if ((Object)(object)<>4__this._silkYankClones[5__7] != (Object)null && <>4__this._silkYankClones[5__7].activeSelf) { <>4__this._silkYankClones[5__7].transform.position = 5__6[5__7]; <>4__this._silkYankClones[5__7].transform.rotation = Quaternion.Euler(0f, 0f, 5__4[5__7]); } 5__7++; } 5__6 = null; } 5__2 += Time.deltaTime; <>2__current = null; <>1__state = 1; return true; } Log.Info($"丝线跟随完成,持续时间: {duration}秒"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__32 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PhaseControlBehavior <>4__this; private float 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__32(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("开始等待大丝球完成..."); <>4__this._chargeComplete = false; <>4__this._burstComplete = false; 5__1 = 0f; goto IL_00ab; case 1: <>1__state = -1; goto IL_00ab; case 2: { <>1__state = -1; break; } IL_00ab: if (!<>4__this._chargeComplete) { 5__1 += Time.deltaTime; if (!(5__1 > 5f)) { <>2__current = null; <>1__state = 1; return true; } Log.Warn("等待蓄力完成超时(5秒),强制继续"); } Log.Info($"确认蓄力完成(等待时间: {5__1:F2}s),等待爆炸..."); 5__1 = 0f; break; } if (!<>4__this._burstComplete) { 5__1 += Time.deltaTime; if (!(5__1 > 15f)) { <>2__current = null; <>1__state = 2; return true; } Log.Warn("等待爆炸完成超时(15秒),强制继续"); } Log.Info($"确认爆炸完成(等待时间: {5__1:F2}s),大招结束"); if ((Object)(object)<>4__this._phaseControl != (Object)null) { <>4__this._phaseControl.SendEvent("BIG SILK BALL COMPLETE"); Log.Info("已发送 BIG SILK BALL COMPLETE 事件到 Phase Control FSM"); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private GameObject? _collapseGate; private bool _collapseGateDisabled = false; private bool _climbPhaseCompleted = false; private PlayMakerFSM _phaseControl = null; private int _currentPhase = 1; private bool[] _phaseFlags = new bool[9]; private bool _hpModified = false; private FsmInt _bossPhaseIndex = null; private BigSilkBallManager? _bigSilkBallManager; private GameObject? _currentBigSilkBall; private bool _bigSilkBallTriggered = false; private int _originalLayer = 11; private bool _chargeComplete = false; private bool _burstComplete = false; private float _originalBossZ = 0f; private Vector3 _originalBossScale; private GameObject? _bossHaze; private GameObject? _bossHaze2; private Transform? _hairTransform; private float _originalHairZ = 0f; private Vector3 _originalHairScale; private GameObject? _handLObj; private GameObject? _handRObj; private GameObject[] _allFingerBlades = (GameObject[])(object)new GameObject[6]; private PlayMakerFSM? _attackControl; private AttackControlBehavior? _attackControlBehavior; private bool _climbCompleteEventSent = false; private bool _climbAttackEventSent = false; private PlayMakerFSM? _bossControl; private GameObject? _bossScene; private GameObject? _webStrandCatchEffect; private FsmGameObject? _fsmWebStrandCatchEffect; private GameObject? _silkYankPrefab; private GameObject[] _silkYankClones = (GameObject[])(object)new GameObject[5]; private bool _silkYankInitialized = false; private FsmGameObject[] _fsmSilkYankClones = (FsmGameObject[])(object)new FsmGameObject[5]; private FsmGameObject? _fsmHero; private FsmFloat? _fsmHeroX; private FsmFloat? _fsmHeroY; private void GetBigSilkBallManager() { GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { _bigSilkBallManager = val.GetComponent(); if ((Object)(object)_bigSilkBallManager != (Object)null) { Log.Info("PhaseControl: 成功获取 BigSilkBallManager"); } else { Log.Warn("PhaseControl: 未找到 BigSilkBallManager 组件"); } } } private void AddBigSilkBallStates() { if ((Object)(object)_phaseControl == (Object)null) { Log.Error("Phase Control FSM 未初始化,无法添加大招状态"); return; } Log.Info("=== 开始添加大丝球大招状态序列 ==="); FsmState val = FsmStateBuilder.FindState(_phaseControl, "Set P3 Web Strand"); FsmState val2 = FsmStateBuilder.FindState(_phaseControl, "P3"); if (val == null) { Log.Error("未找到 Set P3 Web Strand 状态"); return; } if (val2 == null) { Log.Error("未找到 P3 状态"); return; } RegisterBigSilkBallEvents(); FsmState[] array = FsmStateBuilder.CreateStates(_phaseControl.Fsm, ("P2.5", "P2.5阶段:监听TOOK DAMAGE触发血量检查"), ("HP Check 2.5", "检查血量:<=200触发大招,>200回到P2.5"), ("Big Silk Ball Roar", "大招前怒吼"), ("Big Silk Ball Roar End", "大招怒吼结束"), ("Big Silk Ball Prepare", "大招准备:停止攻击、设置无敌"), ("Big Silk Ball Move To Center", "Boss移动到中间高处"), ("Big Silk Ball Spawn", "生成大丝球并开始蓄力"), ("Big Silk Ball Wait", "等待大丝球爆炸和小丝球生成"), ("Big Silk Ball End", "大招结束:清理和恢复Layer"), ("Big Silk Ball Return", "BOSS从背景返回前景")); FsmState val3 = array[0]; FsmState hpCheck25State = array[1]; FsmState val4 = array[2]; FsmState roarEndState = array[3]; FsmState prepareState = array[4]; FsmState moveToCenterState = array[5]; FsmState spawnState = array[6]; FsmState waitState = array[7]; FsmState endState = array[8]; FsmState returnState = array[9]; FsmStateBuilder.AddStatesToFsm(_phaseControl, array); FsmStateBuilder.SetFinishedTransition(val, val3); Log.Info("已修改 Set P3 Web Strand -> P2.5"); AddP25Actions(val3); AddHPCheck25Actions(hpCheck25State); AddBigSilkBallRoarEndActions(roarEndState); AddBigSilkBallPrepareActions(prepareState); AddBigSilkBallMoveToCenterActions(moveToCenterState); AddBigSilkBallSpawnActions(spawnState); AddBigSilkBallWaitActions(waitState); AddBigSilkBallEndActions(endState); AddBigSilkBallReturnActions(returnState); AddP25Transitions(val3, hpCheck25State); AddHPCheck25Transitions(hpCheck25State, val3, val4); AddBigSilkBallTransitions(prepareState, moveToCenterState, spawnState, waitState, endState, returnState, val2, val4, roarEndState); ((MonoBehaviour)this).StartCoroutine(DelayedAddBigSilkBallRoarActions(val4)); Log.Info("=== 大丝球大招状态序列添加完成 ==="); } private void AddP25Actions(FsmState p25State) { p25State.Actions = (FsmStateAction[])(object)new FsmStateAction[0]; } private void AddHPCheck25Actions(FsmState hpCheck25State) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown List list = new List(); FsmGameObject val = new FsmGameObject("Self"); val.Value = ((Component)this).gameObject; CompareHP item = new CompareHP { enemy = val, integer2 = new FsmInt(FsmInt.op_Implicit(200)), lessThan = FsmEvent.GetFsmEvent("START BIG SILK BALL"), equal = FsmEvent.GetFsmEvent("START BIG SILK BALL"), greaterThan = FsmEvent.Finished, everyFrame = false }; list.Add((FsmStateAction)(object)item); hpCheck25State.Actions = list.ToArray(); } private void AddP25Transitions(FsmState p25State, FsmState hpCheck25State) { p25State.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("TOOK DAMAGE"), hpCheck25State) }; } private void AddHPCheck25Transitions(FsmState hpCheck25State, FsmState p25State, FsmState bigSilkBallRoarState) { hpCheck25State.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateFinishedTransition(p25State), FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("START BIG SILK BALL"), bigSilkBallRoarState) }; } private void AddBigSilkBallPrepareActions(FsmState prepareState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected O, but got Unknown //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Expected O, but got Unknown //IL_01a0: Expected O, but got Unknown //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Expected O, but got Unknown //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Expected O, but got Unknown //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Expected O, but got Unknown //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Expected O, but got Unknown //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Expected O, but got Unknown //IL_0236: Expected O, but got Unknown //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Expected O, but got Unknown //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Expected O, but got Unknown //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Expected O, but got Unknown //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Expected O, but got Unknown //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Expected O, but got Unknown //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Expected O, but got Unknown //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Expected O, but got Unknown //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Expected O, but got Unknown //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Expected O, but got Unknown //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SaveOriginalLayer") { Value = "SaveOriginalLayer" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("DisableBossHaze") { Value = "DisableBossHaze" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("AddBossHealth") { Value = "AddBossHealth" }; val.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar(typeof(int)) { intValue = 200 } }; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SpawnBigSilkBall") { Value = "SpawnBigSilkBall" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" } }, sendEvent = new FsmString("ATTACK STOP") { Value = "ATTACK STOP" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" } }, sendEvent = new FsmString("BIG SILK BALL LOCK") { Value = "BIG SILK BALL LOCK" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SetLayer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, layer = 2 }); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.5f)), finishEvent = FsmEvent.Finished }); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SendSilkStunnedToAllFingerBlades") { Value = "SendSilkStunnedToAllFingerBlades" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Insert(0, (FsmStateAction)(object)val); prepareState.Actions = list.ToArray(); } private void AddBigSilkBallMoveToCenterActions(FsmState moveToCenterState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Expected O, but got Unknown //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Expected O, but got Unknown //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Expected O, but got Unknown //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Expected O, but got Unknown //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Expected O, but got Unknown //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Expected O, but got Unknown //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Expected O, but got Unknown //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Expected O, but got Unknown //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Expected O, but got Unknown //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Expected O, but got Unknown //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Expected O, but got Unknown //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Expected O, but got Unknown //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Expected O, but got Unknown //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SaveBossOriginalState") { Value = "SaveBossOriginalState" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = FsmVector2.op_Implicit(new Vector2(0f, 0f)), x = new FsmFloat { UseVariable = false }, y = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new Tk2dPlayAnimationWithEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Drift F") { Value = "Drift F" }, animationCompleteEvent = null, animationTriggerEvent = null }); list.Add((FsmStateAction)new AnimateXPositionTo { GameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, ToValue = new FsmFloat(FsmFloat.op_Implicit(39.5f)), localSpace = false, time = new FsmFloat(FsmFloat.op_Implicit(1f)), speed = new FsmFloat(FsmFloat.op_Implicit(8f)), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), easeType = (EaseType)21, reverse = new FsmBool(FsmBool.op_Implicit(false)), realTime = false }); list.Add((FsmStateAction)new AnimateYPositionTo { GameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, ToValue = new FsmFloat(FsmFloat.op_Implicit(147.5f)), localSpace = false, time = new FsmFloat(FsmFloat.op_Implicit(1f)), speed = new FsmFloat(FsmFloat.op_Implicit(5f)), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), easeType = (EaseType)21, reverse = new FsmBool(FsmBool.op_Implicit(false)), realTime = false }); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartBossTransformAnimation") { Value = "StartBossTransformAnimation" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(1.2f)), finishEvent = FsmEvent.Finished }); moveToCenterState.Actions = list.ToArray(); } private void AddBigSilkBallSpawnActions(FsmState spawnState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartBigSilkBallCharge") { Value = "StartBigSilkBallCharge" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("WaitForBigSilkBallComplete") { Value = "WaitForBigSilkBallComplete" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.5f)), finishEvent = FsmEvent.Finished }); spawnState.Actions = list.ToArray(); } private void AddBigSilkBallWaitActions(FsmState waitState) { waitState.Actions = (FsmStateAction[])(object)new FsmStateAction[0]; } private void AddBigSilkBallEndActions(FsmState endState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("RestoreBossTransform") { Value = "RestoreBossTransform" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); int count = list.Count; val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SendBladesReturnToAllFingerBlades") { Value = "SendBladesReturnToAllFingerBlades" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Insert(count, (FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(2f)), finishEvent = FsmEvent.Finished }); endState.Actions = list.ToArray(); } private void AddBigSilkBallReturnActions(FsmState returnState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Expected O, but got Unknown //IL_0153: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Expected O, but got Unknown //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Expected O, but got Unknown //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Expected O, but got Unknown //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Expected O, but got Unknown //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown //IL_01e9: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Expected O, but got Unknown //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SetLayer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, layer = LayerMask.NameToLayer("Enemies") }); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("EnableBossHaze") { Value = "EnableBossHaze" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(1f)), finishEvent = FsmEvent.Finished }); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("EndBigSilkBallPhaseEffects") { Value = "EndBigSilkBallPhaseEffects" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" } }, sendEvent = new FsmString("BIG SILK BALL UNLOCK") { Value = "BIG SILK BALL UNLOCK" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" } }, sendEvent = new FsmString("ATTACK START") { Value = "ATTACK START" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); returnState.Actions = list.ToArray(); } private void AddBigSilkBallRoarActions(FsmState roarState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Expected O, but got Unknown //IL_0131: Expected O, but got Unknown //IL_0136: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Expected O, but got Unknown //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("BeginBigSilkBallPhaseEffects") { Value = "BeginBigSilkBallPhaseEffects" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Tk2dPlayAnimationWithEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Roar") { Value = "Roar" }, animationTriggerEvent = FsmEvent.Finished }); PlayAudioEventRandom val2 = _attackControlBehavior?.CloneActionFromAttackControlFSM("Roar", 0, (Func?)null); if (val2 != null) { list.Add((FsmStateAction)(object)val2); } else { Log.Warn("无法克隆PlayAudioEventRandom动作,使用默认配置"); } if ((Object)(object)_hairTransform != (Object)null) { list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)_hairTransform).gameObject } } }, sendEvent = new FsmString("ROAR") { Value = "ROAR" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); } roarState.Actions = list.ToArray(); } [IteratorStateMachine(typeof(d__13))] private IEnumerator DelayedAddBigSilkBallRoarActions(FsmState roarState) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__13(0) { <>4__this = this, roarState = roarState }; } private void AddBigSilkBallRoarEndActions(FsmState roarEndState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_0096: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_00d3: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = FsmVector2.op_Implicit(new Vector2(0f, 0f)), x = new FsmFloat { UseVariable = false }, y = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SendEventToRegister { eventName = new FsmString("ATTACK CLEAR") { Value = "ATTACK CLEAR" } }); list.Add((FsmStateAction)new SendEventToRegisterDelay { delay = new FsmFloat(FsmFloat.op_Implicit(0.6f)), EventName = new FsmString("ATTACK CLEAR") { Value = "ATTACK CLEAR" } }); list.Add((FsmStateAction)new Tk2dWatchAnimationEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animationCompleteEvent = FsmEvent.Finished, animationTriggerEvent = FsmEvent.Finished }); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.5f)), finishEvent = FsmEvent.Finished }); roarEndState.Actions = list.ToArray(); } private void AddBigSilkBallTransitions(FsmState prepareState, FsmState moveToCenterState, FsmState spawnState, FsmState waitState, FsmState endState, FsmState returnState, FsmState p3State, FsmState roarState, FsmState roarEndState) { FsmStateBuilder.SetFinishedTransition(roarState, roarEndState); FsmStateBuilder.SetFinishedTransition(roarEndState, prepareState); FsmStateBuilder.SetFinishedTransition(prepareState, moveToCenterState); FsmStateBuilder.SetFinishedTransition(moveToCenterState, spawnState); FsmStateBuilder.SetFinishedTransition(spawnState, waitState); waitState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("BIG SILK BALL COMPLETE"), endState) }; FsmStateBuilder.SetFinishedTransition(endState, returnState); FsmStateBuilder.SetFinishedTransition(returnState, p3State); Log.Info("已设置大招状态转换: Roar -> Roar End -> Prepare -> Move To Center -> Spawn -> Wait -> End -> Return -> P3"); } public void BeginBigSilkBallPhaseEffects() { if ((Object)(object)_bigSilkBallManager == (Object)null) { GetBigSilkBallManager(); } _bigSilkBallManager?.BeginBigSilkBallPhase("normal roar"); PlayMakerFSM? attackControl = _attackControl; if (attackControl != null) { Fsm fsm = attackControl.Fsm; if (fsm != null) { fsm.KillDelayedEvents(); } } PlayMakerFSM? attackControl2 = _attackControl; if (attackControl2 != null) { attackControl2.SendEvent("ATTACK STOP"); } EventRegister.SendEvent("ATTACK CLEAR", (GameObject)null); if ((Object)(object)_attackControlBehavior == (Object)null) { _attackControlBehavior = ((Component)this).gameObject.GetComponent(); } _attackControlBehavior?.SuppressWebStrandAttacksForBigSilkBall(); } public void EndBigSilkBallPhaseEffects() { _bigSilkBallManager?.EndBigSilkBallPhase("normal return"); } private void RegisterBigSilkBallEvents() { FsmStateBuilder.RegisterEvents(_phaseControl, "START BIG SILK BALL", "BIG SILK BALL COMPLETE", "BIG SILK BALL LOCK", "BIG SILK BALL UNLOCK"); Log.Info("大招事件注册完成(START, COMPLETE, LOCK, UNLOCK)"); } public void SendEventToAllFingerBlades(object eventNameObj) { string text = eventNameObj?.ToString() ?? ""; Log.Info($"接收到参数: {eventNameObj}, 转换为字符串: {text}"); GameObject[] allFingerBlades = _allFingerBlades; foreach (GameObject val in allFingerBlades) { if ((Object)(object)val != (Object)null) { PlayMakerFSM component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.SendEvent(text); Log.Info("向" + ((Object)val).name + "发送:" + text); } } } } public void SendSilkStunnedToAllFingerBlades() { SendEventToAllFingerBlades("SILK STUNNED"); } public void SendBladesReturnToAllFingerBlades() { SendEventToAllFingerBlades("BLADES RETURN"); } public void SendBladesReturnDelay() { ((MonoBehaviour)this).StartCoroutine(SendBladesReturnDelayCoroutine()); } [IteratorStateMachine(typeof(d__23))] private IEnumerator SendBladesReturnDelayCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__23(0) { <>4__this = this }; } public void ResetFingerBladesOnClimbComplete() { GameObject[] allFingerBlades = _allFingerBlades; foreach (GameObject val in allFingerBlades) { if (!((Object)(object)val != (Object)null)) { continue; } PlayMakerFSM component = val.GetComponent(); if ((Object)(object)component != (Object)null) { FsmBool fsmBool = component.FsmVariables.GetFsmBool("Ready"); if (fsmBool != null) { fsmBool.Value = false; } Log.Info("重置Finger Blade " + ((Object)val).name + " Ready标志"); } } } public void SaveOriginalLayer() { _originalLayer = ((Component)this).gameObject.layer; Log.Info($"保存Boss原始图层: {_originalLayer}"); } public void RestoreOriginalLayer() { ((Component)this).gameObject.layer = _originalLayer; Log.Info($"恢复Boss图层: {_originalLayer}"); } public void SpawnBigSilkBall() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_bigSilkBallManager == (Object)null) { Log.Error("BigSilkBallManager 未初始化,无法生成大丝球"); return; } if (_bigSilkBallTriggered) { Log.Warn("大丝球已经触发过,跳过生成"); return; } _bigSilkBallTriggered = true; Vector3 position = ((Component)this).gameObject.transform.position; _currentBigSilkBall = _bigSilkBallManager.SpawnBigSilkBall(position, ((Component)this).gameObject); if ((Object)(object)_currentBigSilkBall != (Object)null) { Log.Info($"大丝球生成成功,位置: {position}"); } else { Log.Error("大丝球生成失败"); } } public void StartBigSilkBallCharge() { if ((Object)(object)_currentBigSilkBall == (Object)null) { Log.Error("大丝球不存在,无法启动蓄力"); return; } BigSilkBallBehavior component = _currentBigSilkBall.GetComponent(); if ((Object)(object)component != (Object)null) { Log.Info("启动大丝球蓄力"); component.StartCharge(); } else { Log.Error("大丝球缺少 BigSilkBallBehavior 组件"); } } [IteratorStateMachine(typeof(d__29))] private IEnumerator DelayedStartCharge() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__29(0) { <>4__this = this }; } public void OnBigSilkBallEvent(string eventName) { Log.Info("收到大丝球事件: " + eventName); if (!(eventName == "ChargeComplete")) { if (eventName == "BurstComplete") { _burstComplete = true; Log.Info("大丝球爆炸完成"); } else { Log.Warn("未知的大丝球事件: " + eventName); } } else { _chargeComplete = true; Log.Info("大丝球蓄力完成"); } } public void WaitForBigSilkBallComplete() { ((MonoBehaviour)this).StartCoroutine(WaitForBigSilkBallCompleteCoroutine()); } [IteratorStateMachine(typeof(d__32))] private IEnumerator WaitForBigSilkBallCompleteCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__32(0) { <>4__this = this }; } public void SaveBossOriginalState() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) _originalBossZ = ((Component)this).transform.position.z; _originalBossScale = ((Component)this).transform.localScale; Log.Info($"保存BOSS原始状态 - Z轴: {_originalBossZ:F4}, Scale: {_originalBossScale}"); if ((Object)(object)_hairTransform == (Object)null && (Object)(object)((Component)this).transform.parent != (Object)null) { _hairTransform = ((Component)this).transform.parent.Find("Silk_Hair"); if ((Object)(object)_hairTransform == (Object)null) { Log.Warn("未找到 Silk_Hair 物体(可能名称不同或不存在)"); } } if ((Object)(object)_hairTransform != (Object)null) { _originalHairZ = _hairTransform.position.z; _originalHairScale = _hairTransform.localScale; Log.Info($"保存Hair原始状态 - Z轴: {_originalHairZ:F4}, Scale: {_originalHairScale}"); } } public void StartBossTransformAnimation() { ((MonoBehaviour)this).StartCoroutine(AnimateBossTransform()); } [IteratorStateMachine(typeof(d__35))] private IEnumerator AnimateBossTransform() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__35(0) { <>4__this = this }; } public void RestoreBossTransform() { ((MonoBehaviour)this).StartCoroutine(RestoreBossTransformCoroutine()); } public void DisableBossHaze() { if ((Object)(object)_bossHaze != (Object)null) { _bossHaze.SetActive(false); Log.Info("已禁用 haze2 (7)"); } else { Log.Warn("_bossHaze 为 null,无法禁用"); } if ((Object)(object)_bossHaze2 != (Object)null) { _bossHaze2.SetActive(false); Log.Info("已禁用 haze2 (8)"); } else { Log.Warn("_bossHaze2 为 null,无法禁用"); } } public void EnableBossHaze() { if ((Object)(object)_bossHaze != (Object)null) { _bossHaze.SetActive(true); Log.Info("已恢复 haze2 (7)"); } else { Log.Warn("_bossHaze 为 null,无法恢复"); } if ((Object)(object)_bossHaze2 != (Object)null) { _bossHaze2.SetActive(true); Log.Info("已恢复 haze2 (8)"); } else { Log.Warn("_bossHaze2 为 null,无法恢复"); } } [IteratorStateMachine(typeof(d__39))] private IEnumerator RestoreBossTransformCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__39(0) { <>4__this = this }; } private void GetBossControlFSM() { _bossControl = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Control"); if ((Object)(object)_bossControl == (Object)null) { Log.Error("未找到 Boss Control FSM"); } else { Log.Info("成功获取 Boss Control FSM"); } } private void AddClimbPhaseStates() { if ((Object)(object)_phaseControl == (Object)null) { Log.Error("Phase Control FSM 未初始化,无法添加爬升阶段"); return; } Log.Info("=== 开始添加爬升阶段状态序列 ==="); FsmState val = FsmStateBuilder.FindState(_phaseControl, "Stagger Pause"); FsmState val2 = FsmStateBuilder.FindState(_phaseControl, "Set P4"); if (val == null) { Log.Error("未找到 Stagger Pause 状态"); return; } if (val2 == null) { Log.Error("未找到 Set P4 状态"); return; } RegisterClimbPhaseEvents(); CreateClimbPhaseVariables(); FsmState[] array = FsmStateBuilder.CreateStates(_phaseControl.Fsm, ("Climb Init Catch", "硬控玩家并移动到地面"), ("Climb Wait Roar", "等待Boss吼叫完成"), ("Climb Silk Activate", "激活丝线缠绕"), ("Climb Catch Effect", "播放音频、隐藏玩家、激活替身"), ("Climb Player Prepare", "恢复玩家重力和显示"), ("Climb Phase Player Control", "玩家动画控制"), ("Climb Phase Boss Active", "Boss漫游+玩家进度监控"), ("Climb Phase Complete", "爬升阶段完成")); FsmState val3 = array[0]; FsmState val4 = array[1]; FsmState val5 = array[2]; FsmState catchEffectState = array[3]; FsmState val6 = array[4]; FsmState playerControlState = array[5]; FsmState bossActiveState = array[6]; FsmState completeState = array[7]; FsmStateBuilder.AddStatesToFsm(_phaseControl, array); ModifyStaggerPauseTransition(val, val3); AddClimbInitCatchActions(val3); AddClimbWaitRoarActions(val4); AddClimbSilkActivateActions(val5); AddClimbCatchEffectActions(catchEffectState); AddClimbPlayerPrepareActions(val6); AddClimbPhasePlayerControlActions(playerControlState); AddClimbPhaseBossActiveActions(bossActiveState); AddClimbPhaseCompleteActions(completeState); AddClimbPhaseTransitionsNew(val3, val4, val5, catchEffectState, val6, playerControlState, bossActiveState, completeState, val2); Log.Info("=== 爬升阶段状态序列添加完成 ==="); } private void RegisterClimbPhaseEvents() { FsmStateBuilder.RegisterEvents(_phaseControl, "CLIMB PHASE START", "CLIMB PHASE END", "CLIMB PHASE ATTACK", "CLIMB COMPLETE", "CLIMB ROAR START", "CLIMB ROAR DONE"); Log.Info("爬升阶段事件注册完成(含Roar协同事件)"); } private void CreateClimbPhaseVariables() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown List list = _phaseControl.FsmVariables.BoolVariables.ToList(); if (!list.Any((FsmBool v) => ((NamedVariable)v).Name == "Climb Phase Active")) { FsmBool item = new FsmBool("Climb Phase Active") { Value = false }; list.Add(item); _phaseControl.FsmVariables.BoolVariables = list.ToArray(); Log.Info("创建 Climb Phase Active 变量"); } if (!list.Any((FsmBool v) => ((NamedVariable)v).Name == "Special Attack")) { FsmBool item2 = new FsmBool("Special Attack") { Value = false }; list.Add(item2); _phaseControl.FsmVariables.BoolVariables = list.ToArray(); Log.Info("创建 Special Attack 变量(用于Phase2特殊攻击)"); } } private void ModifyStaggerPauseTransition(FsmState staggerPauseState, FsmState climbInitState) { FsmTransition[] transitions = staggerPauseState.Transitions; foreach (FsmTransition val in transitions) { if (val.toState == "BG Break Sequence") { val.toState = "Climb Init Catch"; val.toFsmState = climbInitState; Log.Info("已修改 Stagger Pause -> Climb Init Catch"); } } } private void AddClimbInitCatchActions(FsmState initState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_005f: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_00f5: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Expected O, but got Unknown //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Expected O, but got Unknown //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Expected O, but got Unknown //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Expected O, but got Unknown //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Expected O, but got Unknown //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" } }, sendEvent = new FsmString("ATTACK STOP") { Value = "ATTACK STOP" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" } }, sendEvent = new FsmString("CLIMB ROAR START") { Value = "CLIMB ROAR START" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SetLayer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, layer = 2 }); list.Add((FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Phase Control") { Value = "Phase Control" }, variableName = new FsmString("Climb Phase Active") { Value = "Climb Phase Active" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished }); initState.Actions = list.ToArray(); } private void AddClimbWaitRoarActions(FsmState waitState) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_0078: Expected O, but got Unknown List list = new List(); if (_fsmHero != null) { list.Add((FsmStateAction)new Tk2dPlayAnimation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _fsmHero }, animLibName = new FsmString("") { Value = "" }, clipName = new FsmString("Roar Lock") { Value = "Roar Lock" } }); } else { Log.Warn("AddClimbWaitRoarActions: _fsmHero 为空,跳过玩家动画"); } waitState.Actions = list.ToArray(); } private void AddClimbSilkActivateActions(FsmState silkState) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Expected O, but got Unknown //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Expected O, but got Unknown //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Expected O, but got Unknown //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Expected O, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Expected O, but got Unknown //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Expected O, but got Unknown //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Expected O, but got Unknown //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Expected O, but got Unknown //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Expected O, but got Unknown //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Expected O, but got Unknown //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Expected O, but got Unknown //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Expected O, but got Unknown //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Expected O, but got Unknown //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Expected O, but got Unknown //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Expected O, but got Unknown //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Expected O, but got Unknown //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Expected O, but got Unknown //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Expected O, but got Unknown //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Expected O, but got Unknown //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Expected O, but got Unknown //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Expected O, but got Unknown List list = new List(); if (_fsmHero == null || _fsmHeroX == null || _fsmHeroY == null) { Log.Error("FSM变量未初始化,无法添加丝线激活动作"); silkState.Actions = (FsmStateAction[])(object)new FsmStateAction[0]; return; } CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("DisablePlayerInputAfterRoar") { Value = "DisablePlayerInputAfterRoar" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; list.Add((FsmStateAction)(object)val); float num = 12.5f; float[] array = new float[5] { 0f, 0f - num, num, 0f - num, num }; float[] array2 = new float[5] { num, num, num, 0f - num, 0f - num }; float[] array3 = new float[5] { 180f, 45f, -45f, 135f, -135f }; list.Add((FsmStateAction)new GetPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _fsmHero }, vector = new FsmVector3(), x = _fsmHeroX, y = _fsmHeroY, z = new FsmFloat(), space = (Space)0, everyFrame = false }); for (int i = 0; i < 5; i++) { if (_fsmSilkYankClones[i] != null) { FsmFloat val2 = new FsmFloat($"SilkYank_PosX_{i}"); FsmFloat val3 = new FsmFloat($"SilkYank_PosY_{i}"); list.Add((FsmStateAction)new FloatOperator { float1 = _fsmHeroX, float2 = new FsmFloat(FsmFloat.op_Implicit(array[i])), operation = (Operation)0, storeResult = val2, everyFrame = false }); list.Add((FsmStateAction)new FloatOperator { float1 = _fsmHeroY, float2 = new FsmFloat(FsmFloat.op_Implicit(array2[i])), operation = (Operation)0, storeResult = val3, everyFrame = false }); list.Add((FsmStateAction)new SetPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _fsmSilkYankClones[i] }, vector = new FsmVector3(), x = val2, y = val3, z = new FsmFloat(FsmFloat.op_Implicit(0f)), space = (Space)0, everyFrame = false }); list.Add((FsmStateAction)new SetRotation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _fsmSilkYankClones[i] }, quaternion = new FsmQuaternion(), vector = new FsmVector3(), xAngle = new FsmFloat(FsmFloat.op_Implicit(0f)), yAngle = new FsmFloat(FsmFloat.op_Implicit(0f)), zAngle = new FsmFloat(FsmFloat.op_Implicit(array3[i])), space = (Space)0, everyFrame = false }); list.Add((FsmStateAction)new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _fsmSilkYankClones[i] }, activate = new FsmBool(FsmBool.op_Implicit(true)), recursive = new FsmBool(FsmBool.op_Implicit(false)), resetOnExit = false, everyFrame = false }); } } list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.3f)), finishEvent = FsmEvent.Finished }); silkState.Actions = list.ToArray(); Log.Info("丝线激活动作已添加(使用FSM原生Action)"); } private void AddClimbCatchEffectActions(FsmState catchEffectState) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Expected O, but got Unknown //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Expected O, but got Unknown //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) List list = new List(); if (_fsmHero != null && _fsmWebStrandCatchEffect != null) { list.Add((FsmStateAction)new SetPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _fsmWebStrandCatchEffect, gameObject = FsmGameObject.op_Implicit(_webStrandCatchEffect) }, vector = new FsmVector3(), x = (FsmFloat)(((object)_fsmHeroX) ?? ((object)new FsmFloat { UseVariable = false, Value = 0f })), y = (FsmFloat)(((object)_fsmHeroY) ?? ((object)new FsmFloat { UseVariable = false, Value = 0f })), z = new FsmFloat { UseVariable = false, Value = 0.006f }, space = (Space)0, everyFrame = false }); list.Add((FsmStateAction)new SetMeshRenderer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _fsmHero }, active = FsmBool.op_Implicit(false) }); list.Add((FsmStateAction)new MatchScaleSign { Target = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _fsmWebStrandCatchEffect }, MatchTo = _fsmHero, active = false }); list.Add((FsmStateAction)new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = _fsmWebStrandCatchEffect, GameObject = FsmGameObject.op_Implicit(_webStrandCatchEffect) }, activate = new FsmBool(FsmBool.op_Implicit(true)) { Value = true }, recursive = new FsmBool(FsmBool.op_Implicit(false)) { Value = false }, resetOnExit = false, everyFrame = false }); } else { Log.Warn("Climb Catch Effect: _fsmHero 或 _fsmWebStrandCatchEffect 为 null,跳过视觉效果设置"); } list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(1.5f)), finishEvent = FsmEvent.Finished }); catchEffectState.Actions = list.ToArray(); ((MonoBehaviour)this).StartCoroutine(DelayedAddClimbCatchAudioActions(catchEffectState)); } [IteratorStateMachine(typeof(d__49))] private IEnumerator DelayedAddClimbCatchAudioActions(FsmState catchEffectState) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__49(0) { <>4__this = this, catchEffectState = catchEffectState }; } private void AddClimbPlayerPrepareActions(FsmState prepareState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("PreparePlayerForFall") { Value = "PreparePlayerForFall" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.2f)), finishEvent = FsmEvent.Finished }); prepareState.Actions = list.ToArray(); } private void AddClimbPhasePlayerControlActions(FsmState playerControlState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartClimbPhasePlayerAnimation") { Value = "StartClimbPhasePlayerAnimation" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(1.5f)), finishEvent = FsmEvent.Finished }); playerControlState.Actions = list.ToArray(); } private void AddClimbPhaseBossActiveActions(FsmState bossActiveState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_005f: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" } }, sendEvent = new FsmString("CLIMB PHASE START") { Value = "CLIMB PHASE START" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SendBladesReturnDelay") { Value = "SendBladesReturnDelay" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("MonitorPlayerClimbProgress") { Value = "MonitorPlayerClimbProgress" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = true; list.Add((FsmStateAction)(object)val); bossActiveState.Actions = list.ToArray(); } private void AddClimbPhaseCompleteActions(FsmState completeState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected O, but got Unknown //IL_013e: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Expected O, but got Unknown //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Expected O, but got Unknown //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Expected O, but got Unknown //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Expected O, but got Unknown //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Expected O, but got Unknown //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Expected O, but got Unknown //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Expected O, but got Unknown //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Expected O, but got Unknown //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SetLayer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, layer = 11 }); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("RestoreBossZPosition") { Value = "RestoreBossZPosition" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Phase Control") { Value = "Phase Control" }, variableName = new FsmString("Climb Phase Active") { Value = "Climb Phase Active" }, setValue = new FsmBool(FsmBool.op_Implicit(false)), everyFrame = false }); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" } }, sendEvent = new FsmString("CLIMB PHASE END") { Value = "CLIMB PHASE END" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SendEventToRegister { eventName = FsmString.op_Implicit("BLADES RETURN") }); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("MoveBossBackToArena") { Value = "MoveBossBackToArena" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ResetClimbPhaseFlags") { Value = "ResetClimbPhaseFlags" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(2.5f)), finishEvent = FsmEvent.Finished }); completeState.Actions = list.ToArray(); } private void AddClimbPhaseTransitionsNew(FsmState initCatchState, FsmState waitRoarState, FsmState silkActivateState, FsmState catchEffectState, FsmState playerPrepareState, FsmState playerControlState, FsmState bossActiveState, FsmState completeState, FsmState setP4State) { FsmStateBuilder.SetFinishedTransition(initCatchState, waitRoarState); waitRoarState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB ROAR DONE"), silkActivateState) }; FsmStateBuilder.SetFinishedTransition(silkActivateState, catchEffectState); FsmStateBuilder.SetFinishedTransition(catchEffectState, playerPrepareState); FsmStateBuilder.SetFinishedTransition(playerPrepareState, playerControlState); FsmStateBuilder.SetFinishedTransition(playerControlState, bossActiveState); bossActiveState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB COMPLETE"), completeState) }; FsmStateBuilder.SetFinishedTransition(completeState, setP4State); Log.Info("爬升阶段转换设置完成(新流程)"); } private GameObject? GetHeroGameObject() { FsmGameObject fsmGameObject = FsmVariables.GlobalVariables.GetFsmGameObject("Hero"); if (fsmGameObject != null && (Object)(object)fsmGameObject.Value != (Object)null) { return fsmGameObject.Value; } HeroController instance = HeroController.instance; return (instance != null) ? ((Component)instance).gameObject : null; } private bool HasAnimationClip(tk2dSpriteAnimator animator, string clipName) { string clipName2 = clipName; if ((Object)(object)animator == (Object)null || (Object)(object)animator.Library == (Object)null) { return false; } return animator.Library.clips.Any((tk2dSpriteAnimationClip c) => c.name == clipName2); } private bool TryPlayAnimation(tk2dSpriteAnimator animator, string clipName) { if ((Object)(object)animator == (Object)null) { return false; } if (!HasAnimationClip(animator, clipName)) { Log.Warn("动画 '" + clipName + "' 不存在,跳过播放(小骑士MOD兼容)"); return false; } animator.Play(clipName); return true; } public void DisablePlayerInputAfterRoar() { //IL_0090: Unknown result type (might be due to invalid IL or missing references) GameObject heroGameObject = GetHeroGameObject(); if ((Object)(object)heroGameObject == (Object)null) { Log.Error("DisablePlayerInputAfterRoar: 无法获取玩家对象"); return; } HeroController instance = HeroController.instance; if ((Object)(object)instance == (Object)null) { Log.Error("DisablePlayerInputAfterRoar: HeroController.instance 为空"); return; } Rigidbody2D component = heroGameObject.GetComponent(); GameManager instance2 = GameManager._instance; if (instance2 != null) { InputHandler inputHandler = instance2.inputHandler; if (inputHandler != null) { inputHandler.StopAcceptingInput(); } } instance.RelinquishControl(); instance.StopAnimationControl(); instance.AffectedByGravity(false); if ((Object)(object)component != (Object)null) { component.linearVelocity = Vector2.zero; } PlayerData instance3 = PlayerData.instance; if (instance3 != null) { instance3.SetBool("isInvincible", true); } Log.Info("Roar结束后禁用玩家输入完成,开始平滑移动到地面"); ((MonoBehaviour)this).StartCoroutine(AnimatePlayerToGround(heroGameObject)); } [IteratorStateMachine(typeof(d__59))] private IEnumerator AnimatePlayerToGround(GameObject heroObj) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__59(0) { <>4__this = this, heroObj = heroObj }; } public void ActivateSilkYankForClimb() { ActivateSilkYankAnimation(); Log.Info("激活丝线缠绕动画(爬升阶段)"); } public void PreparePlayerForFall() { GameObject heroGameObject = GetHeroGameObject(); HeroController instance = HeroController.instance; if ((Object)(object)heroGameObject == (Object)null || (Object)(object)instance == (Object)null) { Log.Error("PreparePlayerForFall: 无法获取玩家对象"); return; } instance.AffectedByGravity(true); MeshRenderer component = heroGameObject.GetComponent(); if ((Object)(object)component != (Object)null) { ((Renderer)component).enabled = true; Log.Info("英雄MeshRenderer已恢复显示"); } DeactivateCatchEffect(); DeactivateSilkYankAnimation(); Log.Info("玩家准备下落:重力已恢复,替身已禁用,丝线已禁用"); } private void DeactivateCatchEffect() { GameObject val = GameObject.Find("Boss Scene"); if ((Object)(object)val != (Object)null) { Transform val2 = val.transform.Find("Web Strand Catch Effect"); if ((Object)(object)val2 != (Object)null) { ((Component)val2).gameObject.SetActive(false); Log.Info("Web Strand Catch Effect已禁用"); } } } public void StartClimbPhasePlayerAnimation() { ((MonoBehaviour)this).StartCoroutine(ClimbPhasePlayerAnimationCoroutine()); } [IteratorStateMachine(typeof(d__64))] private IEnumerator ClimbPhasePlayerAnimationCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__64(0) { <>4__this = this }; } public void MonitorPlayerClimbProgress() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) if (_climbCompleteEventSent) { return; } GameObject heroGameObject = GetHeroGameObject(); if ((Object)(object)heroGameObject == (Object)null) { return; } Vector3 position = heroGameObject.transform.position; if (position.x < 2f) { heroGameObject.transform.position = new Vector3(2f, position.y, position.z); Rigidbody2D component = heroGameObject.GetComponent(); if ((Object)(object)component != (Object)null && component.linearVelocity.x < 0f) { component.linearVelocity = new Vector2(0f, component.linearVelocity.y); } } else if (position.x > 78f) { heroGameObject.transform.position = new Vector3(78f, position.y, position.z); Rigidbody2D component2 = heroGameObject.GetComponent(); if ((Object)(object)component2 != (Object)null && component2.linearVelocity.x > 0f) { component2.linearVelocity = new Vector2(0f, component2.linearVelocity.y); } } HandleCollapseGateDuringClimb(position.x); if (position.y >= 133.5f && !_climbCompleteEventSent) { _climbCompleteEventSent = true; _climbPhaseCompleted = true; if ((Object)(object)_attackControl != (Object)null && !_climbAttackEventSent) { _attackControl.SendEvent("CLIMB PHASE ATTACK"); _climbAttackEventSent = true; Log.Info("玩家提前爬到顶,补发 CLIMB PHASE ATTACK 事件"); } _phaseControl.SendEvent("CLIMB COMPLETE"); Log.Info("玩家到达目标高度,爬升阶段完成,发送 CLIMB COMPLETE 事件"); ((MonoBehaviour)this).StartCoroutine(MonitorPlayerXForCollapseGate()); } } private void HandleCollapseGateDuringClimb(float playerX) { if ((Object)(object)_collapseGate == (Object)null) { GameObject val = GameObject.Find("Boss Scene"); if ((Object)(object)val != (Object)null) { Transform val2 = val.transform.Find("Battle Gate"); if ((Object)(object)val2 != (Object)null) { Transform obj = val2.Find("boss_scene_collapse_gate"); _collapseGate = ((obj != null) ? ((Component)obj).gameObject : null); Log.Info("找到collapse_gate: " + (((Object)(object)_collapseGate != (Object)null) ? "成功" : "失败")); } } } if ((Object)(object)_collapseGate == (Object)null) { return; } if (!_collapseGateDisabled) { _collapseGate.SetActive(false); Animator component = _collapseGate.GetComponent(); if ((Object)(object)component != (Object)null) { ((Behaviour)component).enabled = false; } _collapseGateDisabled = true; Log.Info("已禁用collapse_gate和其Animator"); } if (_climbPhaseCompleted && playerX > 20f && !_collapseGate.activeSelf) { _collapseGate.SetActive(true); Animator component2 = _collapseGate.GetComponent(); if ((Object)(object)component2 != (Object)null) { ((Behaviour)component2).enabled = false; } Log.Info($"玩家X > 20,恢复collapse_gate GameObject(X={playerX:F2}),但Animator仍禁用"); } } public void ResetClimbPhaseFlags() { _climbCompleteEventSent = false; _climbAttackEventSent = false; _climbPhaseCompleted = false; _collapseGateDisabled = false; Log.Info("爬升阶段标志已重置"); } public void RestoreBossZPosition() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)this).transform.position; position.z = 0.01f; ((Component)this).transform.position = position; Log.Info($"恢复Boss Z轴到0.01,当前位置: {((Component)this).transform.position}"); } public void MoveBossBackToArena() { ((MonoBehaviour)this).StartCoroutine(MoveBossBackToArenaCoroutine()); } [IteratorStateMachine(typeof(d__73))] private IEnumerator MoveBossBackToArenaCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__73(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__74))] private IEnumerator MonitorPlayerXForCollapseGate() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__74(0) { <>4__this = this }; } private void ActivateSilkYankAnimation() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) if (!_silkYankInitialized || (Object)(object)_silkYankClones[0] == (Object)null) { Log.Error("丝线缠绕未初始化,无法启用动画"); return; } GameObject heroGameObject = GetHeroGameObject(); if ((Object)(object)heroGameObject == (Object)null) { Log.Error("无法获取玩家对象,无法启用丝线缠绕"); return; } Vector3 position = heroGameObject.transform.position; float num = 10f; Vector3[] array = (Vector3[])(object)new Vector3[5] { position + new Vector3(0f, num, 0f), position + new Vector3(0f - num, num, 0f), position + new Vector3(num, num, 0f), position + new Vector3(0f - num, 0f - num, 0f), position + new Vector3(num, 0f - num, 0f) }; float[] array2 = new float[5] { 180f, -45f, -135f, 45f, 135f }; for (int i = 0; i < 5; i++) { if ((Object)(object)_silkYankClones[i] != (Object)null) { _silkYankClones[i].transform.position = array[i]; _silkYankClones[i].transform.rotation = Quaternion.Euler(0f, 0f, array2[i]); _silkYankClones[i].SetActive(true); Log.Info($"启用丝线缠绕 {i}: 位置={array[i]}, 旋转={array2[i]}°"); } } Log.Info("丝线缠绕动画启用完成(5个位置)"); } private void DeactivateSilkYankAnimation() { for (int i = 0; i < 5; i++) { if ((Object)(object)_silkYankClones[i] != (Object)null) { _silkYankClones[i].SetActive(false); } } Log.Info("丝线缠绕动画已禁用"); } [IteratorStateMachine(typeof(d__77))] private IEnumerator UpdateSilkYankPositions(float duration) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__77(0) { <>4__this = this, duration = duration }; } private void Awake() { } private void Start() { ((MonoBehaviour)this).StartCoroutine(DelayedSetup()); } private void OnDisable() { (_bigSilkBallManager ?? BigSilkBallManager.Instance)?.ResetBigSilkBallPhaseEffects("normal phase control disabled"); } private void OnDestroy() { (_bigSilkBallManager ?? BigSilkBallManager.Instance)?.ResetBigSilkBallPhaseEffects("normal phase control destroyed"); } [IteratorStateMachine(typeof(d__118))] private IEnumerator DelayedSetup() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__118(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__119))] private IEnumerator SetupPhaseControl() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__119(0) { <>4__this = this }; } private void GetComponents() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Expected O, but got Unknown _phaseControl = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Phase Control"); if ((Object)(object)_phaseControl == (Object)null) { Log.Error("未找到Phase Control FSM"); return; } Log.Info("成功获取Phase Control FSM"); _bossPhaseIndex = _phaseControl.FsmVariables.GetFsmInt("BossPhaseIndex"); if (_bossPhaseIndex == null) { _bossPhaseIndex = new FsmInt("BossPhaseIndex"); _bossPhaseIndex.Value = 0; List list = _phaseControl.FsmVariables.IntVariables.ToList(); list.Add(_bossPhaseIndex); _phaseControl.FsmVariables.IntVariables = list.ToArray(); Log.Info("创建了新的FSM变量: BossPhaseIndex"); } else { Log.Info("找到现有FSM变量: BossPhaseIndex"); } Transform val = ((Component)this).gameObject.transform.Find("haze2 (7)"); if ((Object)(object)val != (Object)null) { _bossHaze = ((Component)val).gameObject; } else { Log.Warn("未找到子物品 haze2 (7)"); } Transform val2 = ((Component)this).gameObject.transform.Find("haze2 (8)"); if ((Object)(object)val2 != (Object)null) { _bossHaze2 = ((Component)val2).gameObject; } else { Log.Warn("未找到子物品 haze2 (8)"); } _handLObj = GameObject.Find("Hand L"); _handRObj = GameObject.Find("Hand R"); if ((Object)(object)_handLObj != (Object)null) { int num = 0; string[] array = new string[3] { "Finger Blade L", "Finger Blade M", "Finger Blade R" }; foreach (string text in array) { Transform val3 = _handLObj.transform.Find(text); if ((Object)(object)val3 != (Object)null && num < 3) { _allFingerBlades[num++] = ((Component)val3).gameObject; } } } if ((Object)(object)_handRObj != (Object)null) { int num2 = 3; string[] array2 = new string[3] { "Finger Blade L", "Finger Blade M", "Finger Blade R" }; foreach (string text2 in array2) { Transform val4 = _handRObj.transform.Find(text2); if ((Object)(object)val4 != (Object)null && num2 < 6) { _allFingerBlades[num2++] = ((Component)val4).gameObject; } } } Log.Info($"PhaseControlBehavior已收集FingerBlades: {_allFingerBlades.Count((GameObject o) => (Object)(object)o != (Object)null)}"); _attackControl = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Attack Control"); if ((Object)(object)_attackControl == (Object)null) { Log.Error("未找到 AttackControl FSM"); } _bossScene = GameObject.Find("Boss Scene"); if ((Object)(object)_bossScene == (Object)null) { Log.Error("未找到 Boss Scene"); } else { Log.Info("成功获取 Boss Scene"); Transform val5 = _bossScene.transform.Find("Boss Title"); if ((Object)(object)val5 != (Object)null) { Transform val6 = ((Component)val5).transform.Find("Title Text"); if ((Object)(object)val6 != (Object)null) { Transform val7 = ((Component)val6).transform.Find("Silk_Title_Image"); Transform val8 = ((Component)val6).transform.Find("Silk_Title_Text"); if ((Object)(object)val7 != (Object)null && (Object)(object)val8 != (Object)null) { ((Component)val7).gameObject.SetActive(false); ((Component)val8).gameObject.SetActive(true); } } } else { Log.Warn("未找到 Boss Title"); } Transform val9 = _bossScene.transform.Find("Web Strand Catch Effect"); if ((Object)(object)val9 != (Object)null) { _webStrandCatchEffect = ((Component)val9).gameObject; _fsmWebStrandCatchEffect = new FsmGameObject("WebStrandCatchEffect") { Value = _webStrandCatchEffect }; } else { Log.Warn("未找到 Web Strand Catch Effect"); } } InitializeSilkYankInGetComponents(); } private void InitializeSilkYankInGetComponents() { //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_bossScene == (Object)null) { Log.Error("Boss Scene未获取,无法初始化丝线缠绕"); return; } try { Transform val = _bossScene.transform.Find("Spike Floors"); if ((Object)(object)val == (Object)null) { Log.Error("未找到 Spike Floors"); return; } Transform val2 = val.Find("Spike Floor 1"); if ((Object)(object)val2 == (Object)null) { Log.Error("未找到 Spike Floor 1"); return; } Transform val3 = val2.Find("Silk_yank"); if ((Object)(object)val3 == (Object)null) { Log.Error("未找到 Silk_yank"); return; } _silkYankPrefab = ((Component)val3).gameObject; for (int i = 0; i < 5; i++) { GameObject val4 = Object.Instantiate(_silkYankPrefab); ((Object)val4).name = $"Silk_yank_Clone_{i}"; val4.transform.SetParent((Transform)null); List list = new List(); for (int j = 0; j < val4.transform.childCount; j++) { Transform child = val4.transform.GetChild(j); if (!((Object)child).name.Equals("thread")) { list.Add(((Component)child).gameObject); } else { ((Component)child).transform.localPosition = new Vector3(0f, 0f, ((Component)child).transform.localPosition.z); } } foreach (GameObject item in list) { Object.Destroy((Object)(object)item); } val4.SetActive(false); _silkYankClones[i] = val4; } _silkYankInitialized = true; RegisterSilkYankFsmVariables(); } catch (Exception ex) { Log.Error("初始化丝线缠绕失败: " + ex.Message); } } private void RegisterSilkYankFsmVariables() { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown if (!((Object)(object)_phaseControl == (Object)null)) { List list = _phaseControl.FsmVariables.GameObjectVariables.ToList(); List list2 = _phaseControl.FsmVariables.FloatVariables.ToList(); string[] array = new string[5] { "SilkYank_Top", "SilkYank_TopLeft", "SilkYank_TopRight", "SilkYank_BottomLeft", "SilkYank_BottomRight" }; for (int i = 0; i < 5; i++) { _fsmSilkYankClones[i] = new FsmGameObject(array[i]); _fsmSilkYankClones[i].Value = _silkYankClones[i]; list.Add(_fsmSilkYankClones[i]); } _fsmHero = new FsmGameObject("SilkYank_Hero"); FsmGameObject? fsmHero = _fsmHero; HeroController instance = HeroController.instance; fsmHero.Value = ((instance != null) ? ((Component)instance).gameObject : null); list.Add(_fsmHero); _fsmHeroX = new FsmFloat("SilkYank_HeroX"); _fsmHeroY = new FsmFloat("SilkYank_HeroY"); list2.Add(_fsmHeroX); list2.Add(_fsmHeroY); _phaseControl.FsmVariables.GameObjectVariables = list.ToArray(); _phaseControl.FsmVariables.FloatVariables = list2.ToArray(); } } private void ModifyPhaseBehavior() { if (!((Object)(object)_phaseControl == (Object)null)) { ModifyPhaseHP(); ModifySetP4State(); ModifySetP6State(); Log.Info("阶段行为修改完成"); } } private void ModifySetP4State() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Expected O, but got Unknown //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown FsmState val = ((IEnumerable)_phaseControl.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Set P4")); if (val == null) { Log.Warn("未找到Set P4状态,跳过Special Attack设置"); return; } List list = val.Actions.ToList(); list.Insert(0, (FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Phase Control") { Value = "Phase Control" }, variableName = new FsmString("Special Attack") { Value = "Special Attack" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); list.Insert(1, (FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" }, variableName = new FsmString("Special Attack") { Value = "Special Attack" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); list.Insert(2, (FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Special Attack") { Value = "Special Attack" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); val.Actions = list.ToArray(); } private void ModifySetP6State() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown FsmState val = ((IEnumerable)_phaseControl.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Set P6")); if (val == null) { Log.Warn("未找到Set P6状态,跳过P6 Web Attack设置"); return; } List list = val.Actions.ToList(); list.Add((FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" }, variableName = new FsmString("Do P6 Web Attack") { Value = "Do P6 Web Attack" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); val.Actions = list.ToArray(); } private void ModifyPhaseHP() { if ((Object)(object)_phaseControl == (Object)null || _hpModified) { return; } AddBossHealth(100); for (int i = 1; i <= 6; i++) { string text = $"P{i} HP"; FsmInt fsmInt = _phaseControl.FsmVariables.GetFsmInt(text); if (fsmInt != null) { int value = fsmInt.Value; fsmInt.Value = value * 2; } else { Log.Warn("未找到变量: " + text); } } _hpModified = true; } public void SetPhaseHP(int phase, int hp) { if (!((Object)(object)_phaseControl == (Object)null) && phase >= 1 && phase <= 6) { string text = $"P{phase} HP"; FsmInt fsmInt = _phaseControl.FsmVariables.GetFsmInt(text); if (fsmInt != null) { fsmInt.Value = hp; } } } public void AddBossHealth(int healAmount = 200) { HealthManager component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { Log.Error("未找到 HealthManager 组件,无法回血"); } else { component.AddHP(healAmount, 1000); } } } internal class RubbleFieldBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__7 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public RubbleFieldBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this._fsm = ((Component)<>4__this).GetComponent(); if ((Object)(object)<>4__this._fsm == (Object)null) { Debug.LogWarning((object)"RubbleFieldBehavior: PlayMakerFSM not found."); return false; } <>4__this.AdjustScaleAndPosition(); <>4__this.ModifySetAttackState(); <>4__this.ModifyAnticState(); <>4__this.ModifyRockSpawnState(); <>4__this._fsm.Fsm.InitData(); <>4__this._fsm.FsmVariables.Init(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private PlayMakerFSM _fsm; private string _rockName1; private string _rockName2; private float _targetSpeed1 = -25f; private float _targetSpeed2 = -15f; private string objName; private void Start() { ((MonoBehaviour)this).StartCoroutine(ModifyFSM()); } [IteratorStateMachine(typeof(d__7))] private IEnumerator ModifyFSM() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__7(0) { <>4__this = this }; } private void ModifyIdleState() { } private void AdjustScaleAndPosition() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) objName = ((Object)((Component)this).gameObject).name; Vector3 localScale = ((Component)this).transform.localScale; Vector3 localPosition = ((Component)this).transform.localPosition; if (objName.Contains("Rubble Field M")) { localScale.x = 1.75f; } else if (objName.Contains("Rubble Field L")) { localScale.x = 2f; } else if (objName.Contains("Rubble Field R")) { localScale.x = 2f; } ((Component)this).transform.localScale = localScale; ((Component)this).transform.localPosition = localPosition; } private void ModifySetAttackState() { FsmState val = ((IEnumerable)_fsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Set Attack")); if (val != null) { SetFloatValue val2 = val.Actions.OfType().FirstOrDefault(); if (val2 != null) { val2.floatValue = FsmFloat.op_Implicit(3.5f); } } } private void ModifyAnticState() { FsmState val = ((IEnumerable)_fsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Antic")); if (val != null) { PlayParticleEmitterChildren val2 = val.Actions.OfType().FirstOrDefault(); if (val2 != null) { ((FsmStateAction)val2).Enabled = false; } } } private void ModifyRockSpawnState() { FsmState val = ((IEnumerable)_fsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Rock Spawn")); if (val == null) { return; } List list = val.Actions.ToList(); SpawnObjectFromGlobalPoolOverTimeV2[] array = list.OfType().ToArray(); if (array.Length != 0 && array[0] != null) { array[0].frequency = FsmFloat.op_Implicit(0.2f); array[0].scaleMin = FsmFloat.op_Implicit(0.5f); array[0].scaleMax = FsmFloat.op_Implicit(1.5f); if (objName.Contains("Rubble Field M") && array[0].originVariationX != null) { FsmFloat originVariationX = array[0].originVariationX; originVariationX.Value *= 1.5f; } else if (objName.Contains("Rubble Field L") && array[0].originVariationX != null) { FsmFloat originVariationX2 = array[0].originVariationX; originVariationX2.Value *= 2f; } else if (objName.Contains("Rubble Field R") && array[0].originVariationX != null) { FsmFloat originVariationX3 = array[0].originVariationX; originVariationX3.Value *= 2f; } if ((Object)(object)array[0].gameObject.Value != (Object)null) { _rockName1 = ((Object)array[0].gameObject.Value).name; } } if (array.Length > 1 && array[1] != null) { array[1].frequency = FsmFloat.op_Implicit(1f); array[1].scaleMin = FsmFloat.op_Implicit(0.6f); array[1].scaleMax = FsmFloat.op_Implicit(1f); if ((Object)(object)array[1].gameObject.Value != (Object)null) { _rockName2 = ((Object)array[1].gameObject.Value).name; } } FsmStateAction val2 = ((IEnumerable)list).FirstOrDefault((Func)((FsmStateAction a) => a is FadeNestedFadeGroup)); if (val2 != null) { list.Remove(val2); } ActivateGameObjectDelay val3 = val.Actions.OfType().FirstOrDefault(); if (val3 != null) { val3.activate = FsmBool.op_Implicit(false); } FsmStateAction val4 = ((IEnumerable)list).FirstOrDefault((Func)((FsmStateAction a) => a is AnimatePositionTo)); if (val4 != null) { list.Remove(val4); } val.Actions = list.ToArray(); } } internal class RubbleRockBehavior : MonoBehaviour { public float TargetSpeed = -19f; private static readonly string[] MidSpriteNames = new string[3] { "Sprite", "Sprite type 2", "Sprite type 3" }; private static readonly string[] LargeSpriteNames = new string[2] { "Sprite", "Sprite type 2" }; private static readonly MaterialPropertyBlock _mpb = new MaterialPropertyBlock(); private static bool TryOverrideSpriteMainTex(SpriteRenderer sr, Texture2D newAtlas, out string reason) { reason = ""; try { if ((Object)(object)sr == (Object)null) { reason = "sr null"; return false; } if ((Object)(object)newAtlas == (Object)null) { reason = "atlas null"; return false; } if ((Object)(object)((Renderer)sr).sharedMaterial == (Object)null) { reason = "sharedMaterial null"; return false; } if (!((Renderer)sr).sharedMaterial.HasProperty("_MainTex")) { reason = "material has no _MainTex"; return false; } ((Renderer)sr).GetPropertyBlock(_mpb); _mpb.SetTexture("_MainTex", (Texture)(object)newAtlas); ((Renderer)sr).SetPropertyBlock(_mpb); ((Renderer)sr).GetPropertyBlock(_mpb); Texture texture = _mpb.GetTexture("_MainTex"); if ((Object)(object)texture != (Object)(object)newAtlas) { reason = "mpb set but readback mismatch"; return false; } return true; } catch (Exception ex) { reason = ex.GetType().Name + ":" + ex.Message; return false; } } private void OnEnable() { ModifyDropState(); ReplaceBoulderSprites(); } private void ModifyDropState() { PlayMakerFSM val = ((IEnumerable)((Component)this).GetComponents()).FirstOrDefault((Func)((PlayMakerFSM fsm) => fsm.FsmName == "Control")); if ((Object)(object)val == (Object)null) { return; } FsmState val2 = ((IEnumerable)val.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Drop")); if (val2 != null) { AccelerateToY val3 = val2.Actions.OfType().FirstOrDefault(); if (val3 != null) { val3.targetSpeed = FsmFloat.op_Implicit(TargetSpeed); } } } private void ReplaceBoulderSprites() { //IL_01ab: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Plugin.BoulderTexture == (Object)null) { Log.Warn("Boulder 贴图未加载"); return; } Transform val = ((Component)this).transform.Find("boulder"); if ((Object)(object)val == (Object)null) { Log.Warn("无法找到 boulder"); return; } Transform val2 = val.Find("Sprites"); if ((Object)(object)val2 == (Object)null) { Log.Warn("无法找到 Sprites"); return; } bool flag = ((Object)((Component)this).gameObject).name.Contains("Large"); string[] array = (flag ? LargeSpriteNames : MidSpriteNames); string[] array2 = array; foreach (string text in array2) { Transform val3 = val2.Find(text); if ((Object)(object)val3 == (Object)null) { Log.Warn("无法找到 " + text); continue; } SpriteRenderer component = ((Component)val3).GetComponent(); if ((Object)(object)component == (Object)null) { Log.Warn("无法找到 " + text + " 的 SpriteRenderer 组件"); continue; } Sprite sprite = component.sprite; string reason; if ((Object)(object)sprite == (Object)null) { Log.Warn(text + " 的原始 Sprite 为 null"); } else if (!TryOverrideSpriteMainTex(component, Plugin.BoulderTexture, out reason)) { Log.Warn("[" + ((Object)((Component)this).gameObject).name + "] 覆盖 " + text + " 的 _MainTex 失败:" + reason); } else if (flag) { component.color = Color.white; } } } } internal class StunControlBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__4 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public StunControlBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__4(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SetupStunControl()); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__5 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public StunControlBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__5(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.GetComponents(); <>4__this.ModifyStunBehavior(); Log.Info("晕眩控制器行为初始化完成"); <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private PlayMakerFSM _stunControl = null; private void Awake() { } private void Start() { ((MonoBehaviour)this).StartCoroutine(DelayedSetup()); } private void Update() { } [IteratorStateMachine(typeof(d__4))] private IEnumerator DelayedSetup() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__4(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__5))] private IEnumerator SetupStunControl() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__5(0) { <>4__this = this }; } private void GetComponents() { _stunControl = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Stun Control"); if ((Object)(object)_stunControl == (Object)null) { Log.Error("未找到Stun Control FSM"); } else { Log.Info("成功获取Stun Control FSM"); } } private void ModifyStunBehavior() { if (!((Object)(object)_stunControl == (Object)null)) { _stunControl.FsmVariables.GetFsmInt("Stun Combo").Value = 22; _stunControl.FsmVariables.GetFsmInt("Stun Hit Max").Value = 22; } } } } namespace AnySilkBoss.Source.Behaviours.Memory { internal class MemoryAttackControlBehavior : MonoBehaviour { private class ClimbPinAttackConfig { public int PinCount = 12; public float SpawnHeightOffset = 2f; public float PinSpacing = 0.5f; public float AimOffset = 0.3f; public float AimWaitTime = 1f; public float FireInterval = 0.15f; public float FlightDuration = 4f; public float InitialRotation = -90f; } private enum BossZone { Left, Middle, Right } private class WebSlotInfo { public Vector3 Position; public float Angle; public SingleWebBehavior[] WebPair; public int CurrentWebIndex; public WebSlotInfo(Vector3 position, float angle) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) Position = position; Angle = angle; WebPair = new SingleWebBehavior[2]; CurrentWebIndex = 0; } } [CompilerGenerated] private sealed class d__185 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public WebSlotInfo slot; public bool audioEnabled; public MemoryAttackControlBehavior <>4__this; private int 5__1; private SingleWebBehavior 5__2; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__185(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) if (<>1__state != 0) { return false; } <>1__state = -1; if (BigSilkBallPhaseGuard.IsActive) { return false; } if ((Object)(object)<>4__this._singleWebManager == (Object)null) { Log.Warn("SingleWebManager未找到,无法激活web"); return false; } 5__1 = slot.CurrentWebIndex; if ((Object)(object)slot.WebPair[5__1] != (Object)null && !slot.WebPair[5__1].IsAvailable) { 5__1 = 1 - 5__1; } if ((Object)(object)slot.WebPair[5__1] == (Object)null || !slot.WebPair[5__1].IsAvailable) { 5__2 = <>4__this._singleWebManager.SpawnAndAttack(slot.Position, (Vector3?)new Vector3(0f, 0f, slot.Angle), (Vector3?)new Vector3(3.2f, 1f, 1f), 0f, <>4__this._burstDelay, audioEnabled); if ((Object)(object)5__2 != (Object)null) { slot.WebPair[5__1] = 5__2; slot.CurrentWebIndex = 5__1; } 5__2 = null; } else { ((Component)slot.WebPair[5__1]).transform.position = slot.Position; ((Component)slot.WebPair[5__1]).transform.eulerAngles = new Vector3(0f, 0f, slot.Angle); slot.WebPair[5__1].SetAudioEnabled(audioEnabled); slot.WebPair[5__1].TriggerAttack(0f, <>4__this._burstDelay); } slot.CurrentWebIndex = 1 - slot.CurrentWebIndex; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__24 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryAttackControlBehavior <>4__this; private bool 5__1; private int 5__2; private int 5__3; private Vector3 5__4; private bool 5__5; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__24(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)<>4__this._blastManagerRef == (Object)null) { Log.Warn("[BlastBurst1] FWBlastManager 未找到"); return false; } 5__1 = <>4__this._specialAttackVar != null && <>4__this._specialAttackVar.Value; 5__2 = Random.Range(6, 8); 5__3 = 0; break; case 1: <>1__state = -1; 5__3++; break; } if (5__3 < 5__2) { 5__4 = <>4__this.GetBlastBurst1Position(); 5__5 = 5__1 && Random.value > 0.5f; <>4__this._blastManagerRef.SpawnBombBlast(5__4, null, 1f, spawnSilkBallRing: true, 8, 20f, 20f, 50f, 5f, 5__5); <>2__current = (object)new WaitForSeconds(Random.Range(0.3f, 0.6f)); <>1__state = 1; return true; } if ((Object)(object)<>4__this._attackControlFsm != (Object)null && <>4__this._blastBurst1DoneEvent != null) { <>4__this._attackControlFsm.Fsm.Event(<>4__this._blastBurst1DoneEvent); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__28 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryAttackControlBehavior <>4__this; private int 5__1; private int 5__2; private int 5__3; private Vector3 5__4; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__28(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)<>4__this._blastManagerRef == (Object)null) { Log.Warn("[BlastBurst2] FWBlastManager 未找到"); return false; } <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.FadeToBlack(0.3f)); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.3f); <>1__state = 2; return true; case 2: <>1__state = -1; 5__1 = Random.Range(10, 15); 5__2 = 4; 5__3 = 0; goto IL_0207; case 3: <>1__state = -1; 5__3++; goto IL_0207; case 4: <>1__state = -1; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.FadeFromBlack(0.3f)); <>1__state = 5; return true; case 5: { <>1__state = -1; Log.Info($"[BlastBurst2] 攻击完成,共 {5__1} 个爆炸(含 {5__2} 个预判)"); if ((Object)(object)<>4__this._attackControlFsm != (Object)null && <>4__this._blastBurst2DoneEvent != null) { <>4__this._attackControlFsm.Fsm.Event(<>4__this._blastBurst2DoneEvent); } return false; } IL_0207: if (5__3 < 5__1) { if (5__3 < 5__2) { 5__4 = PredictiveBlastAction.CalculatePrediction(0.8f, 2f, 20f, 57f, 134.5f, 144f); <>4__this._blastManagerRef.SpawnBombBlast(5__4, null, 0.65f); } else { 5__4 = <>4__this.GetBlastBurst1Position(); <>4__this._blastManagerRef.SpawnBombBlast(5__4, null, Random.Range(0.9f, 1.2f)); } <>2__current = (object)new WaitForSeconds(Random.Range(0.08f, 0.2f)); <>1__state = 3; return true; } <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 4; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__33 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryAttackControlBehavior <>4__this; private Transform 5__1; private int 5__2; private float 5__3; private float 5__4; private float 5__5; private float 5__6; private float 5__7; private float 5__8; private float 5__9; private float 5__10; private float 5__11; private int 5__12; private float 5__13; private float 5__14; private float 5__15; private Vector2 5__16; private Vector3 5__17; private Vector3 5__18; private float 5__19; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__33(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Expected O, but got Unknown //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)<>4__this._blastManagerRef == (Object)null) { Log.Warn("[BlastBurst3] FWBlastManager 未找到"); return false; } 5__1 = ((Component)<>4__this).transform; 5__2 = Random.Range(7, 11); 5__3 = 18f; 5__4 = 13f; 5__5 = 30f; 5__6 = 7f; 5__7 = 0.2f; 5__8 = 0.9f; Log.Info($"[BlastBurst3] 开始生成 {5__2} 个汇聚爆炸"); 5__9 = Time.time; 5__12 = 0; goto IL_024a; case 1: <>1__state = -1; 5__12++; goto IL_024a; case 2: { <>1__state = -1; <>4__this._naChargeEffect.SetActive(false); <>4__this._blastManagerRef.SpawnBombBlast(5__1.position, null, 3f); Log.Info("[BlastBurst3] 汇聚爆炸攻击完成,最终爆炸大小: 3倍"); if ((Object)(object)<>4__this._attackControlFsm != (Object)null && <>4__this._blastBurst3DoneEvent != null) { <>4__this._attackControlFsm.Fsm.Event(<>4__this._blastBurst3DoneEvent); } return false; } IL_024a: if (5__12 < 5__2) { if (Random.value < 0.7f) { 5__13 = Random.Range(180f, 360f); } else { 5__13 = Random.Range(0f, 180f); } 5__14 = Random.Range(5__4, 5__3); 5__15 = 5__13 * (MathF.PI / 180f); 5__16 = new Vector2(Mathf.Cos(5__15), Mathf.Sin(5__15)); 5__17 = 5__1.position; 5__18 = 5__17 + new Vector3(5__16.x, 5__16.y, 0f) * 5__14; 5__19 = Random.Range(0.8f, 1.3f); <>4__this._blastManagerRef.SpawnMovingBombBlast(5__18, 5__1, 5__5, 5__6, 5__7, 5__8, 5__19); <>2__current = (object)new WaitForSeconds(Random.Range(0.1f, 0.16f)); <>1__state = 1; return true; } 5__10 = Time.time - 5__9; 5__11 = 5__8 + 0.05f; <>2__current = (object)new WaitForSeconds(5__11); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__61 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryAttackControlBehavior <>4__this; private int 5__1; private MemoryHandControlBehavior 5__2; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__61(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = Random.Range(0, 2); 5__2 = ((5__1 == 0) ? <>4__this.handLBehavior : <>4__this.handRBehavior); if ((Object)(object)5__2 == (Object)null) { Log.Error($"未找到Hand {5__1} Behavior"); return false; } Log.Info($"选择Hand {5__1} ({((Object)((Component)5__2).gameObject).name})进行爬升阶段环绕攻击(削弱版)"); 5__2.StartOrbitAttackSequence(); <>2__current = (object)new WaitForSeconds(2f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__2.StartShootSequence(); Log.Info("爬升阶段环绕攻击完成(单Hand三根针)"); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__71 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryAttackControlBehavior <>4__this; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__71(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.ConfigureClimbOrbitAttack(); if ((Object)(object)<>4__this.handLBehavior != (Object)null) { <>4__this.handLBehavior.StartOrbitAttackSequence(); } if ((Object)(object)<>4__this.handRBehavior != (Object)null) { <>4__this.handRBehavior.StartOrbitAttackSequence(); } <>2__current = (object)new WaitForSeconds(2f); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)<>4__this.handLBehavior != (Object)null) { <>4__this.handLBehavior.StartShootSequence(); } <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 2; return true; case 2: <>1__state = -1; if ((Object)(object)<>4__this.handRBehavior != (Object)null) { <>4__this.handRBehavior.StartShootSequence(); } Log.Info("ClimbOrbit 攻击完成(双 Hand 六根针)"); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__67 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryAttackControlBehavior <>4__this; private HeroController 5__1; private Vector3 5__2; private int 5__3; private float 5__4; private float 5__5; private float 5__6; private float 5__7; private float 5__8; private List 5__9; private int 5__10; private float 5__11; private Vector3 5__12; private GameObject 5__13; private float 5__14; private PlayMakerFSM 5__15; private int 5__16; private GameObject 5__17; private float 5__18; private Vector3 5__19; private List.Enumerator <>s__20; private GameObject 5__21; private PlayMakerFSM 5__22; private List.Enumerator <>s__23; private int 5__24; private GameObject 5__25; private PlayMakerFSM 5__26; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__67(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 3) { try { } finally { <>m__Finally1(); } } 5__1 = null; 5__9 = null; 5__13 = null; 5__15 = null; 5__17 = null; <>s__20 = default(List.Enumerator); 5__21 = null; 5__22 = null; <>s__23 = default(List.Enumerator); 5__25 = null; 5__26 = null; <>1__state = -2; } private bool MoveNext() { //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0725: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Expected O, but got Unknown //IL_06c5: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_0584: Expected O, but got Unknown //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = HeroController.instance; if ((Object)(object)5__1 == (Object)null) { Log.Warn("HeroController 未找到,无法执行 ClimbPin 攻击"); return false; } if ((Object)(object)<>4__this._fwPinManager == (Object)null || !<>4__this._fwPinManager.IsInitialized) { Log.Warn("FWPinManager 未初始化,无法执行 ClimbPin 攻击"); return false; } <>4__this._activeClimbPins.Clear(); 5__2 = ((Component)<>4__this).transform.position; 5__3 = <>4__this._climbPinConfig.PinCount; 5__4 = <>4__this._climbPinConfig.PinSpacing; 5__5 = <>4__this._climbPinConfig.SpawnHeightOffset; 5__6 = <>4__this._climbPinConfig.AimOffset; Log.Info($"生成 {5__3} 个 Pin,BOSS 位置: {5__2}"); 5__10 = 0; while (5__10 < 5__3) { 5__11 = ((float)5__10 - (float)(5__3 - 1) / 2f) * 5__4; 5__12 = 5__2 + new Vector3(5__11, 5__5, 0f); 5__13 = <>4__this._fwPinManager.SpawnPinProjectile(5__12); if ((Object)(object)5__13 != (Object)null) { <>4__this._activeClimbPins.Add(5__13); 5__13.transform.rotation = Quaternion.Euler(0f, 0f, <>4__this._climbPinConfig.InitialRotation); 5__14 = ((5__10 < 5__3 / 2) ? (-1f) : 1f); <>4__this._fwPinManager.SetClimbPinAimOffsetDirection(5__13, 5__14, 5__6); 5__15 = FSMUtility.LocateMyFSM(5__13, "Control"); if ((Object)(object)5__15 != (Object)null) { 5__15.SendEvent("CLIMB_PIN_PREPARE"); } 5__15 = null; } 5__13 = null; 5__10++; } Log.Info($"已生成 {<>4__this._activeClimbPins.Count} 个 Pin(前 {5__3 / 2} 根瞄准左边,后 {5__3 / 2} 根瞄准右边)"); 5__7 = 1.5f; 5__8 = 0f; goto IL_047a; case 1: <>1__state = -1; goto IL_047a; case 2: <>1__state = -1; 5__9 = Enumerable.Range(0, <>4__this._activeClimbPins.Count).ToList(); <>4__this.ShuffleList(5__9); Log.Info("开始发射 Pin"); <>s__23 = 5__9.GetEnumerator(); <>1__state = -3; goto IL_06e6; case 3: <>1__state = -3; goto IL_06e6; case 4: { <>1__state = -1; <>4__this._activeClimbPins.Clear(); Log.Info("ClimbPin 攻击完成"); return false; } IL_06e6: if (<>s__23.MoveNext()) { 5__24 = <>s__23.Current; if (5__24 < <>4__this._activeClimbPins.Count) { 5__25 = <>4__this._activeClimbPins[5__24]; if ((Object)(object)5__25 != (Object)null && 5__25.activeInHierarchy) { 5__26 = FSMUtility.LocateMyFSM(5__25, "Control"); if ((Object)(object)5__26 != (Object)null) { 5__26.SendEvent("CLIMB_PIN_THREAD"); } 5__26 = null; } 5__25 = null; } <>2__current = (object)new WaitForSeconds(<>4__this._climbPinConfig.FireInterval); <>1__state = 3; return true; } <>m__Finally1(); <>s__23 = default(List.Enumerator); Log.Info("ClimbPin 攻击发射完成"); <>2__current = (object)new WaitForSeconds(<>4__this._climbPinConfig.FlightDuration); <>1__state = 4; return true; IL_047a: if (5__8 < 5__7) { 5__2 = ((Component)<>4__this).transform.position; 5__16 = 0; while (5__16 < <>4__this._activeClimbPins.Count) { 5__17 = <>4__this._activeClimbPins[5__16]; if ((Object)(object)5__17 != (Object)null && 5__17.activeInHierarchy) { 5__18 = ((float)5__16 - (float)(<>4__this._activeClimbPins.Count - 1) / 2f) * 5__4; 5__19 = 5__2 + new Vector3(5__18, 5__5, 0f); 5__17.transform.position = 5__19; } 5__17 = null; 5__16++; } 5__8 += Time.deltaTime; <>2__current = null; <>1__state = 1; return true; } Log.Info("发送 CLIMB_PIN_AIM 事件,Pin 开始瞄准玩家"); <>s__20 = <>4__this._activeClimbPins.GetEnumerator(); try { while (<>s__20.MoveNext()) { 5__21 = <>s__20.Current; if ((Object)(object)5__21 != (Object)null && 5__21.activeInHierarchy) { 5__22 = FSMUtility.LocateMyFSM(5__21, "Control"); if ((Object)(object)5__22 != (Object)null) { 5__22.SendEvent("CLIMB_PIN_AIM"); } 5__22 = null; } 5__21 = null; } } finally { ((IDisposable)<>s__20).Dispose(); } <>s__20 = default(List.Enumerator); <>2__current = (object)new WaitForSeconds(<>4__this._climbPinConfig.AimWaitTime); <>1__state = 2; return true; } } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; ((IDisposable)<>s__23).Dispose(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__63 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryAttackControlBehavior <>4__this; private HeroController 5__1; private Vector3 5__2; private float 5__3; private Vector3[] 5__4; private List 5__5; private Vector3[] <>s__6; private int <>s__7; private Vector3 5__8; private SilkBallBehavior 5__9; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__63(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__4 = null; 5__5 = null; <>s__6 = null; 5__9 = null; <>1__state = -2; } private bool MoveNext() { //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Expected O, but got Unknown //IL_0219: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = HeroController.instance; if ((Object)(object)5__1 == (Object)null) { Log.Warn("HeroController未找到,无法执行丝球攻击"); return false; } if ((Object)(object)<>4__this._silkBallManager == (Object)null) { Log.Warn("SilkBallManager未初始化"); return false; } 5__2 = 5__1.transform.position; 5__3 = 15f; 5__4 = (Vector3[])(object)new Vector3[4] { 5__2 + new Vector3(0f - 5__3, 5__3, 0f), 5__2 + new Vector3(0f - 5__3, 0f - 5__3, 0f), 5__2 + new Vector3(5__3, 5__3, 0f), 5__2 + new Vector3(5__3, 0f - 5__3, 0f) }; 5__5 = new List(); <>s__6 = 5__4; for (<>s__7 = 0; <>s__7 < <>s__6.Length; <>s__7++) { 5__8 = <>s__6[<>s__7]; 5__9 = <>4__this._silkBallManager.SpawnSilkBall(5__8, 15f, 20f, 5f, 1f); if ((Object)(object)5__9 != (Object)null) { 5__5.Add(((Component)5__9).gameObject); FSMUtility.LocateMyFSM(((Component)5__9).gameObject, "Control").SendEvent("PREPARE"); 5__9.isPrepared = true; Log.Info($"在位置 {5__8} 生成追踪丝球"); } 5__9 = null; } <>s__6 = null; <>2__current = (object)new WaitForSeconds(0.6f); <>1__state = 1; return true; case 1: <>1__state = -1; Log.Info("=== 广播 SILK BALL RELEASE 事件,释放爬升阶段丝球 ==="); EventRegister.SendEvent("SILK BALL RELEASE", (GameObject)null); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 2; return true; case 2: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__73 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryAttackControlBehavior <>4__this; private HeroController 5__1; private Vector3 5__2; private float 5__3; private Vector3 5__4; private SilkBallBehavior 5__5; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__73(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = HeroController.instance; if ((Object)(object)5__1 == (Object)null) { Log.Warn("HeroController 未找到,无法执行 ClimbSilkBall 攻击"); return false; } if ((Object)(object)<>4__this._silkBallManager == (Object)null) { Log.Warn("SilkBallManager 未初始化"); return false; } 5__2 = 5__1.transform.position; 5__3 = ((Random.Range(0, 2) == 0) ? 12f : (-12f)); 5__4 = 5__2 + new Vector3(0f, 5__3, 0f); Log.Info("在玩家 " + ((5__3 > 0f) ? "上方" : "下方") + " 8 单位生成丝球"); 5__5 = <>4__this._silkBallManager.SpawnSilkBall(5__4, 12f, 16f, 6f, 1.2f, enableRotation: true, null, ignoreWall: true, delayDamageActivation: true, canBeClearedByAttack: false); if ((Object)(object)5__5 != (Object)null) { FSMUtility.LocateMyFSM(((Component)5__5).gameObject, "Control").SendEvent("PREPARE"); 5__5.isPrepared = true; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; } goto IL_01ea; case 1: <>1__state = -1; 5__5.SendFsmEvent("SILK BALL RELEASE"); <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SpawnCrossWebsForSilkBall(((Component)5__5).transform, 4)); <>1__state = 2; return true; case 2: <>1__state = -1; goto IL_01ea; case 3: { <>1__state = -1; return false; } IL_01ea: <>2__current = (object)new WaitForSeconds(2f); <>1__state = 3; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__136 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryAttackControlBehavior <>4__this; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__136(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = (object)new WaitWhile((Func)(() => (Object)(object)FSMUtility.LocateMyFSM(((Component)<>4__this).gameObject, <>4__this.fsmName) == (Object)null)); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.GetComponents(); <>4__this.RegisterAttackControlEvents(); <>4__this.ModifyAttackControlFSM(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__179 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryAttackControlBehavior <>4__this; private float 5__1; private FsmBool 5__2; private int 5__3; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__179(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("=== 开始执行P6 领域次元斩 ==="); if ((Object)(object)<>4__this._attackControlFsm != (Object)null) { 5__2 = <>4__this._attackControlFsm.FsmVariables.FindFsmBool("Do P6 Web Attack"); if (5__2 != null) { 5__2.Value = false; } 5__2 = null; } if ((Object)(object)<>4__this._domainBehavior != (Object)null && (Object)(object)((Component)<>4__this).gameObject != (Object)null) { <>4__this._domainBehavior.ActivateDomain(((Component)<>4__this).transform.position, <>4__this._initialRadius); } <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this._webSlots.Clear(); 5__1 = <>4__this._initialRadius; 5__3 = 1; goto IL_027f; case 2: <>1__state = -1; if (BigSilkBallPhaseGuard.IsActive) { <>4__this.CleanupDomainSlashAfterGuard(); return false; } if (5__3 < 5 && (Object)(object)<>4__this._domainBehavior != (Object)null) { 5__1 -= <>4__this._shrinkPerWave; 5__1 = Mathf.Max(5__1, <>4__this._minRadius); <>4__this._domainBehavior.ShrinkDomain(5__1); <>2__current = (object)new WaitForSeconds(<>4__this._waveInterval); <>1__state = 3; return true; } goto IL_026c; case 3: <>1__state = -1; goto IL_026c; case 4: { <>1__state = -1; <>4__this.CleanupAllWebs(); if ((Object)(object)<>4__this._domainBehavior != (Object)null) { <>4__this._domainBehavior.DeactivateDomain(); } Log.Info("=== P6 领域次元斩执行完成 ==="); if ((Object)(object)<>4__this._attackControlFsm != (Object)null) { <>4__this._attackControlFsm.SendEvent("P6 DOMAIN SLASH DONE"); } return false; } IL_027f: if (5__3 <= 5) { if (BigSilkBallPhaseGuard.IsActive) { <>4__this.CleanupDomainSlashAfterGuard(); return false; } Log.Info($"=== 第{5__3}波攻击开始 ==="); <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.ExecuteWave(5__3)); <>1__state = 2; return true; } <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 4; return true; IL_026c: 5__3++; goto IL_027f; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__182 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public int waveIndex; public MemoryAttackControlBehavior <>4__this; private int 5__1; private int 5__2; private HeroController 5__3; private Vector3 5__4; private List 5__5; private int 5__6; private int 5__7; private Vector3 5__8; private float 5__9; private int 5__10; private WebSlotInfo 5__11; private Coroutine 5__12; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__182(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__3 = null; 5__5 = null; 5__11 = null; 5__12 = null; <>1__state = -2; } private bool MoveNext() { //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = waveIndex * (waveIndex + 1) / 2; 5__2 = 5__1 - <>4__this._webSlots.Count; Log.Info($"第{waveIndex}波:需要{5__1}个位置,新增{5__2}个位置"); 5__3 = Object.FindFirstObjectByType(); 5__4 = (((Object)(object)5__3 != (Object)null) ? 5__3.transform.position : ((Component)<>4__this).transform.position); 5__7 = 0; while (5__7 < 5__2) { 5__8 = <>4__this.CalculateNewSlotPosition(5__4, waveIndex); 5__9 = <>4__this.CalculateSlotAngle(waveIndex); <>4__this._webSlots.Add(new WebSlotInfo(5__8, 5__9)); 5__7++; } 5__5 = new List(); 5__6 = ((5__1 > 0) ? Random.Range(0, 5__1) : (-1)); 5__10 = 0; while (5__10 < 5__1 && 5__10 < <>4__this._webSlots.Count) { 5__11 = <>4__this._webSlots[5__10]; 5__12 = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.ActivateSlotWeb(5__11, 5__10 == 5__6)); 5__5.Add(5__12); 5__11 = null; 5__12 = null; 5__10++; } <>2__current = (object)new WaitForSeconds(<>4__this._burstDelay + 1f); <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__30 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float duration; public MemoryAttackControlBehavior <>4__this; private GameObject 5__1; private SpriteRenderer 5__2; private float 5__3; private Color 5__4; private Color 5__5; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__30(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = GameObject.Find("Beast Slash Fader"); if ((Object)(object)5__1 != (Object)null) { 5__2 = 5__1.GetComponent(); if ((Object)(object)5__2 != (Object)null) { 5__3 = 0f; 5__4 = new Color(0f, 0f, 0f, 1f); 5__5 = new Color(0f, 0f, 0f, 0f); goto IL_011a; } goto IL_013f; } goto IL_0147; case 1: <>1__state = -1; goto IL_011a; case 2: { <>1__state = -1; return false; } IL_013f: 5__2 = null; goto IL_0147; IL_011a: if (5__3 < duration) { 5__3 += Time.deltaTime; 5__2.color = Color.Lerp(5__4, 5__5, 5__3 / duration); <>2__current = null; <>1__state = 1; return true; } 5__2.color = 5__5; goto IL_013f; IL_0147: <>2__current = null; <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__29 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float duration; public MemoryAttackControlBehavior <>4__this; private GameObject 5__1; private SpriteRenderer 5__2; private float 5__3; private Color 5__4; private Color 5__5; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__29(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = GameObject.Find("Beast Slash Fader"); if ((Object)(object)5__1 != (Object)null) { 5__2 = 5__1.GetComponent(); if ((Object)(object)5__2 != (Object)null) { 5__3 = 0f; 5__4 = new Color(0f, 0f, 0f, 0f); 5__5 = new Color(0f, 0f, 0f, 1f); goto IL_011a; } goto IL_013f; } goto IL_0147; case 1: <>1__state = -1; goto IL_011a; case 2: { <>1__state = -1; return false; } IL_013f: 5__2 = null; goto IL_0147; IL_011a: if (5__3 < duration) { 5__3 += Time.deltaTime; 5__2.color = Color.Lerp(5__4, 5__5, 5__3 / duration); <>2__current = null; <>1__state = 1; return true; } 5__2.color = 5__5; goto IL_013f; IL_0147: <>2__current = null; <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__262 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryAttackControlBehavior <>4__this; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__262(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.82f); <>1__state = 1; return true; case 1: <>1__state = -1; Log.Info("=== 准备释放丝球 ==="); if (<>4__this._cachedRoarEmitter != null) { ((FsmStateAction)<>4__this._cachedRoarEmitter).OnEnter(); } if (<>4__this._cachedPlayRoarAudio != null) { ((FsmStateAction)<>4__this._cachedPlayRoarAudio).OnEnter(); } Log.Info("=== 广播 SILK BALL RELEASE 事件,释放所有已准备的丝球 ==="); EventRegister.SendEvent("SILK BALL RELEASE", (GameObject)null); <>4__this._activeSilkBalls.Clear(); <>2__current = (object)new WaitForSeconds(0.2f); <>1__state = 2; return true; case 2: <>1__state = -1; if (<>4__this._cachedRoarEmitter != null) { ((FsmStateAction)<>4__this._cachedRoarEmitter).OnExit(); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__265 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryAttackControlBehavior <>4__this; private float 5__1; private float 5__2; private float 5__3; private HeroController 5__4; private Transform 5__5; private Vector3 5__6; private Vector3 5__7; private Vector3 5__8; private List 5__9; private Dictionary 5__10; private float? 5__11; private SilkBallBehavior 5__12; private SilkBallBehavior 5__13; private float 5__14; private float 5__15; private float 5__16; private int 5__17; private float 5__18; private float 5__19; private List.Enumerator <>s__20; private SilkBallBehavior 5__21; private List.Enumerator <>s__22; private SilkBallBehavior 5__23; private bool 5__24; private List.Enumerator <>s__25; private SilkBallBehavior 5__26; private float 5__27; private float 5__28; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__265(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if ((uint)(num - -4) <= 1u || (uint)(num - 1) <= 2u) { try { if (num == -4 || num == 1) { try { } finally { <>m__Finally2(); } } } finally { <>m__Finally1(); } } 5__4 = null; 5__5 = null; 5__9 = null; 5__10 = null; 5__12 = null; 5__13 = null; <>s__20 = default(List.Enumerator); 5__21 = null; <>s__22 = default(List.Enumerator); 5__23 = null; <>s__25 = default(List.Enumerator); 5__26 = null; <>1__state = -2; } private bool MoveNext() { //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_05b4: Expected O, but got Unknown bool result; try { switch (<>1__state) { default: result = false; goto end_IL_0000; case 0: <>1__state = -1; 5__1 = 6f; 5__2 = 8f; 5__3 = 0.5f; <>1__state = -3; if ((Object)(object)<>4__this._attackControlFsm == (Object)null) { result = false; break; } if ((Object)(object)<>4__this._silkBallManager == (Object)null || (Object)(object)<>4__this._singleWebManager == (Object)null) { result = false; break; } 5__4 = HeroController.instance; if ((Object)(object)5__4 == (Object)null) { result = false; break; } 5__5 = 5__4.transform; 5__6 = 5__5.position; 5__7 = 5__6 + new Vector3(-8f, 6f, 0f); 5__8 = 5__6 + new Vector3(8f, 6f, 0f); 5__9 = new List(); 5__10 = new Dictionary(); 5__11 = null; 5__12 = <>4__this._silkBallManager.SpawnSilkBall(5__7, 12f, 8f, 5__1, 1.33f, enableRotation: true, 5__5, ignoreWall: true, delayDamageActivation: true, canBeClearedByAttack: false); if ((Object)(object)5__12 != (Object)null) { 5__12.StartProtectionTime(5__2); 5__9.Add(5__12); 5__18 = Random.Range(0f, 90f); 5__10[5__12] = 5__18; 5__11 = 5__18; } 5__13 = <>4__this._silkBallManager.SpawnSilkBall(5__8, 12f, 8f, 5__1, 1.33f, enableRotation: true, 5__5, ignoreWall: true, delayDamageActivation: true, canBeClearedByAttack: false); if ((Object)(object)5__13 != (Object)null) { 5__13.StartProtectionTime(5__2); 5__9.Add(5__13); 5__19 = Random.Range(0f, 90f); if (5__11.HasValue) { 5__19 = (5__11.Value + Random.Range(15f, 75f)) % 90f; } 5__10[5__13] = 5__19; } <>s__20 = 5__9.GetEnumerator(); <>1__state = -4; goto IL_0376; case 1: <>1__state = -4; 5__21 = null; goto IL_0376; case 2: <>1__state = -3; goto IL_03d2; case 3: { <>1__state = -3; goto IL_05c8; } IL_05c8: if (5__14 < 5__1) { 5__24 = true; <>s__25 = 5__9.GetEnumerator(); try { while (<>s__25.MoveNext()) { 5__26 = <>s__25.Current; if (!((Object)(object)5__26 == (Object)null)) { 5__27 = 0f; 5__10.TryGetValue(5__26, out 5__27); 5__28 = ((float)5__17 * 15f + 5__27) % 90f; <>4__this.SpawnCrossWeb(((Component)5__26).transform, 5__28, 5__16, 5__24); 5__24 = false; 5__26 = null; } } } finally { ((IDisposable)<>s__25).Dispose(); } <>s__25 = default(List.Enumerator); 5__17++; 5__14 += 5__15; <>2__current = (object)new WaitForSeconds(5__15); <>1__state = 3; result = true; } else { 5__4 = null; 5__5 = null; 5__9 = null; 5__10 = null; 5__12 = null; 5__13 = null; <>m__Finally1(); result = false; } goto end_IL_0000; IL_03d2: <>4__this._bossControlFsm.Fsm.Event("MOVE START"); <>s__22 = 5__9.GetEnumerator(); try { while (<>s__22.MoveNext()) { 5__23 = <>s__22.Current; 5__23?.SendFsmEvent("SILK BALL RELEASE"); 5__23 = null; } } finally { ((IDisposable)<>s__22).Dispose(); } <>s__22 = default(List.Enumerator); 5__14 = 0f; 5__15 = 1f; 5__16 = 45f; 5__17 = 0; goto IL_05c8; IL_0376: while (true) { if (<>s__20.MoveNext()) { 5__21 = <>s__20.Current; if ((Object)(object)5__21 == (Object)null) { continue; } <>2__current = <>4__this.WaitForSilkBallPrepared(5__21, 0.5f); <>1__state = 1; result = true; } else { <>m__Finally2(); <>s__20 = default(List.Enumerator); if (!(5__3 > 0f)) { break; } <>2__current = (object)new WaitForSeconds(5__3); <>1__state = 2; result = true; } goto end_IL_0000; } goto IL_03d2; } <>m__Finally1(); end_IL_0000:; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } return result; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; <>4__this._silkBallWithWebAttackCoroutine = null; if ((Object)(object)<>4__this._naChargeEffect != (Object)null) { <>4__this._naChargeEffect.SetActive(false); } if ((Object)(object)<>4__this._attackControlFsm != (Object)null && <>4__this._silkBallWithWebAttackDoneEvent != null) { <>4__this._attackControlFsm.Fsm.Event(<>4__this._silkBallWithWebAttackDoneEvent); } } private void <>m__Finally2() { <>1__state = -3; ((IDisposable)<>s__20).Dispose(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__74 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Transform silkBallTransform; public int webCount; public MemoryAttackControlBehavior <>4__this; private float 5__1; private Vector3 5__2; private int 5__3; private Vector3 5__4; private float 5__5; private SingleWebBehavior 5__6; private SingleWebBehavior 5__7; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__74(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__6 = null; 5__7 = null; <>1__state = -2; } private bool MoveNext() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)<>4__this._singleWebManager == (Object)null) { return false; } 5__1 = 45f; 5__2 = new Vector3(2.4f, 1.1f, 1f); 5__3 = 0; break; case 1: <>1__state = -1; 5__6 = null; 5__7 = null; 5__3++; break; } if (5__3 < webCount && !((Object)(object)silkBallTransform == (Object)null) && ((Component)silkBallTransform).gameObject.activeInHierarchy) { 5__4 = silkBallTransform.position; 5__5 = Random.Range(0f, 90f); 5__6 = <>4__this._singleWebManager.SpawnAndAttack(5__4, (Vector3?)new Vector3(0f, 0f, 5__5), (Vector3?)5__2, 0f, 0.75f, audioEnabled: true); if ((Object)(object)5__6 != (Object)null) { 5__6.ConfigureFollowTarget(silkBallTransform); 5__6.ConfigureContinuousRotation(enable: true, 5__1); } 5__7 = <>4__this._singleWebManager.SpawnAndAttack(5__4, (Vector3?)new Vector3(0f, 0f, 5__5 + 90f), (Vector3?)5__2, 0f, 0.75f, audioEnabled: false); if ((Object)(object)5__7 != (Object)null) { 5__7.ConfigureFollowTarget(silkBallTransform); 5__7.ConfigureContinuousRotation(enable: true, 5__1); } <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__257 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryAttackControlBehavior <>4__this; private bool 5__1; private Vector3 5__2; private float 5__3; private int 5__4; private float 5__5; private float 5__6; private Vector3 5__7; private Vector3 5__8; private SilkBallBehavior 5__9; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__257(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__9 = null; <>1__state = -2; } private bool MoveNext() { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = Random.value < 0.5f; Log.Info("=== 开始召唤普通版8个丝球(" + (5__1 ? "顺时针" : "逆时针") + ")==="); <>4__this._activeSilkBalls.Clear(); 5__2 = ((Component)<>4__this).transform.position; 5__3 = 6f; 5__4 = 0; break; case 1: <>1__state = -1; 5__9 = null; 5__4++; break; } if (5__4 < 8) { 5__5 = (5__1 ? ((float)(-5__4) * 45f) : ((float)5__4 * 45f)); 5__6 = 5__5 * (MathF.PI / 180f); 5__7 = new Vector3(Mathf.Cos(5__6) * 5__3, Mathf.Sin(5__6) * 5__3, 0f); 5__8 = 5__2 + 5__7; 5__8.z = 0f; 5__9 = <>4__this._silkBallManager?.SpawnSilkBall(5__8, 30f, 25f, 8f, 1f); if ((Object)(object)5__9 != (Object)null) { <>4__this._activeSilkBalls.Add(((Component)5__9).gameObject); Log.Info($"召唤第 {5__4 + 1} 个丝球({5__5}°)"); } <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; } Log.Info($"=== 8个丝球召唤完成,共 {<>4__this._activeSilkBalls.Count} 个 ==="); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__258 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryAttackControlBehavior <>4__this; private bool 5__1; private Vector3 5__2; private float 5__3; private float 5__4; private bool 5__5; private float[] 5__6; private int 5__7; private int 5__8; private float 5__9; private float 5__10; private Vector3 5__11; private Vector3 5__12; private SilkBallBehavior 5__13; private float 5__14; private float 5__15; private Vector3 5__16; private Vector3 5__17; private SilkBallBehavior 5__18; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__258(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__6 = null; 5__13 = null; 5__18 = null; <>1__state = -2; } private bool MoveNext() { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Expected O, but got Unknown //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = Random.value < 0.5f; Log.Info("=== 开始召唤Memory Phase2丝球(内圈6球 + 外圈3球," + (5__1 ? "顺时针" : "逆时针") + ")==="); <>4__this._activeSilkBalls.Clear(); 5__2 = ((Component)<>4__this).transform.position; 5__3 = 6f; 5__4 = 14f; 5__5 = <>4__this.ShouldSpawnPhase2OuterSilkBallsOnRight(5__2); 5__6 = ((!5__5) ? new float[3] { 150f, 180f, 210f } : new float[3] { 30f, 0f, 330f }); 5__7 = 0; 5__8 = 0; break; case 1: <>1__state = -1; 5__13 = null; 5__8++; break; } if (5__8 < 6) { 5__9 = (5__1 ? (90f - (float)5__8 * 60f) : (90f + (float)5__8 * 60f)); 5__10 = 5__9 * (MathF.PI / 180f); 5__11 = new Vector3(Mathf.Cos(5__10) * 5__3, Mathf.Sin(5__10) * 5__3, 0f); 5__12 = 5__2 + 5__11; 5__12.z = 0f; 5__13 = <>4__this._silkBallManager?.SpawnSilkBall(5__12, 30f, 25f, 8f, 1f); if ((Object)(object)5__13 != (Object)null) { <>4__this._activeSilkBalls.Add(((Component)5__13).gameObject); Log.Info($"召唤内圈丝球 {5__8 + 1}/6({5__9}°)"); } if (5__8 % 2 == 0 && 5__7 < 5__6.Length) { 5__14 = 5__6[5__7]; 5__15 = 5__14 * (MathF.PI / 180f); 5__16 = new Vector3(Mathf.Cos(5__15) * 5__4, Mathf.Sin(5__15) * 5__4, 0f); 5__17 = 5__2 + 5__16; 5__17.z = 0f; 5__18 = <>4__this._silkBallManager?.SpawnSilkBall(5__17, 15f, 25f, 6.4f, 1.4f); if ((Object)(object)5__18 != (Object)null) { <>4__this._activeSilkBalls.Add(((Component)5__18).gameObject); 5__18.StartProtectionTime(2.5f); Log.Info(string.Format("召唤外圈丝球 {0}/3({1}°,{2}x大小,{3}s,{4})", 5__7 + 1, 5__14, 1.4f, 6.4f, 5__5 ? "右侧" : "左侧")); } 5__7++; 5__18 = null; } <>2__current = (object)new WaitForSeconds(0.12f); <>1__state = 1; return true; } Log.Info($"=== Memory Phase2丝球召唤完成,共 {<>4__this._activeSilkBalls.Count} 个(内圈6 + 外圈3)==="); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__256 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryAttackControlBehavior <>4__this; private FsmBool 5__1; private bool 5__2; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__256(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: { <>1__state = -1; PlayMakerFSM? attackControlFsm = <>4__this._attackControlFsm; 5__1 = ((attackControlFsm != null) ? attackControlFsm.FsmVariables.FindFsmBool("Special Attack") : null); 5__2 = 5__1 != null && 5__1.Value; if (5__2) { <>2__current = <>4__this.SummonPhase2DoubleSilkBalls(); <>1__state = 1; return true; } <>2__current = <>4__this.SummonNormalSilkBalls(); <>1__state = 2; return true; } case 1: <>1__state = -1; break; case 2: <>1__state = -1; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__266 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SilkBallBehavior ball; public float maxWait; public MemoryAttackControlBehavior <>4__this; private float 5__1; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__266(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 0f; break; case 1: <>1__state = -1; break; } if (!ball.isPrepared && 5__1 < maxWait) { 5__1 += Time.deltaTime; <>2__current = null; <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private FsmEvent? _blastBurst1Event; private FsmEvent? _blastBurst2Event; private FsmEvent? _blastBurst3Event; private FsmEvent? _blastBurst1DoneEvent; private FsmEvent? _blastBurst2DoneEvent; private FsmEvent? _blastBurst3DoneEvent; private FsmState? _blastBurst1PrepareState; private FsmState? _blastBurst1AttackState; private FsmState? _blastBurst1EndState; private FsmState? _blastBurst2PrepareState; private FsmState? _blastBurst2BlackoutState; private FsmState? _blastBurst2AttackState; private FsmState? _blastBurst2EndState; private FsmState? _blastBurst3PrepareState; private FsmState? _blastBurst3SpawnState; private FsmState? _blastBurst3ConvergeState; private FsmState? _blastBurst3FinalState; private FsmState? _blastBurst3EndState; private FWBlastManager? _blastManagerRef; private ClimbPinAttackConfig _climbPinConfig = new ClimbPinAttackConfig(); private FWPinManager? _fwPinManager; private List _activeClimbPins = new List(); [Header("FSM配置")] public string fsmName = "Attack Control"; [Header("状态配置")] public string handPtnChoiceState = "Hand Ptn Choice"; public string newOrbitAttackState = "Orbit Attack"; public string waitForHandsReadyState = "Wait For Hands Ready"; [Header("手部控制")] public GameObject? handL; public GameObject? handR; public GameObject? laceCircleSlash; public MemoryHandControlBehavior? handLBehavior; public MemoryHandControlBehavior? handRBehavior; private PlayMakerFSM? _attackControlFsm; private FsmState? _handPtnChoiceState; private FsmState? _orbitAttackState; private FsmState? _waitForHandsReadyState; private FsmState? _attackChoiceState; private FsmState? _moveRestartState; private FsmState? _moveRestart3State; private FsmState? _idleState; private FsmState? _webRecoverState; private FsmState? _singleState; private FsmState? _doubleState; private FsmState? _rubbleAttackQuestionState; private FsmState? _attackStopState; private FsmState? _dashAttackState; private FsmState? _dashAttackAnticState; private FsmState? _dashAttackEndState; private FsmState? _spikeLiftAimState; private FsmState? _spikeLiftAim2State; private string _secondHandName = ""; private GameObject? _bossScene; private GameObject? _strandPatterns; private GameObject? _secondHandObject; private GameObject? _silkHair; private GameObject? _naChargeEffect; private FsmEvent? _orbitAttackEvent; private FsmEvent? _orbitStartHandLEvent; private FsmEvent? _orbitStartHandREvent; private FsmEvent? _nullEvent; private PlayMakerFSM? _bossControlFsm; private FsmGameObject? _handLFsmVar; private FsmGameObject? _handRFsmVar; private PlayMakerFSM? _handLControlFsm; private PlayMakerFSM? _handRControlFsm; private FsmBool? _specialAttackVar; private FsmEvent? _p6WebAttackEvent; private FsmState? _p6DomainSlashState; private DomainBehavior? _domainBehavior; private static readonly Vector3 POS_LEFT_DOWN = new Vector3(25f, 137f, 0f); private static readonly Vector3 POS_LEFT_UP = new Vector3(25f, 142.5f, 0f); private static readonly Vector3 POS_MIDDLE_UP = new Vector3(39.5f, 142.5f, 0f); private static readonly Vector3 POS_MIDDLE_DOWN = new Vector3(39.5f, 137f, 0f); private static readonly Vector3 POS_RIGHT_UP = new Vector3(51.5f, 142.5f, 0f); private static readonly Vector3 POS_RIGHT_DOWN = new Vector3(51.5f, 137f, 0f); private const float ZONE_LEFT_MAX = 31f; private const float ZONE_RIGHT_MIN = 46f; private const float ATTACK_SEND_DELAY = 0.6f; private float[] _waveBaseAngles = new float[5] { 45f, 135f, 0f, 90f, 0f }; private float _angleRandomRange = 0f; private float _parallelDistance = 3f; private float _burstDelay = 0.75f; private float _waveInterval = 0.25f; private float _initialRadius = 18f; private float _shrinkPerWave = 2.5f; private float _minRadius = 8f; private List _webSlots = new List(); private FsmEvent? _p6DomainSlashDoneEvent; private FsmEvent? _silkBallAttackEvent; private FsmEvent? _silkBallWithWebAttackEvent; private FsmEvent? _silkBallWithWebAttackDoneEvent; private SilkBallManager? _silkBallManager; private SingleWebManager? _singleWebManager; private List _activeSilkBalls = new List(); private Coroutine? _silkBallSummonCoroutine; private Coroutine? _silkBallWithWebAttackCoroutine; private FsmState? _silkBallPrepareState; private FsmState? _silkBallRingPrepareState; private FsmState? _silkBallRingCastState; private FsmState? _silkBallRingLiftState; private FsmState? _silkBallRingAnticState; private FsmState? _silkBallRingReleaseState; private FsmState? _silkBallRingEndState; private FsmState? _silkBallRingRecoverState; private FsmState? _silkBallMovePrepareState; private FsmState? _silkBallMoveEndState; private FsmState? _silkBallWebPrepareState; private FsmState? _silkBallWebAttackState; private FsmState? _silkBallWebRecoverState; private FsmBool? _isGeneratingSilkBall; private FsmFloat? _totalDistanceTraveled; private FsmVector2? _lastBallPosition; private FsmGameObject? _laceSlashObj; private FsmGameObject? _spikeFloorsX; private FsmEvent? _silkBallStaticEvent; private FsmEvent? _silkBallDashEvent; private FsmEvent? _silkBallDashStartEvent; private FsmEvent? _silkBallDashEndEvent; private StartRoarEmitter? _cachedRoarEmitter; private PlayAudioEventRandom? _cachedPlayRoarAudio; [Header("地刺配置")] private GameObject? _spikeFloorsParent; private FsmBool? _spikeAttackPending; private FsmInt? _currentPhaseVar; private int _activeSpikeCount = 0; private bool _spikeSystemInitialized = false; private const int MaxSpikeEnsurePhase = 3; private FsmState? _spikeTriggerState; private FsmEvent? _spikeTriggerEvent; public bool IsAttackControlFsmReady => (Object)(object)_attackControlFsm != (Object)null; private void InitializeBlastBurstAttacks() { if (!((Object)(object)_attackControlFsm == (Object)null)) { GetBlastBurstManagerReferences(); RegisterBlastBurstEvents(); CreateBlastBurst1States(); CreateBlastBurst2States(); CreateBlastBurst3States(); AddBlastBurstTransitionsToHandPtnChoice(); Log.Info("[BlastBurst] 爆炸攻击初始化完成"); } } private void GetBlastBurstManagerReferences() { GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { _blastManagerRef = val.GetComponent(); } } private void RegisterBlastBurstEvents() { if (!((Object)(object)_attackControlFsm == (Object)null)) { _blastBurst1Event = FsmStateBuilder.GetOrCreateEvent(_attackControlFsm, "BLAST BURST 1"); _blastBurst2Event = FsmStateBuilder.GetOrCreateEvent(_attackControlFsm, "BLAST BURST 2"); _blastBurst3Event = FsmStateBuilder.GetOrCreateEvent(_attackControlFsm, "BLAST BURST 3"); _blastBurst1DoneEvent = FsmStateBuilder.GetOrCreateEvent(_attackControlFsm, "BLAST BURST 1 DONE"); _blastBurst2DoneEvent = FsmStateBuilder.GetOrCreateEvent(_attackControlFsm, "BLAST BURST 2 DONE"); _blastBurst3DoneEvent = FsmStateBuilder.GetOrCreateEvent(_attackControlFsm, "BLAST BURST 3 DONE"); Log.Info("[BlastBurst] 事件注册完成"); } } private void CreateBlastBurst1States() { if (!((Object)(object)_attackControlFsm == (Object)null)) { _blastBurst1PrepareState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, "Blast Burst 1 Prepare", "爆炸连段攻击准备"); _blastBurst1AttackState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, "Blast Burst 1 Attack", "爆炸连段攻击执行"); _blastBurst1EndState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, "Blast Burst 1 End", "爆炸连段攻击结束"); AddBlastBurst1PrepareActions(_blastBurst1PrepareState); AddBlastBurst1AttackActions(_blastBurst1AttackState); AddBlastBurst1EndActions(_blastBurst1EndState); FsmStateBuilder.SetFinishedTransition(_blastBurst1PrepareState, _blastBurst1AttackState); if (_blastBurst1DoneEvent != null) { FsmStateBuilder.AddTransition(_blastBurst1AttackState, FsmStateBuilder.CreateTransition(_blastBurst1DoneEvent, _blastBurst1EndState)); } FsmState idleState = _idleState; if (idleState != null) { FsmStateBuilder.SetFinishedTransition(_blastBurst1EndState, idleState); } Log.Info("[BlastBurst1] 状态链创建完成"); } } public void ExecuteBlastBurst1Attack() { ((MonoBehaviour)this).StartCoroutine(BlastBurst1AttackCoroutine()); } [IteratorStateMachine(typeof(d__24))] private IEnumerator BlastBurst1AttackCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__24(0) { <>4__this = this }; } private Vector3 GetBlastBurst1Position() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) float num = Random.Range(20f, 57f); float num2 = Random.Range(134.5f, 144f); return new Vector3(num, num2, 0f); } private void CreateBlastBurst2States() { if (!((Object)(object)_attackControlFsm == (Object)null)) { _blastBurst2PrepareState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, "Blast Burst 2 Prepare", "黑屏爆炸准备"); _blastBurst2BlackoutState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, "Blast Burst 2 Blackout", "黑屏效果"); _blastBurst2AttackState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, "Blast Burst 2 Attack", "密集爆炸攻击"); _blastBurst2EndState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, "Blast Burst 2 End", "黑屏爆炸结束"); AddBlastBurst2PrepareActions(_blastBurst2PrepareState); AddBlastBurst2BlackoutActions(_blastBurst2BlackoutState); AddBlastBurst2AttackActions(_blastBurst2AttackState); AddBlastBurst2EndActions(_blastBurst2EndState); FsmStateBuilder.SetFinishedTransition(_blastBurst2PrepareState, _blastBurst2BlackoutState); if (_blastBurst2DoneEvent != null) { FsmStateBuilder.AddTransition(_blastBurst2BlackoutState, FsmStateBuilder.CreateTransition(_blastBurst2DoneEvent, _blastBurst2AttackState)); } FsmStateBuilder.SetFinishedTransition(_blastBurst2AttackState, _blastBurst2EndState); FsmState idleState = _idleState; if (idleState != null) { FsmStateBuilder.SetFinishedTransition(_blastBurst2EndState, idleState); } Log.Info("[BlastBurst2] 状态链创建完成"); } } public void ExecuteBlastBurst2Attack() { ((MonoBehaviour)this).StartCoroutine(BlastBurst2AttackCoroutine()); } [IteratorStateMachine(typeof(d__28))] private IEnumerator BlastBurst2AttackCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__28(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__29))] private IEnumerator FadeToBlack(float duration) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__29(0) { <>4__this = this, duration = duration }; } [IteratorStateMachine(typeof(d__30))] private IEnumerator FadeFromBlack(float duration) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__30(0) { <>4__this = this, duration = duration }; } private void CreateBlastBurst3States() { if (!((Object)(object)_attackControlFsm == (Object)null)) { _blastBurst3PrepareState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, "Blast Burst 3 Prepare", "汇聚爆炸准备"); _blastBurst3SpawnState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, "Blast Burst 3 Spawn", "生成外围爆炸"); _blastBurst3ConvergeState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, "Blast Burst 3 Converge", "爆炸汇聚"); _blastBurst3FinalState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, "Blast Burst 3 Final", "最终爆炸"); _blastBurst3EndState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, "Blast Burst 3 End", "汇聚爆炸结束"); AddBlastBurst3PrepareActions(_blastBurst3PrepareState); AddBlastBurst3SpawnActions(_blastBurst3SpawnState); AddBlastBurst3ConvergeActions(_blastBurst3ConvergeState); AddBlastBurst3FinalActions(_blastBurst3FinalState); AddBlastBurst3EndActions(_blastBurst3EndState); FsmStateBuilder.SetFinishedTransition(_blastBurst3PrepareState, _blastBurst3SpawnState); if (_blastBurst3DoneEvent != null) { FsmStateBuilder.AddTransition(_blastBurst3SpawnState, FsmStateBuilder.CreateTransition(_blastBurst3DoneEvent, _blastBurst3EndState)); } FsmState idleState = _idleState; if (idleState != null) { FsmStateBuilder.SetFinishedTransition(_blastBurst3EndState, idleState); } Log.Info("[BlastBurst3] 状态链创建完成"); } } public void ExecuteBlastBurst3Attack() { ((MonoBehaviour)this).StartCoroutine(BlastBurst3AttackCoroutine()); } [IteratorStateMachine(typeof(d__33))] private IEnumerator BlastBurst3AttackCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__33(0) { <>4__this = this }; } private void AddBlastBurstTransitionsToHandPtnChoice() { if (_handPtnChoiceState != null) { if (_blastBurst1Event != null && _blastBurst1PrepareState != null) { FsmStateBuilder.AddTransition(_handPtnChoiceState, FsmStateBuilder.CreateTransition(_blastBurst1Event, _blastBurst1PrepareState)); } if (_blastBurst2Event != null && _blastBurst2PrepareState != null) { FsmStateBuilder.AddTransition(_handPtnChoiceState, FsmStateBuilder.CreateTransition(_blastBurst2Event, _blastBurst2PrepareState)); } if (_blastBurst3Event != null && _blastBurst3PrepareState != null) { FsmStateBuilder.AddTransition(_handPtnChoiceState, FsmStateBuilder.CreateTransition(_blastBurst3Event, _blastBurst3PrepareState)); } AddBlastBurstToSendRandomEvent(); Log.Info("[BlastBurst] HandPtnChoice 跳转添加完成"); } } private void AddBlastBurstToSendRandomEvent() { //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Expected O, but got Unknown //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Expected O, but got Unknown //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Expected O, but got Unknown if (_handPtnChoiceState == null) { return; } List list = _handPtnChoiceState.Actions.OfType().ToList(); foreach (SendRandomEventV4 item in list) { int num = 3; int num2 = item.events.Length; int num3 = num2 + num; FsmEvent[] array = (FsmEvent[])(object)new FsmEvent[num3]; FsmFloat[] array2 = (FsmFloat[])(object)new FsmFloat[num3]; FsmInt[] array3 = (FsmInt[])(object)new FsmInt[num3]; FsmInt[] array4 = (FsmInt[])(object)new FsmInt[num3]; for (int i = 0; i < num2; i++) { array[i] = item.events[i]; array2[i] = item.weights[i]; array3[i] = item.eventMax[i]; array4[i] = item.missedMax[i]; } if (_blastBurst1Event != null) { array[num2] = _blastBurst1Event; array2[num2] = new FsmFloat(FsmFloat.op_Implicit(1.5f)); array3[num2] = new FsmInt(FsmInt.op_Implicit(1)); array4[num2] = new FsmInt(FsmInt.op_Implicit(5)); } if (_blastBurst2Event != null) { array[num2 + 1] = _blastBurst2Event; array2[num2 + 1] = new FsmFloat(FsmFloat.op_Implicit(1f)); array3[num2 + 1] = new FsmInt(FsmInt.op_Implicit(1)); array4[num2 + 1] = new FsmInt(FsmInt.op_Implicit(6)); } if (_blastBurst3Event != null) { array[num2 + 2] = _blastBurst3Event; array2[num2 + 2] = new FsmFloat(FsmFloat.op_Implicit(1f)); array3[num2 + 2] = new FsmInt(FsmInt.op_Implicit(1)); array4[num2 + 2] = new FsmInt(FsmInt.op_Implicit(6)); } item.events = array; item.weights = array2; item.eventMax = array3; item.missedMax = array4; Log.Info($"[BlastBurst] 已添加 {num} 个爆炸攻击事件到 SendRandomEventV4 (eventMax 全为 1)"); } } private Vector3 GetRandomBlastPosition() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) return GetBlastBurst1Position(); } private void SpawnSilkBallRing(Vector3 center, int count, float radius, float speed, bool useReverseAccel) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_silkBallManager == (Object)null) { return; } float num = 360f / (float)count; float num2 = Random.Range(0f, 360f); Vector2 val = default(Vector2); for (int i = 0; i < count; i++) { float num3 = num2 + (float)i * num; float num4 = num3 * (MathF.PI / 180f); ((Vector2)(ref val))..ctor(Mathf.Cos(num4), Mathf.Sin(num4)); Vector3 position = center + new Vector3(val.x, val.y, 0f) * radius; SilkBallBehavior silkBallBehavior = _silkBallManager.SpawnSilkBall(position, 0f, speed, 10f, 1f); if ((Object)(object)silkBallBehavior != (Object)null) { Rigidbody2D component = ((Component)silkBallBehavior).GetComponent(); if ((Object)(object)component != (Object)null) { component.gravityScale = 0f; component.linearVelocity = val * speed; silkBallBehavior.StartProtectionTime(0.5f); } } } } private void AddBlastBurst1PrepareActions(FsmState state) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if (state != null) { List list = new List { (FsmStateAction)new Wait { time = FsmFloat.op_Implicit(0.2f), finishEvent = FsmEvent.Finished } }; state.Actions = list.ToArray(); } } private void AddBlastBurst1AttackActions(FsmState state) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown if (state != null) { List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ExecuteBlastBurst1Attack") { Value = "ExecuteBlastBurst1Attack" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.storeResult = new FsmVar(); list.Add((FsmStateAction)(object)val); List list2 = list; state.Actions = list2.ToArray(); } } private void AddBlastBurst1EndActions(FsmState state) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if (state != null) { List list = new List { (FsmStateAction)new Wait { time = FsmFloat.op_Implicit(0.3f), finishEvent = FsmEvent.Finished } }; state.Actions = list.ToArray(); } } private void AddBlastBurst2PrepareActions(FsmState state) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if (state != null) { List list = new List { (FsmStateAction)new Wait { time = FsmFloat.op_Implicit(0.1f), finishEvent = FsmEvent.Finished } }; state.Actions = list.ToArray(); } } private void AddBlastBurst2BlackoutActions(FsmState state) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown if (state != null) { List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ExecuteBlastBurst2Attack") { Value = "ExecuteBlastBurst2Attack" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.storeResult = new FsmVar(); list.Add((FsmStateAction)(object)val); List list2 = list; state.Actions = list2.ToArray(); } } private void AddBlastBurst2AttackActions(FsmState state) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if (state != null) { List list = new List { (FsmStateAction)new Wait { time = FsmFloat.op_Implicit(0.1f), finishEvent = FsmEvent.Finished } }; state.Actions = list.ToArray(); } } private void AddBlastBurst2EndActions(FsmState state) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if (state != null) { List list = new List { (FsmStateAction)new Wait { time = FsmFloat.op_Implicit(0.3f), finishEvent = FsmEvent.Finished } }; state.Actions = list.ToArray(); } } private void AddBlastBurst3PrepareActions(FsmState state) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Expected O, but got Unknown //IL_00b3: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown if (state != null) { List list = new List { (FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("InBurst3") { Value = "InBurst3" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }, (FsmStateAction)new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = _naChargeEffect } }, activate = new FsmBool(FsmBool.op_Implicit(true)), recursive = new FsmBool(FsmBool.op_Implicit(false)), resetOnExit = false, everyFrame = false }, (FsmStateAction)new Wait { time = FsmFloat.op_Implicit(0.2f), finishEvent = FsmEvent.Finished } }; state.Actions = list.ToArray(); } } private void AddBlastBurst3SpawnActions(FsmState state) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown if (state != null) { List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ExecuteBlastBurst3Attack") { Value = "ExecuteBlastBurst3Attack" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.storeResult = new FsmVar(); list.Add((FsmStateAction)(object)val); List list2 = list; state.Actions = list2.ToArray(); } } private void AddBlastBurst3ConvergeActions(FsmState state) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if (state != null) { List list = new List { (FsmStateAction)new Wait { time = FsmFloat.op_Implicit(0.05f), finishEvent = FsmEvent.Finished } }; state.Actions = list.ToArray(); } } private void AddBlastBurst3FinalActions(FsmState state) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if (state != null) { List list = new List { (FsmStateAction)new Wait { time = FsmFloat.op_Implicit(0.05f), finishEvent = FsmEvent.Finished } }; state.Actions = list.ToArray(); } } private void AddBlastBurst3EndActions(FsmState state) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_006b: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown if (state != null) { List list = new List { (FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" } }, sendEvent = new FsmString("END BURST3") { Value = "END BURST3" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }, (FsmStateAction)new Wait { time = FsmFloat.op_Implicit(0.1f), finishEvent = FsmEvent.Finished } }; state.Actions = list.ToArray(); } } private void CreateClimbPhaseAttackStates() { if (!((Object)(object)_attackControlFsm == (Object)null)) { Log.Info("=== 开始创建爬升阶段攻击状态链 ==="); GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { _fwPinManager = val.GetComponent(); } FsmState[] array = FsmStateBuilder.CreateStates(_attackControlFsm.Fsm, ("Climb Attack Choice", "爬升阶段攻击选择"), ("Climb Orbit Attack", "爬升阶段环绕攻击"), ("Climb Silk Ball Attack", "爬升阶段丝球攻击"), ("Climb Pin Attack", "爬升阶段 Pin 攻击"), ("Climb Attack Cooldown", "爬升阶段攻击冷却")); FsmStateBuilder.AddStatesToFsm(_attackControlFsm, array); FsmState val2 = array[0]; FsmState val3 = array[1]; FsmState silkBallState = array[2]; FsmState pinState = array[3]; FsmState cooldownState = array[4]; FsmState idleState = _idleState; AddClimbAttackChoiceActions(val2); AddClimbNeedleAttackActions(val3); AddClimbSilkBallAttackActions(silkBallState); AddClimbPinAttackActions(pinState); AddClimbAttackCooldownActions(cooldownState); AddClimbAttackTransitionsWithPin(val2, val3, silkBallState, pinState, cooldownState); AddClimbPhaseAttackGlobalTransitions(val2, idleState); Log.Info("=== 爬升阶段攻击状态链创建完成 ==="); } } private void AddClimbAttackChoiceActions(FsmState choiceState) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown List list = new List(); FsmEvent fsmEvent = FsmEvent.GetFsmEvent("CLIMB ORBIT ATTACK"); FsmEvent fsmEvent2 = FsmEvent.GetFsmEvent("CLIMB SILK BALL ATTACK"); FsmEvent fsmEvent3 = FsmEvent.GetFsmEvent("CLIMB PIN ATTACK"); SendRandomEventV4 val = new SendRandomEventV4(); val.events = (FsmEvent[])(object)new FsmEvent[3] { fsmEvent, fsmEvent2, fsmEvent3 }; val.weights = (FsmFloat[])(object)new FsmFloat[3] { new FsmFloat(FsmFloat.op_Implicit(1f)), new FsmFloat(FsmFloat.op_Implicit(0.6f)), new FsmFloat(FsmFloat.op_Implicit(1.2f)) }; val.eventMax = (FsmInt[])(object)new FsmInt[3] { new FsmInt(FsmInt.op_Implicit(1)), new FsmInt(FsmInt.op_Implicit(1)), new FsmInt(FsmInt.op_Implicit(1)) }; val.missedMax = (FsmInt[])(object)new FsmInt[3] { new FsmInt(FsmInt.op_Implicit(2)), new FsmInt(FsmInt.op_Implicit(3)), new FsmInt(FsmInt.op_Implicit(2)) }; val.activeBool = new FsmBool { UseVariable = true, Value = true }; list.Add((FsmStateAction)(object)val); choiceState.Actions = list.ToArray(); } private void AddClimbNeedleAttackActions(FsmState needleState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ExecuteClimbOrbitAttack") { Value = "ExecuteClimbOrbitAttack" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(3.5f)), finishEvent = FsmEvent.Finished }); needleState.Actions = list.ToArray(); } private void AddClimbSilkBallAttackActions(FsmState silkBallState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" }, fsm = _bossControlFsm, variableName = new FsmString("Climb Cast Pending") { Value = "Climb Cast Pending" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ExecuteClimbSilkBallWithWebAttack") { Value = "ExecuteClimbSilkBallWithWebAttack" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(4f)), finishEvent = FsmEvent.Finished }); silkBallState.Actions = list.ToArray(); } private void AddClimbAttackCooldownActions(FsmState cooldownState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new WaitRandom { timeMin = new FsmFloat(FsmFloat.op_Implicit(2f)), timeMax = new FsmFloat(FsmFloat.op_Implicit(3f)), finishEvent = FsmEvent.Finished }); cooldownState.Actions = list.ToArray(); } private void AddClimbPhaseAttackGlobalTransitions(FsmState climbAttackChoice, FsmState? idleState) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown List list = _attackControlFsm.Fsm.GlobalTransitions.ToList(); list.Add(new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("CLIMB PHASE ATTACK"), toState = "Climb Attack Choice", toFsmState = climbAttackChoice }); if (idleState != null) { list.Add(new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("CLIMB PHASE END"), toState = "Idle", toFsmState = idleState }); } _attackControlFsm.Fsm.GlobalTransitions = list.ToArray(); Log.Info("爬升阶段攻击全局转换添加完成"); } public void ExecuteClimbNeedleAttack() { Log.Info("执行爬升阶段针攻击(随机Hand)"); ((MonoBehaviour)this).StartCoroutine(ClimbNeedleAttackCoroutine()); } [IteratorStateMachine(typeof(d__61))] private IEnumerator ClimbNeedleAttackCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__61(0) { <>4__this = this }; } public void ExecuteClimbSilkBallAttack() { Log.Info("执行爬升阶段丝球攻击(四角生成)"); ((MonoBehaviour)this).StartCoroutine(ClimbSilkBallAttackCoroutine()); } [IteratorStateMachine(typeof(d__63))] private IEnumerator ClimbSilkBallAttackCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__63(0) { <>4__this = this }; } private void AddClimbPinAttackActions(FsmState pinState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ExecuteClimbPinAttack") { Value = "ExecuteClimbPinAttack" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(6f)), finishEvent = FsmEvent.Finished }); pinState.Actions = list.ToArray(); } private void AddClimbAttackTransitionsWithPin(FsmState choiceState, FsmState orbitState, FsmState silkBallState, FsmState pinState, FsmState cooldownState) { choiceState.Transitions = (FsmTransition[])(object)new FsmTransition[3] { FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB ORBIT ATTACK"), orbitState), FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB SILK BALL ATTACK"), silkBallState), FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB PIN ATTACK"), pinState) }; FsmStateBuilder.SetFinishedTransition(orbitState, cooldownState); FsmStateBuilder.SetFinishedTransition(silkBallState, cooldownState); FsmStateBuilder.SetFinishedTransition(pinState, cooldownState); FsmStateBuilder.SetFinishedTransition(cooldownState, choiceState); Log.Info("爬升阶段攻击转换设置完成(ClimbOrbit、ClimbSilkBall、ClimbPin)"); } public void ExecuteClimbPinAttack() { Log.Info("执行爬升阶段 ClimbPin 攻击"); ((MonoBehaviour)this).StartCoroutine(ClimbPinAttackCoroutine()); } [IteratorStateMachine(typeof(d__67))] private IEnumerator ClimbPinAttackCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__67(0) { <>4__this = this }; } private void ShuffleList(List list) { int num = list.Count; while (num > 1) { num--; int index = Random.Range(0, num + 1); T value = list[index]; list[index] = list[num]; list[num] = value; } } public void ConfigureClimbOrbitAttack() { if ((Object)(object)handLBehavior != (Object)null) { handLBehavior.SetOrbitAttackConfig(-1f, 0.7f); } if ((Object)(object)handRBehavior != (Object)null) { handRBehavior.SetOrbitAttackConfig(-1f, 0.7f); } } public void ExecuteClimbOrbitAttack() { Log.Info("执行爬升阶段 ClimbOrbit 攻击(双 Hand 环绕)"); ((MonoBehaviour)this).StartCoroutine(ClimbOrbitAttackCoroutine()); } [IteratorStateMachine(typeof(d__71))] private IEnumerator ClimbOrbitAttackCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__71(0) { <>4__this = this }; } public void ExecuteClimbSilkBallWithWebAttack() { Log.Info("执行爬升阶段 ClimbSilkBall 攻击(单个丝球 + 旋转丝网)"); ((MonoBehaviour)this).StartCoroutine(ClimbSilkBallWithWebAttackCoroutine()); } [IteratorStateMachine(typeof(d__73))] private IEnumerator ClimbSilkBallWithWebAttackCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__73(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__74))] private IEnumerator SpawnCrossWebsForSilkBall(Transform silkBallTransform, int webCount) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__74(0) { <>4__this = this, silkBallTransform = silkBallTransform, webCount = webCount }; } private void Start() { ((MonoBehaviour)this).StartCoroutine(DelayedSetup()); } private void Update() { if (_isGeneratingSilkBall != null && _isGeneratingSilkBall.Value && (Object)(object)_attackControlFsm != (Object)null) { string activeStateName = _attackControlFsm.ActiveStateName; if (activeStateName != "Silk Ball Move Prepare") { Log.Info("检测到不在移动丝球准备状态(当前状态:" + activeStateName + "),停止生成丝球"); StopGeneratingSilkBall(); } else { CheckAndSpawnSilkBall(); } } } private void OnDestroy() { ((MonoBehaviour)this).StopAllCoroutines(); } [IteratorStateMachine(typeof(d__136))] private IEnumerator DelayedSetup() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__136(0) { <>4__this = this }; } private void GetComponents() { //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Expected O, but got Unknown _attackControlFsm = FSMUtility.LocateMyFSM(((Component)this).gameObject, fsmName); if ((Object)(object)_attackControlFsm == (Object)null) { Log.Error("未找到 " + fsmName + " FSM"); return; } _handLFsmVar = _attackControlFsm.FsmVariables.FindFsmGameObject("Hand L"); _handRFsmVar = _attackControlFsm.FsmVariables.FindFsmGameObject("Hand R"); FsmGameObject? handLFsmVar = _handLFsmVar; handL = ((handLFsmVar != null) ? handLFsmVar.Value : null); FsmGameObject? handRFsmVar = _handRFsmVar; handR = ((handRFsmVar != null) ? handRFsmVar.Value : null); _handLControlFsm = (((Object)(object)handL != (Object)null) ? FSMUtility.LocateMyFSM(handL, "Hand Control") : null); _handRControlFsm = (((Object)(object)handR != (Object)null) ? FSMUtility.LocateMyFSM(handR, "Hand Control") : null); if ((Object)(object)_handLControlFsm == (Object)null) { Log.Warn("未找到 Hand L 的 Hand Control FSM"); } if ((Object)(object)_handRControlFsm == (Object)null) { Log.Warn("未找到 Hand R 的 Hand Control FSM"); } CacheOriginalStates(); Transform parent = ((Component)this).transform.parent; if ((Object)(object)parent == (Object)null) { Log.Error("未找到bossScene"); return; } _bossScene = ((Component)parent).gameObject; Transform obj = parent.Find("Silk_Hair"); _silkHair = ((obj != null) ? ((Component)obj).gameObject : null); if ((Object)(object)_silkHair == (Object)null) { Log.Warn("未找到 Silk_Hair 物体(可能名称不同或不存在)"); } _bossControlFsm = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Control"); if ((Object)(object)_bossControlFsm == (Object)null) { Log.Error("未找到 BossControl FSM"); } _strandPatterns = ((Component)_bossScene.transform.Find("Strand Patterns")).gameObject; InitializeSilkBallDashVariables(); _specialAttackVar = _attackControlFsm.FsmVariables.FindFsmBool("Special Attack"); InitializeNaChargeEffect(); GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { _silkBallManager = val.GetComponent(); if ((Object)(object)_silkBallManager == (Object)null) { Log.Warn("未找到 SilkBallManager 组件"); } _singleWebManager = val.GetComponent(); if ((Object)(object)_singleWebManager == (Object)null) { Log.Warn("未找到 SingleWebManager 组件"); } Transform val2 = val.transform.Find("DomainBehavior"); if ((Object)(object)val2 != (Object)null) { _domainBehavior = ((Component)val2).GetComponent(); Log.Info("复用已存在的 DomainBehavior"); } else { GameObject val3 = new GameObject("DomainBehavior"); val3.transform.SetParent(val.transform); _domainBehavior = val3.AddComponent(); Log.Info("创建新的 DomainBehavior"); } } else { Log.Warn("未找到 AnySilkBossManager GameObject"); } InitializeHandBehaviors(); InitializeSilkBallReleaseActions(); InitializeSpikeSystem(); InitializeDamageReductionFsmReferences(); } private void InitializeDamageReductionFsmReferences() { DamageReductionManager component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { Log.Warn("[减伤系统] 未找到 DamageReductionManager 组件"); return; } PlayMakerFSM phaseControl = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Phase Control"); component.InitializeFsmReferences(_attackControlFsm, phaseControl); } private void InitializeNaChargeEffect() { //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_bossScene == (Object)null || (Object)(object)_naChargeEffect != (Object)null) { return; } HeroController instance = HeroController.instance; if ((Object)(object)instance == (Object)null) { Log.Warn("未找到 HeroController,无法初始化 NA Charge 特效"); return; } Transform val = instance.transform.Find("Effects"); if ((Object)(object)val == (Object)null) { Log.Warn("未找到 Hero/Effects,无法初始化 NA Charge 特效"); return; } Transform val2 = val.Find("NA Charge"); if ((Object)(object)val2 == (Object)null) { Log.Warn("未找到 NA Charge(Hero/Effects 下),无法初始化特效"); return; } GameObject val3 = Object.Instantiate(((Component)val2).gameObject, ((Component)this).gameObject.transform); ((Object)val3).name = "NA Charge (Boss)"; val3.transform.localPosition = new Vector3(0f, 4.3f, 0f); val3.transform.localRotation = Quaternion.identity; val3.transform.localScale = 3f * Vector3.one; val3.SetActive(false); _naChargeEffect = val3; } private void CacheOriginalStates() { if (!((Object)(object)_attackControlFsm == (Object)null)) { _attackChoiceState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Attack Choice")); _moveRestartState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Move Restart")); _moveRestart3State = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Move Restart 3")); _idleState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Idle")); _webRecoverState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Web Recover")); _singleState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Single")); _doubleState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Double")); _rubbleAttackQuestionState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Rubble Attack?")); _attackStopState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Attack Stop")); _dashAttackState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Dash Attack")); _dashAttackAnticState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Dash Attack Antic")); _dashAttackEndState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Dash Attack End")); _spikeLiftAimState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Spike Lift Aim")); _spikeLiftAim2State = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Spike Lift Aim 2")); } } private void InitializeSilkBallReleaseActions() { if ((Object)(object)_attackControlFsm == (Object)null) { Log.Warn("无法初始化丝球释放动作:_attackControlFsm为null"); return; } _cachedRoarEmitter = CloneAction("Roar", 0, (Func?)null); if (_cachedRoarEmitter != null) { ((FsmStateAction)_cachedRoarEmitter).Fsm = _attackControlFsm.Fsm; ((FsmStateAction)_cachedRoarEmitter).Owner = ((Component)_attackControlFsm).gameObject; } _cachedPlayRoarAudio = CloneAction("Roar", 0, (Func?)null); if (_cachedPlayRoarAudio != null) { ((FsmStateAction)_cachedPlayRoarAudio).Fsm = _attackControlFsm.Fsm; ((FsmStateAction)_cachedPlayRoarAudio).Owner = ((Component)_attackControlFsm).gameObject; } } private void ModifyAttackControlFSM() { if ((Object)(object)_attackControlFsm == (Object)null) { return; } Log.Info("开始修改Attack Control FSM"); _handPtnChoiceState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == handPtnChoiceState)); if (_handPtnChoiceState == null) { Log.Error("未找到状态: " + handPtnChoiceState); return; } _waitForHandsReadyState = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == waitForHandsReadyState)); if (_waitForHandsReadyState == null) { Log.Error("未找到状态: " + waitForHandsReadyState); return; } CreateOrbitAttackState(); CreateSilkBallAttackStates(); CreateSilkBallWithWebAttackStates(); CreateClimbPhaseAttackStates(); CreateP6WebAttackStates(); InitializeBlastBurstAttacks(); ModifyRubbleAttackForP6Web(); ModifySendRandomEventAction(); ModifyAttackChoiceForSilkBall(); PatchOriginalAttackPatterns(); PatchDashOrbitForDashAttack(); AddAttactStopAction(); ModifySpikeLiftAimState(); PatchShiftHeroStateSetMeshRenderer(); RelinkAllEventReferences(); Log.Info("Attack Control FSM修改完成"); } private void RegisterAttackControlEvents() { if (!((Object)(object)_attackControlFsm == (Object)null)) { FsmStateBuilder.RegisterEvents(_attackControlFsm, "ORBIT ATTACK", "ORBIT START Hand L", "ORBIT START Hand R", "DASH ORBIT START Hand L", "DASH ORBIT START Hand R", "DASH ORBIT SHOOT Hand L", "DASH ORBIT SHOOT Hand R", "DASH HANDS READY", "SILK BALL ATTACK", "SILK BALL WITH WEB ATTACK", "SILK BALL WITH WEB ATTACK DONE", "SILK BALL STATIC", "SILK BALL DASH", "SILK BALL DASH START", "SILK BALL DASH END", "NULL", "CLIMB PHASE ATTACK", "CLIMB PHASE END", "P6 WEB ATTACK", "P6 DOMAIN SLASH DONE"); _orbitAttackEvent = FsmEvent.GetFsmEvent("ORBIT ATTACK"); _orbitStartHandLEvent = FsmEvent.GetFsmEvent("ORBIT START Hand L"); _orbitStartHandREvent = FsmEvent.GetFsmEvent("ORBIT START Hand R"); _silkBallAttackEvent = FsmEvent.GetFsmEvent("SILK BALL ATTACK"); _silkBallWithWebAttackEvent = FsmEvent.GetFsmEvent("SILK BALL WITH WEB ATTACK"); _silkBallWithWebAttackDoneEvent = FsmEvent.GetFsmEvent("SILK BALL WITH WEB ATTACK DONE"); _silkBallStaticEvent = FsmEvent.GetFsmEvent("SILK BALL STATIC"); _silkBallDashEvent = FsmEvent.GetFsmEvent("SILK BALL DASH"); _silkBallDashStartEvent = FsmEvent.GetFsmEvent("SILK BALL DASH START"); _silkBallDashEndEvent = FsmEvent.GetFsmEvent("SILK BALL DASH END"); _nullEvent = FsmEvent.GetFsmEvent("NULL"); _p6WebAttackEvent = FsmEvent.GetFsmEvent("P6 WEB ATTACK"); } } private void RelinkAllEventReferences() { if (!((Object)(object)_attackControlFsm == (Object)null)) { FsmStateBuilder.ReinitializeFsmVariables(_attackControlFsm); } } private T? CloneAction(string sourceStateName, int matchIndex = 0, Func? predicate = null) where T : FsmStateAction { string sourceStateName2 = sourceStateName; if ((Object)(object)_attackControlFsm == (Object)null) { Log.Warn("CloneAction调用时_attackControlFsm为null"); return default(T); } FsmState val = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == sourceStateName2)); if (val == null) { Log.Warn("未找到用于克隆的状态: " + sourceStateName2); return default(T); } int num = 0; FsmStateAction[] actions = val.Actions; foreach (FsmStateAction val2 in actions) { T val3 = (T)(object)((val2 is T) ? val2 : null); if (val3 != null && (predicate == null || predicate(val3))) { if (num == matchIndex) { return (T)(object)CloneAction((FsmStateAction)(object)val3); } num++; } } Log.Warn($"在状态{sourceStateName2}中未找到类型{typeof(T).Name}的第{matchIndex}个匹配动作"); return default(T); } public T? CloneActionFromAttackControlFSM(string sourceStateName, int matchIndex = 0, Func? predicate = null) where T : FsmStateAction { return CloneAction(sourceStateName, matchIndex, predicate); } public void ClearActiveSilkBalls() { if (_activeSilkBalls != null && _activeSilkBalls.Count > 0) { Log.Info($"清理活跃丝球列表,当前数量: {_activeSilkBalls.Count}"); _activeSilkBalls.Clear(); } } public void StopAllSilkBallCoroutines() { if (_silkBallSummonCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(_silkBallSummonCoroutine); _silkBallSummonCoroutine = null; Log.Info("已停止丝球召唤协程"); } if (_silkBallWithWebAttackCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(_silkBallWithWebAttackCoroutine); _silkBallWithWebAttackCoroutine = null; Log.Info("已停止丝球+丝线协程"); } if ((Object)(object)_naChargeEffect != (Object)null) { _naChargeEffect.SetActive(false); } } private FsmStateAction[] CloneStateActions(string sourceStateName, Func? skipPredicate = null) { string sourceStateName2 = sourceStateName; if ((Object)(object)_attackControlFsm == (Object)null) { Log.Warn("CloneStateActions调用时_attackControlFsm为null"); return Array.Empty(); } FsmState val = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == sourceStateName2)); if (val == null) { Log.Warn("未找到用于克隆的状态: " + sourceStateName2); return Array.Empty(); } List list = new List(val.Actions.Length); FsmStateAction[] actions = val.Actions; foreach (FsmStateAction val2 in actions) { if (val2 != null) { if (skipPredicate != null && skipPredicate(val2)) { Log.Info("跳过克隆动作 " + ((object)val2).GetType().Name + " 来自 " + sourceStateName2); } else { list.Add(CloneAction(val2)); } } } return list.ToArray(); } private FsmStateAction CloneAction(FsmStateAction action) { Type type = ((object)action).GetType(); object? obj = Activator.CreateInstance(type); FsmStateAction val = (FsmStateAction)((obj is FsmStateAction) ? obj : null); if (val == null) { Log.Warn("无法克隆动作: " + type.FullName); return action; } CopyActionFields(action, val, type); return val; } private void CopyActionFields(object source, object target, Type type) { FieldInfo[] fields = type.GetFields(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (FieldInfo fieldInfo in fields) { fieldInfo.SetValue(target, fieldInfo.GetValue(source)); } Type baseType = type.BaseType; if (baseType != null && baseType != typeof(object)) { CopyActionFields(source, target, baseType); } } private void InitializeHandBehaviors() { if ((Object)(object)handL != (Object)null) { handLBehavior = handL.GetComponent(); if ((Object)(object)handLBehavior == (Object)null) { handLBehavior = CreateHandBehavior(handL); } } else { Log.Warn("未找到 Hand L 对象(FSM 变量为 null)"); } if ((Object)(object)handR != (Object)null) { handRBehavior = handR.GetComponent(); if ((Object)(object)handRBehavior == (Object)null) { handRBehavior = CreateHandBehavior(handR); } } else { Log.Warn("未找到 Hand R 对象(FSM 变量为 null)"); } } private MemoryHandControlBehavior CreateHandBehavior(GameObject handObj) { return handObj.AddComponent(); } public void ConfigureOrbitAttack() { if ((Object)(object)_attackControlFsm == (Object)null) { return; } FsmBool val = _attackControlFsm.FsmVariables.FindFsmBool("Special Attack"); if (val != null && val.Value) { if ((Object)(object)handLBehavior != (Object)null) { handLBehavior.SetOrbitAttackConfig(1f, 0.4f); } if ((Object)(object)handRBehavior != (Object)null) { handRBehavior.SetOrbitAttackConfig(-1f, 0.4f); } Log.Info("Phase2环绕攻击配置:Hand L顺时针,Hand R逆时针,间隔0.4秒"); } else { if ((Object)(object)handLBehavior != (Object)null) { handLBehavior.SetOrbitAttackConfig(1f, 0.5f); } if ((Object)(object)handRBehavior != (Object)null) { handRBehavior.SetOrbitAttackConfig(1f, 0.5f); } Log.Info("普通环绕攻击配置:双Hand顺时针,间隔0.5秒"); } } private void CreateOrbitAttackState() { _orbitAttackState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, newOrbitAttackState, "环绕攻击状态"); AddOrbitAttackActions(); CreateOrbitAttackSubStates(); } private void AddOrbitAttackActions() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_008e: Expected O, but got Unknown //IL_0093: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown //IL_00fd: Expected O, but got Unknown //IL_0102: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ConfigureOrbitAttack") { Value = "ConfigureOrbitAttack" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; CallMethod val2 = val; SendEventByName val3 = new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = handL } } }, sendEvent = FsmString.op_Implicit("ORBIT START Hand L"), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }; SendEventByName val4 = new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = handR } } }, sendEvent = FsmString.op_Implicit("ORBIT START Hand R"), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }; Wait val5 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(2f)), finishEvent = FsmEvent.Finished }; _orbitAttackState.Actions = (FsmStateAction[])(object)new FsmStateAction[4] { (FsmStateAction)val2, (FsmStateAction)val3, (FsmStateAction)val4, (FsmStateAction)val5 }; } private void CreateOrbitAttackSubStates() { if (!((Object)(object)_attackControlFsm == (Object)null)) { FsmEvent orCreateEvent = FsmStateBuilder.GetOrCreateEvent(_attackControlFsm, "ORBIT_FIRST_SHOOT_DONE"); FsmEvent orCreateEvent2 = FsmStateBuilder.GetOrCreateEvent(_attackControlFsm, "ORBIT_SECOND_SHOOT_DONE"); FsmState[] array = FsmStateBuilder.CreateStates(_attackControlFsm.Fsm, ("Orbit First Shoot", "发送第一个SHOOT事件"), ("Orbit Second Shoot", "发送第二个SHOOT事件")); FsmStateBuilder.AddStatesToFsm(_attackControlFsm, array); FsmState orbitFirstShootState = array[0]; FsmState orbitSecondShootState = array[1]; SetOrbitFirstShootActions(orbitFirstShootState, orCreateEvent); SetOrbitSecondShootActions(orbitSecondShootState, orCreateEvent2); AddOrbitAttackTransitions(orbitFirstShootState); if (_waitForHandsReadyState != null) { SetOrbitAttackSubStateTransitions(orbitFirstShootState, orbitSecondShootState, _waitForHandsReadyState, orCreateEvent, orCreateEvent2); } } } private void SetOrbitFirstShootActions(FsmState orbitFirstShootState, FsmEvent doneEvent) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = FsmObject.op_Implicit((Object)(object)this); val.methodName = FsmString.op_Implicit("SendRandomShootEvent"); val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(1.5f)), finishEvent = doneEvent }; orbitFirstShootState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, (FsmStateAction)val3 }; } private void SetOrbitSecondShootActions(FsmState orbitSecondShootState, FsmEvent doneEvent) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = FsmObject.op_Implicit((Object)(object)this); val.methodName = FsmString.op_Implicit("SendSecondShootEvent"); val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(2f)), finishEvent = doneEvent }; orbitSecondShootState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, (FsmStateAction)val3 }; } private void SetOrbitAttackSubStateTransitions(FsmState orbitFirstShootState, FsmState orbitSecondShootState, FsmState waitForHandsReadyState, FsmEvent firstShootDoneEvent, FsmEvent secondShootDoneEvent) { orbitFirstShootState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(firstShootDoneEvent, orbitSecondShootState) }; orbitSecondShootState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(secondShootDoneEvent, waitForHandsReadyState) }; } private void AddOrbitAttackTransitions(FsmState orbitFirstShootState) { FsmStateBuilder.AddTransition(_handPtnChoiceState, FsmStateBuilder.CreateTransition(_orbitAttackEvent, _orbitAttackState)); FsmStateBuilder.SetFinishedTransition(_orbitAttackState, orbitFirstShootState); } private void ModifySendRandomEventAction() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Expected O, but got Unknown if (_handPtnChoiceState == null) { return; } List list = _handPtnChoiceState.Actions.OfType().ToList(); foreach (SendRandomEventV4 item in list) { FsmEvent[] events = item.events; FsmFloat[] weights = item.weights; FsmInt[] eventMax = item.eventMax; FsmInt[] missedMax = item.missedMax; FsmBool activeBool = item.activeBool; FsmEvent[] array = (FsmEvent[])(object)new FsmEvent[events.Length + 1]; FsmFloat[] array2 = (FsmFloat[])(object)new FsmFloat[weights.Length + 1]; FsmInt[] array3 = (FsmInt[])(object)new FsmInt[eventMax.Length + 1]; FsmInt[] array4 = (FsmInt[])(object)new FsmInt[missedMax.Length + 1]; FsmBool val = new FsmBool(activeBool); for (int i = 0; i < events.Length; i++) { array[i] = events[i]; array2[i] = weights[i]; array3[i] = new FsmInt(FsmInt.op_Implicit(1)); array4[i] = missedMax[i]; } int num = events.Length; array[num] = FsmEvent.GetFsmEvent("ORBIT ATTACK"); array2[num] = new FsmFloat(FsmFloat.op_Implicit(2f)); array3[num] = new FsmInt(FsmInt.op_Implicit(1)); array4[num] = new FsmInt(FsmInt.op_Implicit(4)); val = new FsmBool(activeBool); item.events = array; item.weights = array2; item.eventMax = array3; item.missedMax = array4; item.activeBool = val; } Log.Info("Hand Ptn Choice: 所有原有事件的 eventMax 已改为 1"); } public void SendRandomShootEvent() { Log.Info("随机选择Hand发送SHOOT事件"); bool flag = Random.Range(0, 2) == 0; string text = (flag ? "Hand L" : "Hand R"); string secondHandName = (flag ? "Hand R" : "Hand L"); Log.Info("选择 " + text + " 作为第一个攻击的Hand"); GameObject val = (flag ? handL : handR); if ((Object)(object)val != (Object)null) { PlayMakerFSM component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.SendEvent("SHOOT " + text); Log.Info("已发送SHOOT事件给 " + text); } } _secondHandName = secondHandName; _secondHandObject = (flag ? handR : handL); } public void SendSecondShootEvent() { Log.Info("发送SHOOT事件给第二个Hand: " + _secondHandName); if ((Object)(object)_secondHandObject != (Object)null) { PlayMakerFSM component = _secondHandObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.SendEvent("SHOOT " + _secondHandName); Log.Info("已发送SHOOT事件给 " + _secondHandName); } } } private void ModifyRubbleAttackForP6Web() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown if ((Object)(object)_attackControlFsm == (Object)null) { return; } FsmState rubbleAttackQuestionState = _rubbleAttackQuestionState; if (rubbleAttackQuestionState == null) { Log.Warn("未找到Rubble Attack?状态,无法添加P6 Web Attack监听"); return; } List list = rubbleAttackQuestionState.Actions.ToList(); list.Insert(2, (FsmStateAction)new BoolTest { boolVariable = ((IEnumerable)_attackControlFsm.FsmVariables.BoolVariables.ToList()).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == "Do P6 Web Attack")), isTrue = _p6WebAttackEvent, isFalse = FsmEvent.GetFsmEvent("NULL"), everyFrame = false }); rubbleAttackQuestionState.Actions = list.ToArray(); if (_p6DomainSlashState != null) { FsmStateBuilder.AddTransition(rubbleAttackQuestionState, FsmStateBuilder.CreateTransition(_p6WebAttackEvent, _p6DomainSlashState)); } Log.Info("Rubble Attack?状态已添加P6 Web Attack监听"); } private void CreateP6WebAttackStates() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown Log.Info("=== 开始创建P6 领域次元斩状态 ==="); FsmStateBuilder.RegisterEvents(_attackControlFsm, "P6 DOMAIN SLASH DONE"); _p6DomainSlashDoneEvent = FsmEvent.GetFsmEvent("P6 DOMAIN SLASH DONE"); FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "P6 Domain Slash", "P6领域次元斩:5波递增攻击+领域结界"); FsmStateBuilder.AddStateToFsm(_attackControlFsm, val); _p6DomainSlashState = val; FsmStateAction[] array = new FsmStateAction[1]; CallMethod val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("ExecuteDomainSlash") { Value = "ExecuteDomainSlash" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; array[0] = (FsmStateAction)val2; val.Actions = (FsmStateAction[])(object)array; if (_moveRestartState != null && _p6DomainSlashDoneEvent != null) { val.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(_p6DomainSlashDoneEvent, _moveRestartState) }; } Log.Info("=== P6 领域次元斩状态创建完成 ==="); } public void ExecuteDomainSlash() { if (BigSilkBallPhaseGuard.IsActive) { Log.Info("[MemoryAttackControl] 大丝球阶段中,跳过 P6 领域次元斩"); PlayMakerFSM? attackControlFsm = _attackControlFsm; if (attackControlFsm != null) { attackControlFsm.SendEvent("P6 DOMAIN SLASH DONE"); } } else { ((MonoBehaviour)this).StartCoroutine(ExecuteDomainSlashCoroutine()); } } [IteratorStateMachine(typeof(d__179))] private IEnumerator ExecuteDomainSlashCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__179(0) { <>4__this = this }; } private void CleanupDomainSlashAfterGuard() { Log.Info("[MemoryAttackControl] 大丝球阶段打断 P6 领域次元斩"); CleanupAllWebs(); _domainBehavior?.DeactivateDomain(); PlayMakerFSM? attackControlFsm = _attackControlFsm; if (attackControlFsm != null) { attackControlFsm.SendEvent("P6 DOMAIN SLASH DONE"); } } private void CleanupAllWebs() { Log.Info("=== 开始清理所有P6 Web ==="); int num = 0; foreach (WebSlotInfo webSlot in _webSlots) { for (int i = 0; i < 2; i++) { if ((Object)(object)webSlot.WebPair[i] != (Object)null) { webSlot.WebPair[i].StopAttack(); webSlot.WebPair[i].ResetCooldown(); num++; } } } _webSlots.Clear(); Log.Info($"已清理 {num} 根web"); } [IteratorStateMachine(typeof(d__182))] private IEnumerator ExecuteWave(int waveIndex) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__182(0) { <>4__this = this, waveIndex = waveIndex }; } private Vector3 CalculateNewSlotPosition(Vector3 playerPos, int waveIndex) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) if (_webSlots.Count == 0) { return playerPos; } WebSlotInfo webSlotInfo = null; float num = float.MaxValue; foreach (WebSlotInfo webSlot in _webSlots) { float num2 = Vector2.Distance(new Vector2(webSlot.Position.x, webSlot.Position.y), new Vector2(playerPos.x, playerPos.y)); if (num2 < num) { num = num2; webSlotInfo = webSlot; } } if (webSlotInfo == null) { return playerPos; } Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(playerPos.x - webSlotInfo.Position.x, playerPos.y - webSlotInfo.Position.y); float num3 = webSlotInfo.Angle * (MathF.PI / 180f); Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(Mathf.Cos(num3), Mathf.Sin(num3)); Vector2 val3 = new Vector2(0f - val2.y, val2.x); Vector2 val4 = ((Vector2)(ref val3)).normalized; if (Vector2.Dot(val4, ((Vector2)(ref val)).normalized) < 0f) { val4 = -val4; } Vector3 position = webSlotInfo.Position; for (int i = 1; i <= 10; i++) { position = webSlotInfo.Position + new Vector3(val4.x * _parallelDistance * (float)i, val4.y * _parallelDistance * (float)i, 0f); bool flag = false; foreach (WebSlotInfo webSlot2 in _webSlots) { float num4 = Vector2.Distance(new Vector2(position.x, position.y), new Vector2(webSlot2.Position.x, webSlot2.Position.y)); if (num4 < _parallelDistance * 0.5f) { flag = true; break; } } if (!flag) { return position; } } return playerPos; } private float CalculateSlotAngle(int waveIndex) { if (waveIndex < 1 || waveIndex > _waveBaseAngles.Length) { return 45f; } float num = _waveBaseAngles[waveIndex - 1]; float num2 = Random.Range(0f - _angleRandomRange, _angleRandomRange); return num + num2; } [IteratorStateMachine(typeof(d__185))] private IEnumerator ActivateSlotWeb(WebSlotInfo slot, bool audioEnabled) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__185(0) { <>4__this = this, slot = slot, audioEnabled = audioEnabled }; } private GuardedSendEventByName CreateGuardedWebAttackAction(SendEventByName source, float delay) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown return new GuardedSendEventByName { eventTarget = source.eventTarget, sendEvent = source.sendEvent, delay = new FsmFloat(FsmFloat.op_Implicit(delay)), everyFrame = source.everyFrame, suppressDuringBigSilkBall = new FsmBool(FsmBool.op_Implicit(true)) }; } private GuardedSendEventByName CreateGuardedWebAttackAction(GuardedSendEventByName source, float delay) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) return new GuardedSendEventByName { eventTarget = source.eventTarget, sendEvent = source.sendEvent, delay = new FsmFloat(FsmFloat.op_Implicit(delay)), everyFrame = source.everyFrame, suppressDuringBigSilkBall = (FsmBool?)(((object)source.suppressDuringBigSilkBall) ?? ((object)new FsmBool(FsmBool.op_Implicit(true)))) }; } private GuardedSendEventByName? CloneWebAttackSendAction(string sourceStateName) { string sourceStateName2 = sourceStateName; if ((Object)(object)_attackControlFsm == (Object)null) { return null; } FsmState val = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == sourceStateName2)); if (((val != null) ? val.Actions : null) == null) { Log.Warn("未找到状态" + sourceStateName2 + ",无法克隆Web攻击发送动作"); return null; } FsmStateAction[] actions = val.Actions; foreach (FsmStateAction val2 in actions) { SendEventByName val3 = (SendEventByName)(object)((val2 is SendEventByName) ? val2 : null); if (val3 != null) { FsmString sendEvent = val3.sendEvent; if (((sendEvent != null) ? sendEvent.Value : null) == "ATTACK") { return CreateGuardedWebAttackAction(val3, 0.6f); } } if (val2 is GuardedSendEventByName guardedSendEventByName) { FsmString? sendEvent2 = guardedSendEventByName.sendEvent; if (((sendEvent2 != null) ? sendEvent2.Value : null) == "ATTACK") { return CreateGuardedWebAttackAction(guardedSendEventByName, 0.6f); } } } Log.Warn("在状态" + sourceStateName2 + "中未找到Web攻击发送动作"); return null; } private void PatchOriginalAttackPatterns() { if ((Object)(object)_strandPatterns == (Object)null) { Log.Warn("_strandPatterns为null,无法调整原版攻击Pattern!"); return; } Transform val = _strandPatterns.transform.Find("Pattern 1"); if ((Object)(object)val == (Object)null) { Log.Warn("未找到 Pattern 1,原版攻击调整跳过"); return; } if ((Object)(object)_strandPatterns.transform.Find("Pattern 3") != (Object)null) { Log.Info("Pattern 3 已存在,无需再次复制"); return; } int num = 0; for (int i = 3; i <= 10; i++) { string text = $"Pattern {i}"; if ((Object)(object)_strandPatterns.transform.Find(text) != (Object)null) { Log.Info(text + " 已存在,跳过复制"); continue; } GameObject val2 = Object.Instantiate(((Component)val).gameObject, _strandPatterns.transform); ((Object)val2).name = text; num++; } Log.Info($"梦境版已自动复制Pattern 1为{num}份(Pattern 3 到 Pattern 10)"); PatchSinglePathRandomCombo(); PatchSingleAndDoubleStatesLastActionsV2(); PatchAllPatternsWebBurstStartDelay(); } private void PatchSinglePathRandomCombo() { //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Expected O, but got Unknown //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Expected O, but got Unknown //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Expected O, but got Unknown //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown if ((Object)(object)_attackControlFsm == (Object)null) { return; } FsmState singleState = _singleState; FsmState webRecoverState = _webRecoverState; if (singleState == null || webRecoverState == null) { Log.Warn("Single或Web Recover状态不存在,无法补丁梦境版Single连击"); return; } GetRandomChild val = CloneAction("Double", 0, (Func?)null); GuardedSendEventByName guardedSendEventByName = CloneWebAttackSendAction("Double"); if (val != null && guardedSendEventByName != null) { List list = singleState.Actions.ToList(); list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)(object)guardedSendEventByName); singleState.Actions = list.ToArray(); Log.Info("已为Single状态添加第2次攻击动作"); } FsmEvent orCreateEvent = FsmStateBuilder.GetOrCreateEvent(_attackControlFsm, "SINGLE EXTRA"); FsmState val2 = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Single Extra Check", "梦境版Single第3次攻击随机判断"); FsmStateAction[] array = new FsmStateAction[1]; SendRandomEventV4 val3 = new SendRandomEventV4(); val3.events = (FsmEvent[])(object)new FsmEvent[2] { FsmEvent.Finished, orCreateEvent }; val3.weights = (FsmFloat[])(object)new FsmFloat[2] { new FsmFloat(FsmFloat.op_Implicit(0.6f)), new FsmFloat(FsmFloat.op_Implicit(0.4f)) }; val3.eventMax = (FsmInt[])(object)new FsmInt[2] { new FsmInt(FsmInt.op_Implicit(2)), new FsmInt(FsmInt.op_Implicit(2)) }; val3.missedMax = (FsmInt[])(object)new FsmInt[2] { new FsmInt(FsmInt.op_Implicit(99)), new FsmInt(FsmInt.op_Implicit(99)) }; val3.activeBool = new FsmBool { UseVariable = true, Value = true }; array[0] = (FsmStateAction)val3; val2.Actions = (FsmStateAction[])(object)array; GetRandomChild val4 = CloneAction("Double", 0, (Func?)null); GuardedSendEventByName guardedSendEventByName2 = CloneWebAttackSendAction("Double"); if (val4 == null || guardedSendEventByName2 == null) { Log.Warn("Single Extra: 克隆攻击动作失败"); return; } FsmState val5 = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Single Extra", "梦境版Single第3次攻击"); val5.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val4, guardedSendEventByName2 }; FsmStateBuilder.AddStatesToFsm(_attackControlFsm, val2, val5); FsmTransition[] transitions = singleState.Transitions; foreach (FsmTransition val6 in transitions) { if (val6.toState == "Web Recover" || val6.toFsmState == webRecoverState) { val6.toState = val2.Name; val6.toFsmState = val2; } } val2.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(orCreateEvent, val5), FsmStateBuilder.CreateFinishedTransition(webRecoverState) }; FsmStateBuilder.SetFinishedTransition(val5, webRecoverState); Log.Info("梦境版Single路径已补丁:随机2次(0.6)或3次(0.4)攻击"); } private void PatchAllPatternsWebBurstStartDelay() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown if ((Object)(object)_strandPatterns == (Object)null) { Log.Warn("_strandPatterns为null,无法Patch Web Burst Start延迟"); return; } int num = 0; foreach (Transform item2 in _strandPatterns.transform) { Transform val = item2; PlayMakerFSM val2 = FSMUtility.LocateMyFSM(((Component)val).gameObject, "silk_boss_pattern_control"); if ((Object)(object)val2 == (Object)null) { Log.Warn("Pattern " + ((Object)val).name + " 未找到 silk_boss_pattern_control FSM"); continue; } FsmState val3 = ((IEnumerable)val2.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Web Burst Start")); if (val3 == null) { Log.Warn("Pattern " + ((Object)val).name + " 未找到 Web Burst Start 状态"); continue; } FsmEvent fsmEvent = FsmEvent.GetFsmEvent("REPARENT"); Wait item = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(3.3f)), finishEvent = fsmEvent }; List list = val3.Actions.ToList(); list.Add((FsmStateAction)(object)item); val3.Actions = list.ToArray(); FsmTransition[] transitions = val3.Transitions; foreach (FsmTransition val4 in transitions) { if (val4.ToState == "Reparent" && val4.FsmEvent.Name == "FINISHED") { val4.FsmEvent = fsmEvent; } } val2.Fsm.InitData(); num++; } Log.Info($"梦境版共为 {num} 个Pattern的Web Burst Start状态添加了延迟"); } private void PatchSingleAndDoubleStatesLastActionsV2() { //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Expected O, but got Unknown //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Expected O, but got Unknown //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Expected O, but got Unknown //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Expected O, but got Unknown //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Expected O, but got Unknown //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Expected O, but got Unknown //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Expected O, but got Unknown //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Expected O, but got Unknown if ((Object)(object)_attackControlFsm == (Object)null) { return; } FsmState doubleState = _doubleState; FsmState webRecoverState = _webRecoverState; if (doubleState == null || webRecoverState == null) { Log.Warn("Double或Web Recover状态不存在,无法补丁梦境版Double连击链"); return; } if (doubleState.Actions != null) { int num = 0; FsmStateAction[] array = doubleState.Actions.ToArray(); for (int i = 0; i < array.Length; i++) { FsmStateAction obj = array[i]; SendEventByName val = (SendEventByName)(object)((obj is SendEventByName) ? obj : null); if (val != null) { FsmString sendEvent = val.sendEvent; if (((sendEvent != null) ? sendEvent.Value : null) == "ATTACK") { array[i] = (FsmStateAction)(object)CreateGuardedWebAttackAction(val, 0.6f); num++; } } } doubleState.Actions = array; if (num > 0) { Log.Info($"已将Double状态中{num}个SendEventByName替换为大丝球Guard延迟发送"); } } FsmEvent orCreateEvent = FsmStateBuilder.GetOrCreateEvent(_attackControlFsm, "QUADRUPLE"); GetRandomChild val2 = CloneAction("Double", 0, (Func?)null); GuardedSendEventByName guardedSendEventByName = CloneWebAttackSendAction("Double"); if (val2 == null || guardedSendEventByName == null) { Log.Warn("Triple: 克隆攻击动作失败"); return; } FsmState val3 = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Triple", "梦境版第3次攻击"); val3.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, guardedSendEventByName }; FsmState val4 = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Triple Extra Check", "梦境版第4次攻击随机判断"); FsmStateAction[] array2 = new FsmStateAction[1]; SendRandomEventV4 val5 = new SendRandomEventV4(); val5.events = (FsmEvent[])(object)new FsmEvent[2] { FsmEvent.Finished, orCreateEvent }; val5.weights = (FsmFloat[])(object)new FsmFloat[2] { new FsmFloat(FsmFloat.op_Implicit(0.5f)), new FsmFloat(FsmFloat.op_Implicit(0.5f)) }; val5.eventMax = (FsmInt[])(object)new FsmInt[2] { new FsmInt(FsmInt.op_Implicit(2)), new FsmInt(FsmInt.op_Implicit(2)) }; val5.missedMax = (FsmInt[])(object)new FsmInt[2] { new FsmInt(FsmInt.op_Implicit(99)), new FsmInt(FsmInt.op_Implicit(99)) }; val5.activeBool = new FsmBool { UseVariable = true, Value = true }; array2[0] = (FsmStateAction)val5; val4.Actions = (FsmStateAction[])(object)array2; GetRandomChild val6 = CloneAction("Double", 0, (Func?)null); GuardedSendEventByName guardedSendEventByName2 = CloneWebAttackSendAction("Double"); if (val6 == null || guardedSendEventByName2 == null) { Log.Warn("Quadruple: 克隆攻击动作失败"); return; } FsmState val7 = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Quadruple", "梦境版第4次攻击"); val7.Actions = (FsmStateAction[])(object)new FsmStateAction[3] { (FsmStateAction)val6, guardedSendEventByName2, (FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(1f)), finishEvent = FsmEvent.Finished } }; FsmStateBuilder.AddStatesToFsm(_attackControlFsm, val3, val4, val7); FsmTransition[] transitions = doubleState.Transitions; foreach (FsmTransition val8 in transitions) { if (val8.toState == "Web Recover" || val8.toFsmState == webRecoverState) { val8.toState = val3.Name; val8.toFsmState = val3; } } FsmStateBuilder.SetFinishedTransition(val3, val4); val4.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(orCreateEvent, val7), FsmStateBuilder.CreateFinishedTransition(webRecoverState) }; FsmStateBuilder.SetFinishedTransition(val7, webRecoverState); PatchRecoverWaitTimes(); Log.Info("梦境版Double路径已补丁:随机3次(0.5)或4次(0.5)攻击"); } private void PatchRecoverWaitTimes() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Expected O, but got Unknown if ((Object)(object)_attackControlFsm == (Object)null) { return; } FsmState webRecoverState = _webRecoverState; if (((webRecoverState != null) ? webRecoverState.Actions : null) != null) { FsmStateAction[] actions = webRecoverState.Actions; foreach (FsmStateAction val in actions) { Wait val2 = (Wait)(object)((val is Wait) ? val : null); if (val2 != null) { float value = val2.time.Value; val2.time = new FsmFloat(FsmFloat.op_Implicit(0.5f)); Log.Info($"梦境版已将 Web Recover 的 Wait 时间从 {value}s 调整为 0.5s"); break; } } } FsmState moveRestartState = _moveRestartState; if (((moveRestartState != null) ? moveRestartState.Actions : null) != null) { FsmStateAction[] actions2 = moveRestartState.Actions; foreach (FsmStateAction val3 in actions2) { Wait val4 = (Wait)(object)((val3 is Wait) ? val3 : null); if (val4 != null) { val4.time = new FsmFloat(FsmFloat.op_Implicit(0.6f)); break; } } } FsmState moveRestart3State = _moveRestart3State; if (((moveRestart3State != null) ? moveRestart3State.Actions : null) == null) { return; } FsmStateAction[] actions3 = moveRestart3State.Actions; foreach (FsmStateAction val5 in actions3) { Wait val6 = (Wait)(object)((val5 is Wait) ? val5 : null); if (val6 != null) { val6.time = new FsmFloat(FsmFloat.op_Implicit(0.6f)); break; } } } private void AddAttactStopAction() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown FsmState attackStopState = _attackStopState; if (attackStopState != null) { List list = attackStopState.Actions.ToList(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ClearSilkBallMethod") { Value = "ClearSilkBallMethod" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; list.Insert(0, (FsmStateAction)(object)val); list.Insert(0, (FsmStateAction)new KillDelayedEvents()); attackStopState.Actions = list.ToArray(); } } public void SuppressWebStrandAttacksForBigSilkBall() { Log.Info("[MemoryAttackControl] 大丝球阶段开始,抑制并清理 Web Strand 攻击"); PlayMakerFSM? attackControlFsm = _attackControlFsm; if (attackControlFsm != null) { Fsm fsm = attackControlFsm.Fsm; if (fsm != null) { fsm.KillDelayedEvents(); } } PlayMakerFSM? attackControlFsm2 = _attackControlFsm; if (attackControlFsm2 != null) { attackControlFsm2.SendEvent("ATTACK STOP"); } EventRegister.SendEvent("ATTACK CLEAR", (GameObject)null); PlayMakerFSM? attackControlFsm3 = _attackControlFsm; FsmBool val = ((attackControlFsm3 != null) ? attackControlFsm3.FsmVariables.FindFsmBool("Do P6 Web Attack") : null); if (val != null) { val.Value = false; } PlayMakerFSM? attackControlFsm4 = _attackControlFsm; FsmBool val2 = ((attackControlFsm4 != null) ? attackControlFsm4.FsmVariables.FindFsmBool("Did Web Strand Attack") : null); if (val2 != null) { val2.Value = false; } KillStrandPatternDelayedEvents(); GameObject val3 = GameObject.Find("AnySilkBossManager"); (((Object)(object)val3 != (Object)null) ? val3.GetComponent() : null)?.ClearPool(); } private void KillStrandPatternDelayedEvents() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown if ((Object)(object)_strandPatterns == (Object)null) { return; } foreach (Transform item in _strandPatterns.transform) { Transform val = item; PlayMakerFSM[] componentsInChildren = ((Component)val).GetComponentsInChildren(true); foreach (PlayMakerFSM val2 in componentsInChildren) { Fsm fsm = val2.Fsm; if (fsm != null) { fsm.KillDelayedEvents(); } val2.SendEvent("ATTACK CLEAR"); } } } private void PatchShiftHeroStateSetMeshRenderer() { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown if ((Object)(object)_attackControlFsm == (Object)null) { return; } FsmState val = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Shift Hero")); if (val == null) { Log.Warn("未找到 Shift Hero 状态,无法修改 SetMeshRenderer"); return; } if (val.Actions == null) { Log.Warn("Shift Hero 状态没有 Actions"); return; } int num = 0; FsmStateAction[] actions = val.Actions; foreach (FsmStateAction val2 in actions) { SetMeshRenderer val3 = (SetMeshRenderer)(object)((val2 is SetMeshRenderer) ? val2 : null); if (val3 != null) { val3.active = new FsmBool(FsmBool.op_Implicit(true)); num++; } } if (num > 0) { Log.Info($"已将 Shift Hero 状态中 {num} 个 SetMeshRenderer 的 active 属性改为 true"); } else { Log.Warn("Shift Hero 状态中未找到 SetMeshRenderer 动作"); } } private void PatchDashOrbitForDashAttack() { //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Expected O, but got Unknown //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Expected O, but got Unknown //IL_022b: Expected O, but got Unknown //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Expected O, but got Unknown //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Expected O, but got Unknown //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Expected O, but got Unknown //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Expected O, but got Unknown //IL_02a3: Expected O, but got Unknown //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Expected O, but got Unknown //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Expected O, but got Unknown //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Expected O, but got Unknown //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Expected O, but got Unknown //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Expected O, but got Unknown //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Expected O, but got Unknown //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Expected O, but got Unknown //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Expected O, but got Unknown //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Expected O, but got Unknown //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Expected O, but got Unknown //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Expected O, but got Unknown //IL_05ce: Unknown result type (might be due to invalid IL or missing references) //IL_05d5: Expected O, but got Unknown //IL_05d7: Unknown result type (might be due to invalid IL or missing references) //IL_05dc: Unknown result type (might be due to invalid IL or missing references) //IL_05e9: Expected O, but got Unknown //IL_05f0: Unknown result type (might be due to invalid IL or missing references) //IL_05f5: Unknown result type (might be due to invalid IL or missing references) //IL_0606: Expected O, but got Unknown if ((Object)(object)_attackControlFsm == (Object)null || _dashAttackAnticState == null || _dashAttackState == null || _moveRestart3State == null || _waitForHandsReadyState == null) { return; } FsmState val = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Dash Orbit Wait Hands Dash Ready")); if (val == null) { val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Dash Orbit Wait Hands Dash Ready"); FsmStateBuilder.AddStateToFsm(_attackControlFsm, val); } FsmState val2 = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Dash Orbit Pre-Spin Wait")); if (val2 == null) { val2 = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Dash Orbit Pre-Spin Wait", "等待 Finger 环绕 0.5s 后再冲刺"); FsmStateBuilder.AddStateToFsm(_attackControlFsm, val2); } List list = _attackControlFsm.FsmVariables.BoolVariables.ToList(); FsmBool val3 = ((IEnumerable)list).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == "Dash Ready Hand L")); if (val3 == null) { val3 = new FsmBool("Dash Ready Hand L") { Value = false }; list.Add(val3); } FsmBool val4 = ((IEnumerable)list).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == "Dash Ready Hand R")); if (val4 == null) { val4 = new FsmBool("Dash Ready Hand R") { Value = false }; list.Add(val4); } _attackControlFsm.FsmVariables.BoolVariables = list.ToArray(); GetFsmBool val5 = new GetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = handL } }, fsmName = new FsmString("Hand Control") { Value = "Hand Control" }, variableName = new FsmString("Dash Ready") { Value = "Dash Ready" }, storeValue = val3, everyFrame = true }; GetFsmBool val6 = new GetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = handR } }, fsmName = new FsmString("Hand Control") { Value = "Hand Control" }, variableName = new FsmString("Dash Ready") { Value = "Dash Ready" }, storeValue = val4, everyFrame = true }; FsmEvent fsmEvent = FsmEvent.GetFsmEvent("DASH HANDS READY"); BoolAllTrue val7 = new BoolAllTrue(); val7.boolVariables = (FsmBool[])(object)new FsmBool[2] { val3, val4 }; val7.sendEvent = fsmEvent; val7.storeResult = new FsmBool { UseVariable = true }; val7.everyFrame = true; BoolAllTrue val8 = val7; val.Actions = (FsmStateAction[])(object)new FsmStateAction[3] { (FsmStateAction)val5, (FsmStateAction)val6, (FsmStateAction)val8 }; val2.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.3f)), finishEvent = FsmEvent.Finished } }; FsmStateBuilder.AddTransition(val, FsmStateBuilder.CreateTransition(fsmEvent, val2)); FsmStateBuilder.SetFinishedTransition(val2, _dashAttackState); Log.Info("已添加 Dash Orbit Pre-Spin Wait 状态,Finger 将先环绕 0.5s 再冲刺"); List list2 = _dashAttackAnticState.Actions?.ToList() ?? new List(); if (_dashAttackAnticState.Actions != null) { List list3 = _dashAttackAnticState.Actions.Where(delegate(FsmStateAction a) { SendEventByName val12 = (SendEventByName)(object)((a is SendEventByName) ? a : null); return val12 == null || (!(val12.sendEvent.Value == "STOMP DASH L") && !(val12.sendEvent.Value == "STOMP DASH R")); }).ToList(); list2 = list3; Log.Info($"已移除 Dash Attack Antic 中的 STOMP DASH L/R 事件发送,剩余 {list3.Count} 个动作"); } CallMethod val9 = new CallMethod(); val9.behaviour = new FsmObject { Value = (Object)(object)this }; val9.methodName = new FsmString("StartDashOrbitHands") { Value = "StartDashOrbitHands" }; val9.parameters = (FsmVar[])(object)new FsmVar[0]; val9.everyFrame = false; CallMethod item = val9; if (!list2.OfType().Any((CallMethod a) => a.methodName != null && a.methodName.Value == "StartDashOrbitHands")) { list2.Insert(0, (FsmStateAction)(object)item); } _dashAttackAnticState.Actions = list2.ToArray(); FsmTransition[] transitions = _dashAttackAnticState.Transitions; foreach (FsmTransition val10 in transitions) { if (val10.FsmEvent == FsmEvent.Finished && (val10.toState == _dashAttackState.Name || val10.toFsmState == _dashAttackState)) { val10.toState = val.Name; val10.toFsmState = val; } } List list4 = _moveRestart3State.Actions?.ToList() ?? new List(); if (!list4.OfType().Any((CallMethod a) => a.methodName != null && a.methodName.Value == "DashOrbitShootHands")) { val9 = new CallMethod(); val9.behaviour = new FsmObject { Value = (Object)(object)this }; val9.methodName = new FsmString("DashOrbitShootHands") { Value = "DashOrbitShootHands" }; val9.parameters = (FsmVar[])(object)new FsmVar[0]; val9.everyFrame = false; list4.Insert(0, (FsmStateAction)(object)val9); _moveRestart3State.Actions = list4.ToArray(); } FsmTransition[] transitions2 = _moveRestart3State.Transitions; foreach (FsmTransition val11 in transitions2) { if (val11.FsmEvent == FsmEvent.Finished && (val11.toState == "Idle" || (_idleState != null && val11.toFsmState == _idleState))) { val11.toState = _waitForHandsReadyState.Name; val11.toFsmState = _waitForHandsReadyState; } } _attackControlFsm.Fsm.InitData(); } public void StartDashOrbitHands() { if ((Object)(object)_handLControlFsm != (Object)null) { _handLControlFsm.SendEvent("DASH ORBIT START Hand L"); } else { Log.Warn("DashOrbit: Hand L Control FSM 未缓存"); } if ((Object)(object)_handRControlFsm != (Object)null) { _handRControlFsm.SendEvent("DASH ORBIT START Hand R"); } else { Log.Warn("DashOrbit: Hand R Control FSM 未缓存"); } } public void DashOrbitShootHands() { if ((Object)(object)_handLControlFsm != (Object)null) { _handLControlFsm.SendEvent("DASH ORBIT SHOOT Hand L"); } else { Log.Warn("DashOrbitShoot: Hand L Control FSM 未缓存"); } if ((Object)(object)_handRControlFsm != (Object)null) { _handRControlFsm.SendEvent("DASH ORBIT SHOOT Hand R"); } else { Log.Warn("DashOrbitShoot: Hand R Control FSM 未缓存"); } } private void ModifySpikeLiftAimState() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_0090: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_00d9: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Expected O, but got Unknown //IL_010c: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Expected O, but got Unknown //IL_01ad: Expected O, but got Unknown //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Expected O, but got Unknown //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Expected O, but got Unknown //IL_01f7: Expected O, but got Unknown //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Expected O, but got Unknown //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Expected O, but got Unknown //IL_022a: Expected O, but got Unknown //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Expected O, but got Unknown FsmState spikeLiftAimState = _spikeLiftAimState; FsmState spikeLiftAim2State = _spikeLiftAim2State; if (spikeLiftAimState == null || spikeLiftAim2State == null || (Object)(object)_bossScene == (Object)null) { return; } GameObject gameObject = ((Component)_bossScene.transform.Find("Spike Floors")).gameObject; List list = spikeLiftAimState.Actions.ToList(); List list2 = spikeLiftAim2State.Actions.ToList(); list.Add((FsmStateAction)new GetRandomChild { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = gameObject } }, storeResult = _spikeFloorsX }); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = _spikeFloorsX } }, sendEvent = new FsmString { Value = "ATTACK" }, delay = new FsmFloat { Value = 0.2f } }); foreach (FsmStateAction item in list) { Wait val = (Wait)(object)((item is Wait) ? item : null); if (val == null) { continue; } FsmFloat time = val.time; if (time != null) { _ = time.Value; if (true) { val.time = new FsmFloat(FsmFloat.op_Implicit(0.3f)); } } } list2.Add((FsmStateAction)new GetRandomChild { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = gameObject } }, storeResult = _spikeFloorsX }); list2.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = _spikeFloorsX } }, sendEvent = new FsmString { Value = "ATTACK" }, delay = new FsmFloat { Value = 0.2f } }); spikeLiftAimState.Actions = list.ToArray(); spikeLiftAim2State.Actions = list2.ToArray(); } public void ClearSilkBallMethod() { Log.Info("Boss眩晕,开始清理丝球"); StopGeneratingSilkBall(); StopAllSilkBallCoroutines(); GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { SilkBallManager component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.RecycleAllActiveSilkBalls(); Log.Info("已通过SilkBallManager清理所有丝球"); } else { Log.Warn("未找到SilkBallManager组件"); } SingleWebManager component2 = val.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.ClearPool(); Log.Info("已通过SingleWebManager清理所有丝线"); } else { Log.Warn("未找到SingleWebManager组件"); } } else { Log.Warn("未找到AnySilkBossManager GameObject"); } ClearActiveSilkBalls(); } private void CreateSilkBallAttackStates() { _silkBallPrepareState = CreateSilkBallPrepareState(); _silkBallRingPrepareState = CreateSilkBallRingPrepareState(); _silkBallRingCastState = CreateSilkBallRingCastState(); _silkBallRingLiftState = CreateSilkBallRingLiftState(); _silkBallRingAnticState = CreateSilkBallRingAnticState(); _silkBallRingReleaseState = CreateSilkBallRingReleaseState(); _silkBallRingEndState = CreateSilkBallRingEndState(); _silkBallRingRecoverState = CreateSilkBallRingRecoverState(); _silkBallMovePrepareState = CreateSilkBallMovePrepareState(); _silkBallMoveEndState = CreateSilkBallMoveEndState(); FsmStateBuilder.AddStatesToFsm(_attackControlFsm, _silkBallRingPrepareState, _silkBallRingCastState, _silkBallRingLiftState, _silkBallRingAnticState, _silkBallRingReleaseState, _silkBallRingEndState, _silkBallRingRecoverState, _silkBallMovePrepareState, _silkBallMoveEndState); FsmState moveRestartState = _moveRestartState; if (moveRestartState == null) { Log.Error("未找到Move Restart状态"); return; } _silkBallPrepareState.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(_silkBallStaticEvent, _silkBallRingPrepareState), FsmStateBuilder.CreateTransition(_silkBallDashEvent, _silkBallMovePrepareState) }; _silkBallMovePrepareState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(_silkBallDashEndEvent, _silkBallMoveEndState) }; FsmStateBuilder.SetFinishedTransition(_silkBallMoveEndState, _silkBallRingRecoverState); FsmStateBuilder.SetFinishedTransition(_silkBallRingPrepareState, _silkBallRingCastState); _silkBallRingCastState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateFinishedTransition(_silkBallRingLiftState) }; _silkBallRingLiftState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateFinishedTransition(_silkBallRingAnticState) }; _silkBallRingAnticState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateFinishedTransition(_silkBallRingReleaseState) }; _silkBallRingReleaseState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateFinishedTransition(_silkBallRingEndState) }; FsmStateBuilder.SetFinishedTransition(_silkBallRingEndState, _silkBallRingRecoverState); FsmStateBuilder.SetFinishedTransition(_silkBallRingRecoverState, moveRestartState); FsmState attackChoiceState = _attackChoiceState; if (attackChoiceState != null) { FsmStateBuilder.AddTransition(attackChoiceState, FsmStateBuilder.CreateTransition(_silkBallAttackEvent, _silkBallPrepareState)); } } private FsmState CreateSilkBallPrepareState() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0075: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Expected O, but got Unknown FsmState orCreateState = FsmStateBuilder.GetOrCreateState(_attackControlFsm, "Silk Ball Prepare", "丝球攻击准备(50%分支)"); List list = new List(); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" } }, sendEvent = new FsmString("FORCE IDLE") { Value = "FORCE IDLE" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); SendRandomEventV4 val = new SendRandomEventV4(); val.events = (FsmEvent[])(object)new FsmEvent[3] { _silkBallStaticEvent, _silkBallDashEvent, _silkBallWithWebAttackEvent }; val.weights = (FsmFloat[])(object)new FsmFloat[3] { FsmFloat.op_Implicit(1f), FsmFloat.op_Implicit(1f), FsmFloat.op_Implicit(0.25f) }; val.eventMax = (FsmInt[])(object)new FsmInt[3] { FsmInt.op_Implicit(2), FsmInt.op_Implicit(2), FsmInt.op_Implicit(1) }; val.missedMax = (FsmInt[])(object)new FsmInt[3] { FsmInt.op_Implicit(3), FsmInt.op_Implicit(3), FsmInt.op_Implicit(4) }; val.activeBool = new FsmBool { UseVariable = true, Value = true }; list.Add((FsmStateAction)(object)val); orCreateState.Actions = list.ToArray(); return orCreateState; } private void ModifyAttackChoiceForSilkBall() { //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Expected O, but got Unknown //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Expected O, but got Unknown //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Expected O, but got Unknown //IL_04aa: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Expected O, but got Unknown //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Expected O, but got Unknown //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Expected O, but got Unknown //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Expected O, but got Unknown //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Expected O, but got Unknown //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Expected O, but got Unknown //IL_0425: Unknown result type (might be due to invalid IL or missing references) //IL_042b: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Expected O, but got Unknown //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Expected O, but got Unknown FsmState attackChoiceState = _attackChoiceState; if (attackChoiceState == null) { Log.Error("未找到Attack Choice状态"); return; } List list = new List(); for (int i = 0; i < attackChoiceState.Actions.Length; i++) { FsmStateAction obj = attackChoiceState.Actions[i]; SendRandomEventV4 val = (SendRandomEventV4)(object)((obj is SendRandomEventV4) ? obj : null); if (val != null) { list.Add(val); } } if (list.Count < 2) { Log.Warn($"找到的SendRandomEventV4动作数量不足(期望2个,实际{list.Count}个)"); return; } SendRandomEventV4 val2 = list[0]; FsmEvent[] array = (FsmEvent[])(object)new FsmEvent[val2.events.Length + 1]; FsmFloat[] array2 = (FsmFloat[])(object)new FsmFloat[val2.weights.Length + 1]; FsmInt[] array3 = (FsmInt[])(object)new FsmInt[val2.eventMax.Length + 1]; FsmInt[] array4 = (FsmInt[])(object)new FsmInt[val2.missedMax.Length + 1]; for (int j = 0; j < val2.events.Length; j++) { array[j] = val2.events[j]; array3[j] = val2.eventMax[j]; if (val2.events[j] != null && val2.events[j].Name == "HAND ATTACK") { array2[j] = new FsmFloat(FsmFloat.op_Implicit(0.53f)); array4[j] = new FsmInt(FsmInt.op_Implicit(3)); Log.Info("第一个动作 - HAND ATTACK: 权重 0.53, missedMax 3"); } else if (val2.events[j] != null && val2.events[j].Name == "DASH ATTACK") { array2[j] = new FsmFloat(FsmFloat.op_Implicit(0.1f)); array4[j] = new FsmInt(FsmInt.op_Implicit(5)); Log.Info("第一个动作 - DASH ATTACK: 权重 0.10, missedMax 5"); } else if (val2.events[j] != null && val2.events[j].Name == "WEB ATTACK") { array2[j] = new FsmFloat(FsmFloat.op_Implicit(0.12f)); array4[j] = new FsmInt(FsmInt.op_Implicit(5)); Log.Info("第一个动作 - WEB ATTACK: 权重 0.12, missedMax 5"); } else { array2[j] = val2.weights[j]; array4[j] = val2.missedMax[j]; } } int num = val2.events.Length; array[num] = _silkBallAttackEvent; array2[num] = new FsmFloat(FsmFloat.op_Implicit(0.25f)); array3[num] = new FsmInt(FsmInt.op_Implicit(2)); array4[num] = new FsmInt(FsmInt.op_Implicit(4)); val2.events = array; val2.weights = array2; val2.eventMax = array3; val2.missedMax = array4; Log.Info("第一个SendRandomEventV4修改完成:HAND 0.53, DASH 0.10, WEB 0.12, SILK BALL 0.25"); SendRandomEventV4 val3 = list[1]; Log.Info("修改第二个SendRandomEventV4(按顺序判断)"); FsmEvent[] array5 = (FsmEvent[])(object)new FsmEvent[val3.events.Length + 1]; FsmFloat[] array6 = (FsmFloat[])(object)new FsmFloat[val3.weights.Length + 1]; FsmInt[] array7 = (FsmInt[])(object)new FsmInt[val3.eventMax.Length + 1]; FsmInt[] array8 = (FsmInt[])(object)new FsmInt[val3.missedMax.Length + 1]; for (int k = 0; k < val3.events.Length; k++) { array5[k] = val3.events[k]; array7[k] = val3.eventMax[k]; if (val3.events[k] != null && val3.events[k].Name == "HAND ATTACK") { array6[k] = new FsmFloat(FsmFloat.op_Implicit(0.6f)); array8[k] = new FsmInt(FsmInt.op_Implicit(2)); Log.Info("第二个动作 - HAND ATTACK: 权重 0.6, missedMax 2"); } else if (val3.events[k] != null && val3.events[k].Name == "DASH ATTACK") { array6[k] = new FsmFloat(FsmFloat.op_Implicit(0.15f)); array8[k] = new FsmInt(FsmInt.op_Implicit(4)); Log.Info("第二个动作 - DASH ATTACK: 权重 0.15, missedMax 4"); } else { array6[k] = val3.weights[k]; array8[k] = val3.missedMax[k]; } } int num2 = val3.events.Length; array5[num2] = _silkBallAttackEvent; array6[num2] = new FsmFloat(FsmFloat.op_Implicit(0.25f)); array7[num2] = new FsmInt(FsmInt.op_Implicit(1)); array8[num2] = new FsmInt(FsmInt.op_Implicit(3)); val3.events = array5; val3.weights = array6; val3.eventMax = array7; val3.missedMax = array8; Log.Info("第二个SendRandomEventV4修改完成:HAND 0.6, DASH 0.15, SILK BALL 0.25"); } private FsmState CreateSilkBallRingPrepareState() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Ring Prepare", "丝球攻击Prepare Cast"); List list = new List(); SendEventByName val2 = CloneAction("Web Lift", 0, (Func?)null); if (val2 != null) { list.Add((FsmStateAction)(object)val2); } list.Add((FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" }, fsm = _bossControlFsm, variableName = new FsmString("Attack Prepare") { Value = "Attack Prepare" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); val.Actions = list.ToArray(); return val; } private FsmState CreateSilkBallRingCastState() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Ring Cast", "丝球攻击Cast动画,同时向上移动"); List list = new List(); SetVelocity2d val2 = CloneAction("Web Cast", 0, (Func?)null); if (val2 != null) { list.Add((FsmStateAction)(object)val2); } list.Add((FsmStateAction)new Tk2dPlayAnimationWithEventsV2 { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Cast") { Value = "Cast" }, animationTriggerEvent = FsmEvent.Finished, animationCompleteEvent = _nullEvent, animationInterruptedEvent = _nullEvent, _sprite = ((Component)((Component)this).gameObject.transform).GetComponent(), hasExpectedClip = true, expectedClip = ((IEnumerable)((Component)((Component)this).gameObject.transform).GetComponent().Library.clips).FirstOrDefault((Func)((tk2dSpriteAnimationClip s) => s.name == "Cast")) }); val.Actions = list.ToArray(); Log.Info("创建Silk Ball Cast状态(Cast动画 + 向上移动)"); return val; } private FsmState CreateSilkBallRingLiftState() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Ring Lift", "向上移动到高点"); List list = new List(); SetVelocity2d val2 = CloneAction("Web Lift", 0, (Func?)null); if (val2 != null) { list.Add((FsmStateAction)(object)val2); } DecelerateV2 val3 = CloneAction("Web Lift", 0, (Func?)null); if (val3 != null) { list.Add((FsmStateAction)(object)val3); } list.Add((FsmStateAction)new Tk2dWatchAnimationEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animationCompleteEvent = _nullEvent, animationTriggerEvent = FsmEvent.Finished }); CheckYPositionV2 val4 = CloneAction("Web Lift", 0, (Func?)null); if (val4 != null) { list.Add((FsmStateAction)(object)val4); } SetVelocity2dBool val5 = CloneAction("Web Lift", 0, (Func?)null); if (val5 != null) { list.Add((FsmStateAction)(object)val5); } list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(2f)), finishEvent = FsmEvent.Finished, realTime = false }); val.Actions = list.ToArray(); Log.Info("创建Silk Ball Lift状态(只上升 + 2秒超时保护)"); return val; } private FsmState CreateSilkBallRingAnticState() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Ring Antic", "在高点召唤8个丝球"); List list = new List(); SetVelocity2d val2 = CloneAction("Roar Antic", 0, (Func?)null); if (val2 != null) { list.Add((FsmStateAction)(object)val2); } CallMethod val3 = new CallMethod(); val3.behaviour = new FsmObject { Value = (Object)(object)this }; val3.methodName = new FsmString("StartSilkBallSummonAtHighPoint") { Value = "StartSilkBallSummonAtHighPoint" }; val3.parameters = (FsmVar[])(object)new FsmVar[0]; val3.everyFrame = false; list.Add((FsmStateAction)(object)val3); val.Actions = list.ToArray(); Log.Info("创建Silk Ball Antic状态(在高点召唤)"); return val; } private FsmState CreateSilkBallRingReleaseState() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Ring Release", "释放所有丝球并触发冲击波"); List list = new List(); CallMethod val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("ReleaseSilkBalls") { Value = "ReleaseSilkBalls" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; CallMethod item = val2; list.Add((FsmStateAction)(object)item); val.Actions = list.ToArray(); Log.Info("创建Silk Ball Release状态(无Roar动画)"); return val; } private FsmState CreateSilkBallRingEndState() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Ring End", "丝球攻击结束"); List list = new List(); list.Add((FsmStateAction)new Tk2dWatchAnimationEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animationCompleteEvent = FsmEvent.Finished, animationTriggerEvent = _nullEvent }); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(2f)), finishEvent = FsmEvent.Finished, realTime = false }); val.Actions = list.ToArray(); Log.Info("创建Silk Ball End状态"); return val; } private FsmState CreateSilkBallRingRecoverState() { //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Ring Recover", "丝球攻击结束,简单下降"); List list = new List(); SendEventByName val2 = CloneAction("Web Recover", 0, (Func?)delegate(SendEventByName action) { FsmString sendEvent = action.sendEvent; string text = ((sendEvent != null) ? sendEvent.Value : null); return !string.IsNullOrEmpty(text) && text.Equals("IDLE", StringComparison.OrdinalIgnoreCase); }); if (val2 != null) { list.Add((FsmStateAction)(object)val2); } Tk2dPlayAnimation val3 = CloneAction("Web Recover", 0, (Func?)null); if (val3 != null) { list.Add((FsmStateAction)(object)val3); } SetVelocity2d val4 = CloneAction("Web Recover", 0, (Func?)null); if (val4 != null) { list.Add((FsmStateAction)(object)val4); } DecelerateV2 val5 = CloneAction("Web Recover", 0, (Func?)null); if (val5 != null) { list.Add((FsmStateAction)(object)val5); } list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.5f)), finishEvent = FsmEvent.Finished, realTime = false }); val.Actions = list.ToArray(); Log.Info("创建Silk Ball Recover状态(下降后转Move Restart)"); return val; } private void InitializeSilkBallDashVariables() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Expected O, but got Unknown //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Expected O, but got Unknown //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Expected O, but got Unknown //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Expected O, but got Unknown //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Expected O, but got Unknown if (!((Object)(object)_attackControlFsm == (Object)null)) { _isGeneratingSilkBall = _attackControlFsm.FsmVariables.FindFsmBool("Is Generating Silk Ball"); if (_isGeneratingSilkBall == null) { _isGeneratingSilkBall = new FsmBool("Is Generating Silk Ball") { Value = false }; List list = _attackControlFsm.FsmVariables.BoolVariables.ToList(); list.Add(_isGeneratingSilkBall); _attackControlFsm.FsmVariables.BoolVariables = list.ToArray(); } _totalDistanceTraveled = _attackControlFsm.FsmVariables.FindFsmFloat("Total Distance Traveled"); if (_totalDistanceTraveled == null) { _totalDistanceTraveled = new FsmFloat("Total Distance Traveled") { Value = 0f }; List list2 = _attackControlFsm.FsmVariables.FloatVariables.ToList(); list2.Add(_totalDistanceTraveled); _attackControlFsm.FsmVariables.FloatVariables = list2.ToArray(); } _lastBallPosition = _attackControlFsm.FsmVariables.FindFsmVector2("Last Ball Position"); if (_lastBallPosition == null) { _lastBallPosition = new FsmVector2("Last Ball Position") { Value = Vector2.zero }; List list3 = _attackControlFsm.FsmVariables.Vector2Variables.ToList(); list3.Add(_lastBallPosition); _attackControlFsm.FsmVariables.Vector2Variables = list3.ToArray(); } FsmBool val = _attackControlFsm.FsmVariables.FindFsmBool("Special Attack"); if (val == null) { val = new FsmBool("Special Attack") { Value = false }; List list4 = _attackControlFsm.FsmVariables.BoolVariables.ToList(); list4.Add(val); _attackControlFsm.FsmVariables.BoolVariables = list4.ToArray(); } FsmBool val2 = _attackControlFsm.FsmVariables.FindFsmBool("Do P6 Web Attack"); if (val2 == null) { val2 = new FsmBool("Do P6 Web Attack") { Value = false }; List list5 = _attackControlFsm.FsmVariables.BoolVariables.ToList(); list5.Add(val2); _attackControlFsm.FsmVariables.BoolVariables = list5.ToArray(); } _laceSlashObj = _attackControlFsm.FsmVariables.FindFsmGameObject("Lace Slash Obj"); if (_laceSlashObj == null || (Object)(object)_laceSlashObj.Value == (Object)null) { _laceSlashObj = new FsmGameObject("Lace Slash Obj") { Value = laceCircleSlash }; List list6 = _attackControlFsm.FsmVariables.GameObjectVariables.ToList(); list6.Add(_laceSlashObj); _attackControlFsm.FsmVariables.GameObjectVariables = list6.ToArray(); } _spikeFloorsX = _attackControlFsm.FsmVariables.FindFsmGameObject("Spike Floors X"); if (_spikeFloorsX == null || (Object)(object)_spikeFloorsX.Value == (Object)null) { _spikeFloorsX = new FsmGameObject("Spike Floors X") { Value = null }; List list7 = _attackControlFsm.FsmVariables.GameObjectVariables.ToList(); list7.Add(_spikeFloorsX); _attackControlFsm.FsmVariables.GameObjectVariables = list7.ToArray(); } _attackControlFsm.FsmVariables.Init(); } } private FsmState CreateSilkBallMovePrepareState() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Move Prepare", "移动丝球准备:计算路线并触发Boss移动"); List list = new List(); CallMethod val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("CalculateAndSetDashRoute") { Value = "CalculateAndSetDashRoute" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; list.Add((FsmStateAction)(object)val2); list.Add((FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" }, fsm = _bossControlFsm, variableName = new FsmString("Silk Ball Dash Pending") { Value = "Silk Ball Dash Pending" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("StartGeneratingSilkBall") { Value = "StartGeneratingSilkBall" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; list.Add((FsmStateAction)(object)val2); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(15f)), finishEvent = _silkBallDashEndEvent, realTime = false }); val.Actions = list.ToArray(); return val; } private FsmState CreateSilkBallMoveEndState() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Silk Ball Move End", "移动丝球结束:停止生成"); List list = new List(); CallMethod val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("StopGeneratingSilkBall") { Value = "StopGeneratingSilkBall" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; list.Add((FsmStateAction)(object)val2); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished, realTime = false }); val.Actions = list.ToArray(); return val; } private void CheckAndSpawnSilkBall() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) Vector2 val = Vector2.op_Implicit(((Component)this).transform.position); if (_lastBallPosition.Value == Vector2.zero) { _lastBallPosition.Value = val; return; } float num = Vector2.Distance(val, _lastBallPosition.Value); FsmFloat? totalDistanceTraveled = _totalDistanceTraveled; totalDistanceTraveled.Value += num; _lastBallPosition.Value = val; if (_totalDistanceTraveled.Value >= 5f) { SpawnSilkBallAtPosition(val); _totalDistanceTraveled.Value = 0f; } } private void SpawnSilkBallAtPosition(Vector2 position) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_silkBallManager == (Object)null) { Log.Warn("SilkBallManager未初始化,无法生成丝球"); return; } Vector3 position2 = default(Vector3); ((Vector3)(ref position2))..ctor(position.x, position.y, 0f); SilkBallBehavior silkBallBehavior = _silkBallManager.SpawnSilkBall(position2, 35f, 25f, 8f, 1f); if ((Object)(object)silkBallBehavior != (Object)null) { silkBallBehavior.triggerBlastOnDestroy = true; silkBallBehavior.SendFsmEvent("SILK BALL RELEASE"); } } public void CalculateAndSetDashRoute() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_bossControlFsm == (Object)null) { Log.Error("BossControl FSM未初始化,无法设置路线"); return; } Vector2 val = Vector2.op_Implicit(((Component)this).transform.position); FsmBool val2 = _bossControlFsm.FsmVariables.FindFsmBool("Hero Is Far"); bool flag = val2 != null && val2.Value; PlayMakerFSM? attackControlFsm = _attackControlFsm; FsmBool val3 = ((attackControlFsm != null) ? attackControlFsm.FsmVariables.FindFsmBool("Special Attack") : null); bool flag2 = val3 != null && val3.Value; BossZone bossZone = GetBossZone(val.x); Vector3? pointSpecial = null; Vector3 val4; Vector3 val5; if (bossZone == BossZone.Middle) { if (Random.value > 0.5f) { val4 = POS_LEFT_UP; val5 = POS_RIGHT_UP; if (flag2) { pointSpecial = POS_LEFT_DOWN; } Log.Info(flag2 ? "中区Phase2路线: 左上→左下→右上→中下" : "中区路线: 左上→右上→中下"); } else { val4 = POS_RIGHT_UP; val5 = POS_LEFT_UP; if (flag2) { pointSpecial = POS_RIGHT_DOWN; } Log.Info(flag2 ? "中区Phase2路线: 右上→右下→左上→中下" : "中区路线: 右上→左上→中下"); } } else if (flag) { val4 = POS_MIDDLE_UP; if (bossZone == BossZone.Left) { val5 = POS_LEFT_UP; if (flag2) { pointSpecial = POS_LEFT_DOWN; } Log.Info(flag2 ? "左区+远距离Phase2路线: 中上→左下→左上→中下" : "左区+远距离: 中上→左上→中下"); } else { val5 = POS_RIGHT_UP; if (flag2) { pointSpecial = POS_RIGHT_DOWN; } Log.Info(flag2 ? "右区+远距离Phase2路线: 中上→右下→右上→中下" : "右区+远距离: 中上→右上→中下"); } } else if (bossZone == BossZone.Left) { val4 = POS_RIGHT_UP; val5 = POS_LEFT_UP; if (flag2) { pointSpecial = POS_RIGHT_DOWN; } Log.Info(flag2 ? "左区+近距离Phase2路线: 右上→右下→左上→中下" : "左区+近距离: 右上→左上→中下"); } else { val4 = POS_LEFT_UP; val5 = POS_RIGHT_UP; if (flag2) { pointSpecial = POS_LEFT_DOWN; } Log.Info(flag2 ? "右区+近距离Phase2路线: 左上→左下→右上→中下" : "右区+近距离: 左上→右上→中下"); } Vector3 pOS_MIDDLE_DOWN = POS_MIDDLE_DOWN; if (flag2 && pointSpecial.HasValue) { SetRoutePointSpecial(pointSpecial.Value); } SetRoutePoint(0, val4); SetRoutePoint(1, val5); SetRoutePoint(2, pOS_MIDDLE_DOWN); MemoryBossBehavior component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.UpdateTargetPointPositions(val4, val5, pOS_MIDDLE_DOWN, pointSpecial); } else { Log.Warn("未找到BossBehavior组件,无法更新隐形目标点位置"); } string text = ((flag2 && pointSpecial.HasValue) ? $"{val4} → Special({pointSpecial.Value}) → {val5} → {pOS_MIDDLE_DOWN}" : $"{val4} → {val5} → {pOS_MIDDLE_DOWN}"); Log.Info("路线已设置: " + text); } private BossZone GetBossZone(float x) { if (x < 31f) { return BossZone.Left; } if (x > 46f) { return BossZone.Right; } return BossZone.Middle; } private void SetRoutePointSpecial(Vector3 value) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) MemoryBossBehavior component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { Log.Error("未找到BossBehavior组件,无法设置Special路线点"); } else if (component.RoutePointSpecialX != null && component.RoutePointSpecialY != null) { component.RoutePointSpecialX.Value = value.x; component.RoutePointSpecialY.Value = value.y; Log.Info($"设置Special路线点: X={value.x}, Y={value.y}"); } else { Log.Error("RoutePointSpecialX 或 RoutePointSpecialY 为 null"); } } private void SetRoutePoint(int index, Vector3 value) { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) MemoryBossBehavior component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { Log.Error("未找到BossBehavior组件,无法设置路线点"); return; } switch (index) { case 0: if (component.RoutePoint0X != null && component.RoutePoint0Y != null) { component.RoutePoint0X.Value = value.x; component.RoutePoint0Y.Value = value.y; Log.Info($"设置路线点 0: X={value.x}, Y={value.y}"); } else { Log.Error("RoutePoint0X 或 RoutePoint0Y 为 null"); } break; case 1: if (component.RoutePoint1X != null && component.RoutePoint1Y != null) { component.RoutePoint1X.Value = value.x; component.RoutePoint1Y.Value = value.y; Log.Info($"设置路线点 1: X={value.x}, Y={value.y}"); } else { Log.Error("RoutePoint1X 或 RoutePoint1Y 为 null"); } break; case 2: if (component.RoutePoint2X != null && component.RoutePoint2Y != null) { component.RoutePoint2X.Value = value.x; component.RoutePoint2Y.Value = value.y; Log.Info($"设置路线点 2: X={value.x}, Y={value.y}"); } else { Log.Error("RoutePoint2X 或 RoutePoint2Y 为 null"); } break; default: Log.Error($"无效的路线点索引: {index}"); break; } } public void StartGeneratingSilkBall() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if (_isGeneratingSilkBall != null) { _isGeneratingSilkBall.Value = true; _totalDistanceTraveled.Value = 0f; _lastBallPosition.Value = Vector2.op_Implicit(((Component)this).transform.position); Log.Info("开始生成移动丝球"); } } public void StopGeneratingSilkBall() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) if (_isGeneratingSilkBall != null) { _isGeneratingSilkBall.Value = false; if (_totalDistanceTraveled != null) { _totalDistanceTraveled.Value = 0f; } if (_lastBallPosition != null) { _lastBallPosition.Value = Vector2.zero; } Log.Info("停止生成移动丝球并重置变量"); } } [IteratorStateMachine(typeof(d__256))] public IEnumerator SummonSilkBallsAtHighPointCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__256(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__257))] private IEnumerator SummonNormalSilkBalls() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__257(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__258))] private IEnumerator SummonPhase2DoubleSilkBalls() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__258(0) { <>4__this = this }; } private bool ShouldSpawnPhase2OuterSilkBallsOnRight(Vector3 bossPosition) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) HeroController instance = HeroController.instance; if ((Object)(object)instance == (Object)null) { return Random.value < 0.5f; } return instance.transform.position.x <= bossPosition.x; } public void StartSilkBallSummonAtHighPoint() { Log.Info("供FSM调用:开始在高点召唤丝球"); if (_silkBallSummonCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(_silkBallSummonCoroutine); } _silkBallSummonCoroutine = ((MonoBehaviour)this).StartCoroutine(SummonSilkBallsAtHighPointCoroutine()); } public void ReleaseSilkBalls() { ((MonoBehaviour)this).StartCoroutine(ReleaseSilkBallsCoroutine()); } [IteratorStateMachine(typeof(d__262))] private IEnumerator ReleaseSilkBallsCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__262(0) { <>4__this = this }; } private void CreateSilkBallWithWebAttackStates() { //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00d2: Expected O, but got Unknown //IL_00d7: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Expected O, but got Unknown //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Expected O, but got Unknown //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Expected O, but got Unknown //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Expected O, but got Unknown //IL_014e: Expected O, but got Unknown //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Expected O, but got Unknown //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Expected O, but got Unknown //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Expected O, but got Unknown //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Expected O, but got Unknown //IL_024e: Expected O, but got Unknown //IL_0253: Expected O, but got Unknown //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Expected O, but got Unknown //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Expected O, but got Unknown if (!((Object)(object)_attackControlFsm == (Object)null)) { _silkBallWebPrepareState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, "Silk Ball Web Prepare"); _silkBallWebAttackState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, "Silk Ball Web Attack"); _silkBallWebRecoverState = FsmStateBuilder.CreateAndAddState(_attackControlFsm, "Silk Ball Web Recover"); List list = new List(); list.AddRange(CloneStateActions("Silk Ball Ring Prepare")); if ((Object)(object)_silkHair != (Object)null) { list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = _silkHair } } }, sendEvent = FsmString.op_Implicit("ROAR"), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); } if ((Object)(object)_naChargeEffect != (Object)null) { list.Add((FsmStateAction)new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = _naChargeEffect } }, activate = new FsmBool(FsmBool.op_Implicit(true)), recursive = new FsmBool(FsmBool.op_Implicit(false)), resetOnExit = false, everyFrame = false }); } _silkBallWebPrepareState.Actions = list.ToArray(); FsmState? silkBallWebAttackState = _silkBallWebAttackState; FsmStateAction[] array = new FsmStateAction[1]; CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ExecuteSilkBallWithWebAttack") { Value = "ExecuteSilkBallWithWebAttack" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; array[0] = (FsmStateAction)val; silkBallWebAttackState.Actions = (FsmStateAction[])(object)array; List list2 = new List(); if ((Object)(object)_silkHair != (Object)null) { list2.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = _silkHair } } }, sendEvent = FsmString.op_Implicit("IDLE"), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); } _silkBallWebRecoverState.Actions = list2.ToArray(); FsmStateBuilder.SetFinishedTransition(_silkBallWebPrepareState, _silkBallWebAttackState); if (_silkBallWithWebAttackDoneEvent != null) { FsmStateBuilder.AddTransition(_silkBallWebAttackState, FsmStateBuilder.CreateTransition(_silkBallWithWebAttackDoneEvent, _silkBallWebRecoverState)); } FsmState moveRestartState = _moveRestartState; if (moveRestartState != null) { FsmStateBuilder.SetFinishedTransition(_silkBallWebRecoverState, moveRestartState); } FsmState silkBallPrepareState = _silkBallPrepareState; if (silkBallPrepareState != null && _silkBallWithWebAttackEvent != null) { FsmStateBuilder.AddTransition(silkBallPrepareState, FsmStateBuilder.CreateTransition(_silkBallWithWebAttackEvent, _silkBallWebPrepareState)); } } } public void ExecuteSilkBallWithWebAttack() { if (_silkBallWithWebAttackCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(_silkBallWithWebAttackCoroutine); _silkBallWithWebAttackCoroutine = null; } _silkBallWithWebAttackCoroutine = ((MonoBehaviour)this).StartCoroutine(SilkBallWithWebAttackCoroutine()); } [IteratorStateMachine(typeof(d__265))] private IEnumerator SilkBallWithWebAttackCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__265(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__266))] private IEnumerator WaitForSilkBallPrepared(SilkBallBehavior ball, float maxWait) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__266(0) { <>4__this = this, ball = ball, maxWait = maxWait }; } private void SpawnCrossWeb(Transform followTarget, float baseAngle, float rotationSpeed, bool playAudio = false) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_singleWebManager == (Object)null)) { Vector3 position = followTarget.position; Vector3 value = default(Vector3); ((Vector3)(ref value))..ctor(2.4f, 1.1f, 1f); SingleWebBehavior singleWebBehavior = _singleWebManager.SpawnAndAttack(position, (Vector3?)new Vector3(0f, 0f, baseAngle), (Vector3?)value, 0f, 0.75f, playAudio); if ((Object)(object)singleWebBehavior != (Object)null) { singleWebBehavior.ConfigureFollowTarget(followTarget); singleWebBehavior.ConfigureContinuousRotation(enable: true, rotationSpeed); } SingleWebBehavior singleWebBehavior2 = _singleWebManager.SpawnAndAttack(position, (Vector3?)new Vector3(0f, 0f, baseAngle + 90f), (Vector3?)value, 0f, 0.75f, audioEnabled: false); if ((Object)(object)singleWebBehavior2 != (Object)null) { singleWebBehavior2.ConfigureFollowTarget(followTarget); singleWebBehavior2.ConfigureContinuousRotation(enable: true, rotationSpeed); } } } private void InitializeSpikeSystem() { if (!_spikeSystemInitialized && !((Object)(object)_attackControlFsm == (Object)null)) { FindSpikeFloorsParent(); if ((Object)(object)_spikeFloorsParent == (Object)null) { Log.Warn("[AttackControl] 未找到 Spike Floors 父物体,地刺系统未初始化"); return; } CreateSpikeVariables(); MemorySpikeFloorBehavior.InitializeAllSpikeFloors(_spikeFloorsParent); ModifyRubbleAttackStateForSpike(); _spikeSystemInitialized = true; Log.Info("[AttackControl] 地刺系统初始化完成"); } } private void FindSpikeFloorsParent() { if ((Object)(object)_bossScene == (Object)null) { return; } Transform val = _bossScene.transform.Find("Spike Floors"); if ((Object)(object)val != (Object)null) { _spikeFloorsParent = ((Component)val).gameObject; Log.Info("[AttackControl] 找到 Spike Floors: " + ((Object)_spikeFloorsParent).name); return; } PlayMakerFSM? attackControlFsm = _attackControlFsm; FsmGameObject val2 = ((attackControlFsm != null) ? attackControlFsm.FsmVariables.GetFsmGameObject("Spike Floors") : null); if (val2 != null && (Object)(object)val2.Value != (Object)null) { _spikeFloorsParent = val2.Value; Log.Info("[AttackControl] 从 FSM 变量找到 Spike Floors: " + ((Object)_spikeFloorsParent).name); } } private void CreateSpikeVariables() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Expected O, but got Unknown if (!((Object)(object)_attackControlFsm == (Object)null)) { _spikeAttackPending = _attackControlFsm.FsmVariables.FindFsmBool("SpikeAttackPending"); if (_spikeAttackPending == null) { _spikeAttackPending = new FsmBool("SpikeAttackPending") { Value = false }; List list = _attackControlFsm.FsmVariables.BoolVariables.ToList(); list.Add(_spikeAttackPending); _attackControlFsm.FsmVariables.BoolVariables = list.ToArray(); Log.Info("[AttackControl] 创建了 SpikeAttackPending 变量"); } _currentPhaseVar = _attackControlFsm.FsmVariables.FindFsmInt("CurrentPhase"); if (_currentPhaseVar == null) { _currentPhaseVar = new FsmInt("CurrentPhase") { Value = 1 }; List list2 = _attackControlFsm.FsmVariables.IntVariables.ToList(); list2.Add(_currentPhaseVar); _attackControlFsm.FsmVariables.IntVariables = list2.ToArray(); Log.Info("[AttackControl] 创建了 CurrentPhase 变量"); } _attackControlFsm.FsmVariables.Init(); } } private void ModifyRubbleAttackStateForSpike() { if (!((Object)(object)_attackControlFsm == (Object)null)) { DisableOriginalSpikeLift(); CreateSpikeTriggerState(); ModifyAttackChoiceForSpike(); Log.Info("[AttackControl] 新地刺系统初始化完成"); } } private void DisableOriginalSpikeLift() { FsmState rubbleAttackQuestionState = _rubbleAttackQuestionState; if (rubbleAttackQuestionState == null) { Log.Warn("[AttackControl] 未找到 Rubble Attack? 状态"); return; } RemoveSpikeTransitions(rubbleAttackQuestionState); RemoveSpikeActions(rubbleAttackQuestionState); Log.Info("[AttackControl] 已禁用 Rubble Attack? 状态的原版地刺逻辑"); } private void CreateSpikeTriggerState() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Expected O, but got Unknown if (!((Object)(object)_attackControlFsm == (Object)null)) { _spikeTriggerEvent = FsmEvent.GetFsmEvent("SPIKE TRIGGER"); _spikeTriggerState = FsmStateBuilder.CreateState(_attackControlFsm.Fsm, "Spike Trigger", "触发地刺攻击并重置标记"); List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ExecuteSpikeTrigger") { Value = "ExecuteSpikeTrigger" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new SetBoolValue { boolVariable = _spikeAttackPending, boolValue = new FsmBool(FsmBool.op_Implicit(false)), everyFrame = false }); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished, realTime = false }); _spikeTriggerState.Actions = list.ToArray(); FsmState attackChoiceState = _attackChoiceState; if (attackChoiceState != null) { FsmStateBuilder.SetFinishedTransition(_spikeTriggerState, attackChoiceState); } FsmStateBuilder.AddStateToFsm(_attackControlFsm, _spikeTriggerState); Log.Info("[AttackControl] 创建了 Spike Trigger 状态"); } } private void ModifyAttackChoiceForSpike() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown if (!((Object)(object)_attackControlFsm == (Object)null) && _spikeTriggerEvent != null) { FsmState attackChoiceState = _attackChoiceState; if (attackChoiceState == null) { Log.Warn("[AttackControl] 未找到 Attack Choice 状态"); return; } FsmStateBuilder.AddTransition(attackChoiceState, FsmStateBuilder.CreateTransition(_spikeTriggerEvent, _spikeTriggerState)); List list = attackChoiceState.Actions.ToList(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("EnsureSpikeTargetForCurrentPhase") { Value = "EnsureSpikeTargetForCurrentPhase" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; CallMethod item = val; BoolTest item2 = new BoolTest { boolVariable = _spikeAttackPending, isTrue = _spikeTriggerEvent, isFalse = null, everyFrame = false }; list.Insert(0, (FsmStateAction)(object)item); list.Insert(1, (FsmStateAction)(object)item2); attackChoiceState.Actions = list.ToArray(); Log.Info("[AttackControl] Attack Choice 状态已添加地刺目标同步和检测"); } } public void EnsureSpikeTargetForCurrentPhase() { if (_spikeAttackPending == null || MemorySpikeFloorBehavior.IsSpikeSystemPaused) { return; } if ((Object)(object)_spikeFloorsParent == (Object)null) { FindSpikeFloorsParent(); if ((Object)(object)_spikeFloorsParent == (Object)null) { return; } } int num = ResolveCurrentSpikePhase(); if (num <= 3) { bool flag = _currentPhaseVar == null || _currentPhaseVar.Value != num; if (_currentPhaseVar != null && flag) { _currentPhaseVar.Value = num; } if (flag) { MemorySpikeFloorBehavior.SetAllSpikesPhase(_spikeFloorsParent, num); } int activeSpikeCount = GetActiveSpikeCount(); int num2 = Mathf.Clamp(num, 1, 6); if (activeSpikeCount < num2) { _spikeAttackPending.Value = true; Log.Debug($"[AttackControl] 地刺数量不足,设置 SpikeAttackPending=true(阶段 P{num},活跃 {activeSpikeCount}/{num2})"); } } } public void ExecuteSpikeTrigger() { if (MemorySpikeFloorBehavior.IsSpikeSystemPaused) { return; } if ((Object)(object)_spikeFloorsParent == (Object)null) { FindSpikeFloorsParent(); if ((Object)(object)_spikeFloorsParent == (Object)null) { return; } } int num = ResolveCurrentSpikePhase(); bool flag = _currentPhaseVar == null || _currentPhaseVar.Value != num; if (_currentPhaseVar != null && flag) { _currentPhaseVar.Value = num; } if (flag) { MemorySpikeFloorBehavior.SetAllSpikesPhase(_spikeFloorsParent, num); } int activeSpikeCount = GetActiveSpikeCount(); int num2 = Mathf.Clamp(num, 1, 6); int num3 = num2 - activeSpikeCount; if (num3 > 0) { MemorySpikeFloorBehavior.TriggerSpikeAttacks(_spikeFloorsParent, num3); Log.Info($"[AttackControl] 触发 {num3} 个地刺(阶段 P{num},当前活跃 {activeSpikeCount})"); } else { Log.Debug($"[AttackControl] 地刺已达目标数量(阶段 P{num},活跃 {activeSpikeCount})"); } } private void RemoveSpikeTransitions(FsmState state) { if (state.Transitions != null) { FsmTransition[] array = state.Transitions.Where((FsmTransition t) => t.EventName != "SPIKE LIFT").ToArray(); if (array.Length < state.Transitions.Length) { state.Transitions = array; Log.Info("[AttackControl] 移除了 " + state.Name + " 状态的 SPIKE LIFT 跳转"); } } } private void RemoveSpikeActions(FsmState state) { if (state.Actions == null) { return; } List list = new List(); int num = 0; FsmStateAction[] actions = state.Actions; foreach (FsmStateAction val in actions) { bool flag = false; BoolTestMulti val2 = (BoolTestMulti)(object)((val is BoolTestMulti) ? val : null); if (val2 != null) { FsmEvent trueEvent = val2.trueEvent; if (((trueEvent != null) ? trueEvent.Name : null) == "SPIKE LIFT") { flag = true; Log.Debug("[AttackControl] 移除 BoolTestMulti (SPIKE LIFT)"); } } BoolTest val3 = (BoolTest)(object)((val is BoolTest) ? val : null); if (val3 != null) { FsmBool boolVariable = val3.boolVariable; if (((boolVariable != null) ? ((NamedVariable)boolVariable).Name : null) == "Can Spike Pull") { flag = true; Log.Debug("[AttackControl] 移除 BoolTest (Can Spike Pull)"); } } SendRandomEventV4 val4 = (SendRandomEventV4)(object)((val is SendRandomEventV4) ? val : null); if (val4 != null) { RemoveSpikeLiftFromSendRandomEventV4(val4); } if (flag) { num++; } else { list.Add(val); } } if (num > 0) { state.Actions = list.ToArray(); Log.Info($"[AttackControl] 从 {state.Name} 状态移除了 {num} 个原版地刺 Actions"); } } private void RemoveSpikeLiftFromSendRandomEventV4(SendRandomEventV4 action) { if (action.events == null || action.events.Length == 0) { return; } int num = -1; for (int i = 0; i < action.events.Length; i++) { FsmEvent obj = action.events[i]; if (((obj != null) ? obj.Name : null) == "SPIKE LIFT") { num = i; break; } } if (num >= 0) { action.events = (FsmEvent[])(object)new FsmEvent[2] { FsmEvent.GetFsmEvent("RUBBLE PULL"), FsmEvent.Finished }; Log.Info("[AttackControl] 从 SendRandomEventV4 移除了 SPIKE LIFT 事件"); } } private void DisableOriginalSpikeStates() { if ((Object)(object)_attackControlFsm == (Object)null) { return; } string[] array = new string[5] { "Spike Lift Type", "Spike Lift Aim", "Spike Lift Aim 2", "Spike Intro Pause", "Spike Lift Intro" }; string[] array2 = array; foreach (string stateName in array2) { FsmState val = ((IEnumerable)_attackControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == stateName)); if (val != null) { Log.Debug("[AttackControl] 原版地刺状态 " + stateName + " 已被跳过(不再可达)"); } } } private int GetActiveSpikeCount() { if ((Object)(object)_spikeFloorsParent == (Object)null) { return 0; } int num = 0; MemorySpikeFloorBehavior[] componentsInChildren = _spikeFloorsParent.GetComponentsInChildren(); MemorySpikeFloorBehavior[] array = componentsInChildren; foreach (MemorySpikeFloorBehavior memorySpikeFloorBehavior in array) { if (!memorySpikeFloorBehavior.IsIdle()) { num++; } } return num; } private int ResolveCurrentSpikePhase() { FsmInt? currentPhaseVar = _currentPhaseVar; int num = ((currentPhaseVar == null) ? 1 : currentPhaseVar.Value); PlayMakerFSM val = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Phase Control"); FsmInt val2 = ((val != null) ? val.FsmVariables.FindFsmInt("CurrentPhase") : null); if (val2 != null && val2.Value > num) { num = val2.Value; } int num2 = ParsePhaseFromStateName((val != null) ? val.ActiveStateName : null); if (num2 > num) { num = num2; } return Mathf.Clamp(num, 1, 6); } private int ParsePhaseFromStateName(string? stateName) { if (string.IsNullOrEmpty(stateName)) { return 0; } int num = stateName.IndexOf('P'); while (num >= 0 && num + 1 < stateName.Length) { char c = stateName[num + 1]; if (c >= '1' && c <= '6') { return c - 48; } num = stateName.IndexOf('P', num + 1); } return 0; } } public class BombBlastBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__43 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public BombBlastBehavior <>4__this; private Vector3
5__1; private float 5__2; private float 5__3; private float 5__4; private List<(SilkBallBehavior ball, Vector2 direction)> 5__5; private int 5__6; private float 5__7; private float 5__8; private Vector2 5__9; private Vector3 5__10; private SilkBallBehavior 5__11; private Rigidbody2D 5__12; private List<(SilkBallBehavior ball, Vector2 direction)>.Enumerator <>s__13; private SilkBallBehavior 5__14; private Vector2 5__15; private PlayMakerFSM 5__16; private Rigidbody2D 5__17; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__43(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__5 = null; 5__11 = null; 5__12 = null; <>s__13 = default(List<(SilkBallBehavior, Vector2)>.Enumerator); 5__14 = null; 5__16 = null; 5__17 = null; <>1__state = -2; } private bool MoveNext() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Expected O, but got Unknown //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)<>4__this._silkBallManager == (Object)null) { return false; }
5__1 = ((Component)<>4__this).transform.position; 5__2 = 360f / (float)<>4__this.silkBallCount; 5__3 = Random.Range(0f, 360f); 5__4 = 1f; 5__5 = new List<(SilkBallBehavior, Vector2)>(); 5__6 = 0; while (5__6 < <>4__this.silkBallCount) { 5__7 = 5__3 + (float)5__6 * 5__2; 5__8 = 5__7 * (MathF.PI / 180f); 5__9 = new Vector2(Mathf.Cos(5__8), Mathf.Sin(5__8)); 5__10 =
5__1 + new Vector3(5__9.x, 5__9.y, 0f) * 5__4; 5__11 = <>4__this._silkBallManager.SpawnSilkBall(5__10, 0f, <>4__this.useReverseAccelMode ? <>4__this.maxInwardSpeed : <>4__this.radialBurstSpeed, <>4__this.reverseAccelDuration, 0.8f); if ((Object)(object)5__11 != (Object)null) { 5__5.Add((5__11, 5__9)); 5__12 = ((Component)5__11).GetComponent(); if ((Object)(object)5__12 != (Object)null) { 5__12.gravityScale = 0f; 5__12.linearVelocity = Vector2.zero; } if (<>4__this.useReverseAccelMode) { 5__11.ConfigureReverseAcceleration(
5__1, <>4__this.reverseAcceleration, <>4__this.initialOutwardSpeed, <>4__this.maxInwardSpeed, <>4__this.reverseAccelDuration); } 5__12 = null; } 5__11 = null; 5__6++; } Log.Debug($"[BombBlastBehavior] 已生成 {5__5.Count} 个丝球,等待 {<>4__this.releaseDelay} 秒后释放"); <>2__current = (object)new WaitForSeconds(<>4__this.releaseDelay); <>1__state = 2; return true; case 2: <>1__state = -1; <>s__13 = 5__5.GetEnumerator(); try { while (<>s__13.MoveNext()) { (5__14, 5__15) = <>s__13.Current; if ((Object)(object)5__14 == (Object)null || !5__14.isActive) { continue; } 5__16 = ((Component)5__14).GetComponent(); 5__17 = ((Component)5__14).GetComponent(); if (<>4__this.useReverseAccelMode) { if ((Object)(object)5__17 != (Object)null) { 5__17.linearVelocity = 5__15 * <>4__this.initialOutwardSpeed; } 5__14.StartReverseAccelerationMode(); } else { if ((Object)(object)5__17 != (Object)null) { 5__17.gravityScale = 0f; 5__17.linearVelocity = 5__15 * <>4__this.radialBurstSpeed; } 5__14.acceleration = 0f; 5__14.chaseTime = 6f; if ((Object)(object)5__16 != (Object)null) { 5__16.SendEvent("SILK BALL RELEASE"); } } 5__16 = null; 5__17 = null; 5__14 = null; } } finally { ((IDisposable)<>s__13).Dispose(); } <>s__13 = default(List<(SilkBallBehavior, Vector2)>.Enumerator); Log.Debug(string.Format("[BombBlastBehavior] 已释放 {0} 个丝球,模式: {1}", 5__5.Count, <>4__this.useReverseAccelMode ? "反向加速度" : "径向爆发")); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public float customSize = 0f; public bool spawnSilkBallRing = false; public int silkBallCount = 8; public float initialOutwardSpeed = 12f; public float reverseAcceleration = 25f; public float maxInwardSpeed = 50f; public float reverseAccelDuration = 5f; public bool useReverseAccelMode = true; public float radialBurstSpeed = 18f; public float releaseDelay = 0.3f; public bool enableMoveMode = false; public Transform? moveTarget; public float moveAcceleration = 30f; public float moveMaxSpeed = 8f; public float reachDistance = 2f; public float moveTimeout = 5f; public bool showTrailEffect = false; private PlayMakerFSM? _controlFsm; private FWBlastManager? _blastManager; private SilkBallManager? _silkBallManager; private FsmFloat? _sizeVar; private bool _fsmPatched = false; private bool _isActive = false; private void Awake() { _controlFsm = ((Component)this).GetComponent(); GetManagerReferences(); } private void Start() { if ((Object)(object)_controlFsm != (Object)null && !_fsmPatched) { PatchFsm(); _fsmPatched = true; } } private void OnEnable() { _isActive = true; } private void OnDisable() { _isActive = false; } public void Configure(bool spawnRing, int ballCount = 8, float outSpeed = 12f, float reverseAccel = 25f, float maxInSpeed = 30f, float duration = 5f, bool useReverseAccel = true, float radialSpeed = 18f, float delay = 0.3f) { spawnSilkBallRing = spawnRing; silkBallCount = ballCount; initialOutwardSpeed = outSpeed; reverseAcceleration = reverseAccel; maxInwardSpeed = maxInSpeed; reverseAccelDuration = duration; useReverseAccelMode = useReverseAccel; radialBurstSpeed = radialSpeed; releaseDelay = delay; } public void ConfigureMoveMode(Transform target, float accel = 30f, float maxSpeed = 8f, float reach = 2f, float timeout = 5f, bool trailEffect = false) { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) enableMoveMode = true; moveTarget = target; moveAcceleration = accel; moveMaxSpeed = maxSpeed; reachDistance = reach; moveTimeout = timeout; showTrailEffect = trailEffect; Rigidbody2D component = ((Component)this).GetComponent(); if ((Object)(object)component == (Object)null) { component = ((Component)this).gameObject.AddComponent(); component.gravityScale = 0f; component.linearDamping = 0f; component.linearVelocity = Vector2.zero; component.angularVelocity = 0f; } else { component.gravityScale = 0f; component.linearDamping = 0f; component.linearVelocity = Vector2.zero; component.angularVelocity = 0f; } EnsureFsmPatched(); if ((Object)(object)_controlFsm != (Object)null) { _controlFsm.Fsm.HandleFixedUpdate = true; _controlFsm.AddEventHandlerComponents(); } UpdateMoveTargetParams(); } public void StopMove() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) Rigidbody2D component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { component.linearVelocity = Vector2.zero; } } public void EnsureFsmPatched() { if (!_fsmPatched) { if ((Object)(object)_controlFsm == (Object)null) { _controlFsm = ((Component)this).GetComponent(); } if ((Object)(object)_controlFsm != (Object)null) { PatchFsm(); _fsmPatched = true; Log.Debug("[BombBlastBehavior] FSM 已在 ConfigureMoveMode 中提前补丁"); } } } public void SetBlastSize() { if (_sizeVar != null) { if (customSize > 0f) { _sizeVar.Value = customSize; } else { _sizeVar.Value = Random.Range(0.6f, 0.8f); } } } public void OnBlastTriggered() { if (spawnSilkBallRing && (Object)(object)_silkBallManager != (Object)null) { ((MonoBehaviour)this).StartCoroutine(SpawnSilkBallRingCoroutine()); } } public void RecycleBlast() { if ((Object)(object)_blastManager != (Object)null) { _blastManager.RecycleBombBlast(((Component)this).gameObject); } else { ((Component)this).gameObject.SetActive(false); } } public void ResetConfig() { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) customSize = 0f; spawnSilkBallRing = false; silkBallCount = 8; initialOutwardSpeed = 12f; reverseAcceleration = 25f; maxInwardSpeed = 30f; reverseAccelDuration = 5f; useReverseAccelMode = true; radialBurstSpeed = 18f; releaseDelay = 0.3f; enableMoveMode = false; moveTarget = null; moveAcceleration = 30f; moveMaxSpeed = 8f; reachDistance = 2f; moveTimeout = 5f; showTrailEffect = false; Rigidbody2D component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { component.linearVelocity = Vector2.zero; } ClearChaseTargetReferences(); ResetStartTransition(); } private void ClearChaseTargetReferences() { if ((Object)(object)_controlFsm == (Object)null) { return; } FsmState[] fsmStates = _controlFsm.FsmStates; foreach (FsmState val in fsmStates) { if (val.Actions == null) { continue; } FsmStateAction[] actions = val.Actions; foreach (FsmStateAction val2 in actions) { if (val2 is ChaseTargetAction chaseTargetAction) { chaseTargetAction.targetTransform = null; } } } } private void PatchFsm() { if (!((Object)(object)_controlFsm == (Object)null)) { _sizeVar = _controlFsm.FsmVariables.GetFsmFloat("Size"); PatchBlastState(); PatchEndState(); PatchWaitState(); PatchForMoveMode(); } } private void PatchBlastState() { //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown FsmState val = ((IEnumerable)_controlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Blast")); if (val == null) { return; } List list = val.Actions.ToList(); if (list.Any(delegate(FsmStateAction a) { CallMethod val3 = (CallMethod)(object)((a is CallMethod) ? a : null); int result; if (val3 != null) { FsmString methodName = val3.methodName; result = ((((methodName != null) ? methodName.Value : null) == "SetBlastSize") ? 1 : 0); } else { result = 0; } return (byte)result != 0; })) { return; } int num = -1; for (int i = 0; i < list.Count; i++) { if (list[i] is RandomFloat) { num = i; break; } } if (num >= 0) { list.RemoveAt(num); CallMethod val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("SetBlastSize") { Value = "SetBlastSize" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.storeResult = new FsmVar(); CallMethod item = val2; list.Insert(num, (FsmStateAction)(object)item); val.Actions = list.ToArray(); Log.Debug("[BombBlastBehavior] FSM Blast 状态已补丁:RandomFloat -> CallMethod(SetBlastSize)"); } } private void PatchEndState() { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown FsmState val = ((IEnumerable)_controlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "End")); if (val != null) { List list = val.Actions.ToList(); list.RemoveAll((FsmStateAction a) => a is RecycleSelf); CallMethod val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("RecycleBlast") { Value = "RecycleBlast" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.storeResult = new FsmVar(); CallMethod item = val2; list.Add((FsmStateAction)(object)item); val.Actions = list.ToArray(); Log.Debug("[BombBlastBehavior] FSM End 状态已补丁:RecycleSelf -> CallMethod(RecycleBlast)"); } } private void PatchWaitState() { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown FsmState val = ((IEnumerable)_controlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Wait")); if (val != null) { List list = val.Actions.ToList(); if (!list.Any(delegate(FsmStateAction a) { CallMethod val3 = (CallMethod)(object)((a is CallMethod) ? a : null); int result; if (val3 != null) { FsmString methodName = val3.methodName; result = ((((methodName != null) ? methodName.Value : null) == "OnBlastTriggered") ? 1 : 0); } else { result = 0; } return (byte)result != 0; })) { CallMethod val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("OnBlastTriggered") { Value = "OnBlastTriggered" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.storeResult = new FsmVar(); CallMethod item = val2; list.Insert(0, (FsmStateAction)(object)item); val.Actions = list.ToArray(); Log.Debug("[BombBlastBehavior] FSM Wait 状态已补丁:添加 CallMethod(OnBlastTriggered)"); } } } private void PatchForMoveMode() { //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Expected O, but got Unknown //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Expected O, but got Unknown //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Expected O, but got Unknown //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Expected O, but got Unknown //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Expected O, but got Unknown //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Expected O, but got Unknown //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Expected O, but got Unknown //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Expected O, but got Unknown //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Expected O, but got Unknown //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Expected O, but got Unknown //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Expected O, but got Unknown //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Expected O, but got Unknown //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Expected O, but got Unknown //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Expected O, but got Unknown //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Expected O, but got Unknown //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Expected O, but got Unknown //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Expected O, but got Unknown //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Expected O, but got Unknown //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Expected O, but got Unknown //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Expected O, but got Unknown //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Expected O, but got Unknown //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Expected O, but got Unknown //IL_0479: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Expected O, but got Unknown //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Expected O, but got Unknown FsmEvent fsmEvent = FsmEvent.GetFsmEvent("START_NORMAL"); FsmEvent fsmEvent2 = FsmEvent.GetFsmEvent("START_MOVE"); FsmEvent orCreateEvent = FsmStateBuilder.GetOrCreateEvent(_controlFsm, "REACHED_BOSS"); FsmState val = FsmStateBuilder.FindState(_controlFsm, "Start"); FsmState val2 = FsmStateBuilder.FindState(_controlFsm, "Appear Pause"); FsmState val3 = FsmStateBuilder.FindState(_controlFsm, "Wait"); if (val == null || val2 == null || val3 == null) { Log.Warn("[BombBlastBehavior] 找不到必要的 FSM 状态"); return; } FsmState orCreateState = FsmStateBuilder.GetOrCreateState(_controlFsm, "Moving", "继续移动 + 爆炸效果"); CallMethod val4; if (orCreateState.Actions == null || orCreateState.Actions.Length == 0) { FsmStateAction[] obj = new FsmStateAction[5] { new ChaseTargetAction { targetTransform = null, acceleration = new FsmFloat { Value = 30f }, maxSpeed = new FsmFloat { Value = 8f }, useRigidbody = new FsmBool { Value = true }, chaseTime = new FsmFloat { Value = 10f }, reachDistance = new FsmFloat { Value = 0.5f }, onReachTarget = orCreateEvent, onTimeout = null }, default(FsmStateAction), default(FsmStateAction), default(FsmStateAction), default(FsmStateAction) }; val4 = new CallMethod(); val4.behaviour = new FsmObject { Value = (Object)(object)this }; val4.methodName = new FsmString("SetBlastSize") { Value = "SetBlastSize" }; val4.parameters = (FsmVar[])(object)new FsmVar[0]; val4.storeResult = new FsmVar(); obj[1] = (FsmStateAction)val4; obj[2] = (FsmStateAction)new SetScale { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _controlFsm.Fsm.GetFsmGameObject("Blast") }, vector = new FsmVector3(), x = _sizeVar, y = _sizeVar, z = new FsmFloat { Value = 0f }, everyFrame = false }; obj[3] = (FsmStateAction)new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _controlFsm.Fsm.GetFsmGameObject("Blast") }, activate = new FsmBool { Value = true }, recursive = new FsmBool { Value = false }, resetOnExit = false, everyFrame = false }; obj[4] = (FsmStateAction)new Wait { time = new FsmFloat { Value = 2f }, finishEvent = FsmEvent.Finished, realTime = false }; orCreateState.Actions = (FsmStateAction[])(object)obj; } FsmState orCreateState2 = FsmStateBuilder.GetOrCreateState(_controlFsm, "Stop Move", "停止移动"); FsmStateAction[] array = new FsmStateAction[2]; val4 = new CallMethod(); val4.behaviour = new FsmObject { Value = (Object)(object)this }; val4.methodName = new FsmString("StopMove") { Value = "StopMove" }; val4.parameters = (FsmVar[])(object)new FsmVar[0]; val4.storeResult = new FsmVar(); array[0] = (FsmStateAction)val4; array[1] = (FsmStateAction)new Wait { time = new FsmFloat { Value = 2f }, finishEvent = FsmEvent.Finished, realTime = false }; orCreateState2.Actions = (FsmStateAction[])(object)array; FsmStateBuilder.SetFinishedTransition(orCreateState2, val3); orCreateState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(orCreateEvent, orCreateState2) }; FsmState orCreateState3 = FsmStateBuilder.GetOrCreateState(_controlFsm, "Move To Target", "追踪目标"); if (orCreateState3.Actions == null || orCreateState3.Actions.Length == 0) { orCreateState3.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { new ChaseTargetAction { targetTransform = null, acceleration = new FsmFloat { Value = 30f }, maxSpeed = new FsmFloat { Value = 8f }, useRigidbody = new FsmBool { Value = true }, chaseTime = new FsmFloat { Value = 5f }, reachDistance = new FsmFloat { Value = 2f }, onReachTarget = null, onTimeout = null }, (FsmStateAction)new WaitRandom { timeMin = new FsmFloat { Value = 0.2f }, timeMax = new FsmFloat { Value = 0.4f }, finishEvent = FsmEvent.Finished, realTime = false } }; FsmStateBuilder.SetFinishedTransition(orCreateState3, orCreateState); } FsmState orCreateState4 = FsmStateBuilder.GetOrCreateState(_controlFsm, "Mode Select", "模式选择"); if (orCreateState4.Actions == null || orCreateState4.Actions.Length == 0) { orCreateState4.Actions = (FsmStateAction[])(object)new FsmStateAction[0]; orCreateState4.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(fsmEvent, val2), FsmStateBuilder.CreateTransition(fsmEvent2, orCreateState3) }; } for (int i = 0; i < val.Transitions.Length; i++) { if (val.Transitions[i].EventName == "FINISHED") { val.Transitions[i].ToFsmState = orCreateState4; val.Transitions[i].ToState = "Mode Select"; break; } } Log.Debug("[BombBlastBehavior] FSM 已补丁:Mode Select + Move To Target + Moving 状态已创建"); } private void UpdateMoveTargetParams() { if ((Object)(object)moveTarget == (Object)null || (Object)(object)_controlFsm == (Object)null) { return; } FsmState val = ((IEnumerable)_controlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Move To Target")); if (val != null) { ChaseTargetAction chaseTargetAction = val.Actions?.OfType().FirstOrDefault(); if (chaseTargetAction != null) { chaseTargetAction.targetTransform = moveTarget; chaseTargetAction.acceleration.Value = moveAcceleration; chaseTargetAction.maxSpeed.Value = moveMaxSpeed; chaseTargetAction.reachDistance.Value = reachDistance; chaseTargetAction.chaseTime.Value = moveTimeout; } } FsmState val2 = ((IEnumerable)_controlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Moving")); if (val2 != null) { ChaseTargetAction chaseTargetAction2 = val2.Actions?.OfType().FirstOrDefault(); if (chaseTargetAction2 != null) { chaseTargetAction2.targetTransform = moveTarget; chaseTargetAction2.acceleration.Value = moveAcceleration; chaseTargetAction2.maxSpeed.Value = moveMaxSpeed; chaseTargetAction2.reachDistance.Value = reachDistance; chaseTargetAction2.chaseTime.Value = moveTimeout; chaseTargetAction2.onReachTarget = FsmEvent.GetFsmEvent("REACHED_BOSS"); chaseTargetAction2.onTimeout = null; } Transform val3 = ((Component)this).transform.Find("Blast"); if ((Object)(object)val3 != (Object)null) { SetScale val4 = val2.Actions?.OfType().FirstOrDefault(); if (val4 != null) { val4.gameObject.GameObject.Value = ((Component)val3).gameObject; } ActivateGameObject val5 = val2.Actions?.OfType().FirstOrDefault(); if (val5 != null) { val5.gameObject.GameObject.Value = ((Component)val3).gameObject; } } } Log.Debug($"[BombBlastBehavior] 移动参数已更新:目标={((Object)moveTarget).name}, 加速度={moveAcceleration}, 最大速度={moveMaxSpeed}"); } private void ResetStartTransition() { } [IteratorStateMachine(typeof(d__43))] private IEnumerator SpawnSilkBallRingCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__43(0) { <>4__this = this }; } private void GetManagerReferences() { GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { _blastManager = val.GetComponent(); _silkBallManager = val.GetComponent(); } } } [RequireComponent(typeof(tk2dSpriteAnimator))] [RequireComponent(typeof(Rigidbody2D))] [RequireComponent(typeof(PlayMakerFSM))] internal class MemoryBossBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__38 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryBossBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__38(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SetupBoss()); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__39 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryBossBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__39(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.GetComponents(); <>4__this.ModifyBossControlFSM(); Log.Info("Boss行为控制器初始化完成"); <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public string fsmName = "Control"; private PlayMakerFSM? _bossControlFsm; private MemoryAttackControlBehavior? _attackControlBehavior; private bool[] phaseFlags = new bool[10]; private const float DASH_SPEED = 8f; private const float DASH_ANTIC_TIME = 0.3f; private const float DASH_ANTIC_TIME_FIRST = 0.6f; private const float IDLE_WAIT_TIME = 0.6f; private const float MAX_DASH_TIME = 4f; private static readonly Vector3 POS_LEFT_DOWN = new Vector3(25f, 137f, 0f); private static readonly Vector3 POS_LEFT_UP = new Vector3(25f, 142.5f, 0f); private static readonly Vector3 POS_MIDDLE_UP = new Vector3(39.5f, 142.5f, 0f); private static readonly Vector3 POS_MIDDLE_DOWN = new Vector3(39.5f, 137f, 0f); private static readonly Vector3 POS_RIGHT_UP = new Vector3(51.5f, 142.5f, 0f); private static readonly Vector3 POS_RIGHT_DOWN = new Vector3(51.5f, 137f, 0f); public FsmFloat? RoutePoint0X; public FsmFloat? RoutePoint0Y; public FsmFloat? RoutePoint1X; public FsmFloat? RoutePoint1Y; public FsmFloat? RoutePoint2X; public FsmFloat? RoutePoint2Y; public FsmFloat? RoutePointSpecialX; public FsmFloat? RoutePointSpecialY; public FsmFloat? IdleWaitTime; private GameObject? _silkHair; private GameObject? _targetPoint0; private GameObject? _targetPoint1; private GameObject? _targetPoint2; private GameObject? _targetPointSpecial; private FsmGameObject? _fsmTargetPoint0; private FsmGameObject? _fsmTargetPoint1; private FsmGameObject? _fsmTargetPoint2; private FsmGameObject? _fsmTargetPointSpecial; private string _lastStateName = ""; private Vector3 _currentRoamTarget; private float _roamMoveStartTime; private bool _roamMoveComplete = false; private bool _collider2DWasEnabled = true; private Collider2D? _bossCollider2D; private void Awake() { } private void Start() { ((MonoBehaviour)this).StartCoroutine(DelayedSetup()); } private void OnDestroy() { CleanupAllSilkBallsOnDestroy(); } private void OnDisable() { CleanupAllSilkBallsOnDestroy(); } [IteratorStateMachine(typeof(d__38))] private IEnumerator DelayedSetup() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__38(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__39))] private IEnumerator SetupBoss() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__39(0) { <>4__this = this }; } private void GetComponents() { _bossControlFsm = FSMUtility.LocateMyFSM(((Component)this).gameObject, fsmName); _attackControlBehavior = ((Component)this).GetComponent(); if ((Object)(object)_attackControlBehavior == (Object)null) { Log.Warn("未找到AttackControlBehavior组件,部分眩晕清理逻辑将无效"); } _silkHair = ((Component)((Component)this).transform.parent.Find("Silk_Hair")).gameObject; } private void AddStunInterruptHandling() { if (!((Object)(object)_bossControlFsm == (Object)null)) { Log.Info("=== 添加眩晕中断处理 ==="); AddCleanupToStunStagger(); AddRecoveryEventToStunRecover(); Log.Info("眩晕中断处理添加完成"); } } private void AddCleanupToStunStagger() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown FsmState val = ((IEnumerable)_bossControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Stun Stagger")); if (val == null) { Log.Warn("未找到 Stun Stagger 状态,跳过清理逻辑添加"); return; } List list = val.Actions.ToList(); CallMethod val2 = new CallMethod(); val2.behaviour = FsmObject.op_Implicit((Object)(object)this); val2.methodName = new FsmString("CleanupSilkBallsOnStun") { Value = "CleanupSilkBallsOnStun" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; list.Insert(0, (FsmStateAction)(object)val2); val.Actions = list.ToArray(); Log.Info("已在 Stun Stagger 状态添加丝球清理、中断事件和状态同步"); } private void AddRecoveryEventToStunRecover() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00af: Expected O, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown FsmState val = ((IEnumerable)_bossControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Stun Recover")); if (val == null) { Log.Warn("未找到 Stun Recover 状态,跳过恢复事件添加"); return; } List list = val.Actions.ToList(); list.Insert(0, (FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" } }, sendEvent = new FsmString("SILK BALL RECOVER") { Value = "SILK BALL RECOVER" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); val.Actions = list.ToArray(); Log.Info("已在 Stun Recover 状态添加恢复事件发送"); } public void CleanupSilkBallsOnStun() { Log.Info("Boss眩晕,开始清理丝球"); if ((Object)(object)_attackControlBehavior != (Object)null) { _attackControlBehavior.StopGeneratingSilkBall(); _attackControlBehavior.ClearActiveSilkBalls(); _attackControlBehavior.StopAllSilkBallCoroutines(); } GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { SilkBallManager component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.RecycleAllActiveSilkBalls(); Log.Info("已通过SilkBallManager清理所有丝球"); } else { Log.Warn("未找到SilkBallManager组件"); } SingleWebManager component2 = val.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.ClearPool(); Log.Info("已通过SingleWebManager清理所有丝线"); } else { Log.Warn("未找到SingleWebManager组件"); } } else { Log.Warn("未找到AnySilkBossManager GameObject"); } } private void CleanupAllSilkBallsOnDestroy() { Log.Info("场景切换/对象销毁,执行完全清理"); ((MonoBehaviour)this).StopAllCoroutines(); if ((Object)(object)_attackControlBehavior != (Object)null) { _attackControlBehavior.StopGeneratingSilkBall(); _attackControlBehavior.ClearActiveSilkBalls(); _attackControlBehavior.StopAllSilkBallCoroutines(); } GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { SilkBallManager component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.RecycleAllActiveSilkBalls(); Log.Info("完全清理:已通过SilkBallManager回收所有丝球"); } SingleWebManager component2 = val.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.ClearPool(); Log.Info("完全清理:已通过SingleWebManager清理所有丝线"); } } } private void CreateClimbRoamStates() { if (!((Object)(object)_bossControlFsm == (Object)null)) { Log.Info("=== 开始创建爬升阶段状态链 ==="); RegisterClimbRoarEvents(); FsmState[] array = FsmStateBuilder.CreateStates(_bossControlFsm.Fsm, ("Climb Roar Prepare", "Boss吼叫准备"), ("Climb Roar", "Boss吼叫"), ("Climb Roar End", "Boss吼叫结束"), ("Climb Roar Done", "Boss吼叫完成"), ("Climb Roam Init", "漫游初始化"), ("Climb Roam Select Target", "选择漫游目标"), ("Climb Roam Move", "移动到目标"), ("Climb Roam Idle", "短暂停留")); FsmStateBuilder.AddStatesToFsm(_bossControlFsm, array); FsmState val = array[0]; FsmState val2 = array[1]; FsmState roarEndState = array[2]; FsmState roarDoneState = array[3]; FsmState val3 = array[4]; FsmState selectState = array[5]; FsmState moveState = array[6]; FsmState idleState = array[7]; FsmState idleState2 = FsmStateBuilder.FindState(_bossControlFsm, "Idle"); AddClimbRoarPrepareActions(val); AddClimbRoarActions(val2); AddClimbRoarEndActions(roarEndState); AddClimbRoarDoneActions(roarDoneState); AddClimbRoamInitActions(val3); AddClimbRoamSelectTargetActions(selectState); AddClimbRoamMoveActions(moveState); AddClimbRoamIdleActions(idleState); AddClimbRoarTransitions(val, val2, roarEndState, roarDoneState); AddClimbRoamTransitions(val3, selectState, moveState, idleState); AddClimbPhaseGlobalTransitionsNew(val, val3, idleState2); FsmStateBuilder.ReinitializeFsmVariables(_bossControlFsm); Log.Info("=== 爬升阶段状态链创建完成 ==="); } } private void CreatePinArrayRoarStates() { if (!((Object)(object)_bossControlFsm == (Object)null)) { Log.Info("=== 开始创建 PinArray Roar 状态链 ==="); FsmStateBuilder.RegisterEvents(_bossControlFsm, "PIN ARRAY ROAR START", "PIN ARRAY ROAR DONE"); FsmState[] array = FsmStateBuilder.CreateStates(_bossControlFsm.Fsm, ("PinArray Roar Prepare", "PinArray吼叫准备"), ("PinArray Roar", "PinArray吼叫"), ("PinArray Roar DONE", "PinArray吼叫完成")); FsmStateBuilder.AddStatesToFsm(_bossControlFsm, array); FsmState val = array[0]; FsmState val2 = array[1]; FsmState val3 = array[2]; FsmState val4 = FsmStateBuilder.FindState(_bossControlFsm, "Idle"); AddPinArrayRoarPrepareActions(val); AddPinArrayRoarActions(val2); AddPinArrayRoarDoneActions(val3, val4); FsmStateBuilder.SetFinishedTransition(val, val2); FsmStateBuilder.SetFinishedTransition(val2, val3); if (val4 != null) { FsmStateBuilder.SetFinishedTransition(val3, val4); } List list = _bossControlFsm.Fsm.GlobalTransitions.ToList(); list.Add(FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("PIN ARRAY ROAR START"), val)); _bossControlFsm.Fsm.GlobalTransitions = list.ToArray(); Log.Info("=== PinArray Roar 状态链创建完成 ==="); } } private void AddPinArrayRoarPrepareActions(FsmState state) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0040: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_007f: Expected O, but got Unknown //IL_0084: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Expected O, but got Unknown //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SendEventToRegister { Fsm = _bossControlFsm.Fsm, eventName = new FsmString("ATTACK CLEAR") { Value = "ATTACK CLEAR" } }); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = _silkHair } } }, sendEvent = FsmString.op_Implicit("ROAR"), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new Tk2dPlayAnimationWithEvents { Fsm = _bossControlFsm.Fsm, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Roar") { Value = "Roar" }, animationTriggerEvent = FsmEvent.Finished }); state.Actions = list.ToArray(); } private void AddPinArrayRoarActions(FsmState state) { //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Expected O, but got Unknown //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Expected O, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown List list = new List(); FsmState val = ((IEnumerable)_bossControlFsm.FsmStates).FirstOrDefault((Func)((FsmState x) => x.Name == "Rerise Roar")); if (val != null) { FsmStateAction? obj = ((IEnumerable)val.Actions).FirstOrDefault((Func)((FsmStateAction x) => x is StartRoarEmitter)); StartRoarEmitter val2 = (StartRoarEmitter)(object)((obj is StartRoarEmitter) ? obj : null); IEnumerable enumerable = val.Actions.Where((FsmStateAction x) => x is PlayAudioEvent).Cast(); if (val2 != null) { list.Add((FsmStateAction)new StartRoarEmitter { Fsm = _bossControlFsm.Fsm, spawnPoint = val2.spawnPoint, delay = val2.delay, stunHero = new FsmBool(FsmBool.op_Implicit(false)) { Value = false }, roarBurst = val2.roarBurst, isSmall = val2.isSmall, noVisualEffect = val2.noVisualEffect, forceThroughBind = val2.forceThroughBind, stopOnExit = val2.stopOnExit }); } foreach (PlayAudioEvent item in enumerable) { list.Add((FsmStateAction)new PlayAudioEvent { Fsm = _bossControlFsm.Fsm, audioClip = item.audioClip, volume = ((PlayAudioEventBase)item).volume, pitchMin = ((PlayAudioEventBase)item).pitchMin, pitchMax = ((PlayAudioEventBase)item).pitchMax, audioPlayerPrefab = ((PlayAudioEventBase)item).audioPlayerPrefab, spawnPoint = ((PlayAudioEventBase)item).spawnPoint, spawnPosition = ((PlayAudioEventBase)item).spawnPosition, SpawnedPlayerRef = ((PlayAudioEventBase)item).SpawnedPlayerRef }); } } list.Add((FsmStateAction)new Tk2dWatchAnimationEvents { Fsm = _bossControlFsm.Fsm, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animationTriggerEvent = FsmEvent.Finished }); state.Actions = list.ToArray(); } private void AddPinArrayRoarDoneActions(FsmState state, FsmState nextState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_005f: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00db: Expected O, but got Unknown //IL_00e0: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Expected O, but got Unknown //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Expected O, but got Unknown //IL_014c: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Phase Control") { Value = "Phase Control" } }, sendEvent = new FsmString("PIN ARRAY ROAR DONE") { Value = "PIN ARRAY ROAR DONE" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = _silkHair } } }, sendEvent = FsmString.op_Implicit("IDLE"), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new Tk2dPlayAnimation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Idle") { Value = "Idle" } }); state.Actions = list.ToArray(); if (nextState == null) { } } private void RegisterClimbRoarEvents() { FsmStateBuilder.RegisterEvents(_bossControlFsm, "CLIMB ROAR START", "CLIMB ROAR DONE"); Log.Info("Climb Roar 事件注册完成"); } private void AddClimbRoamInitActions(FsmState initState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = FsmVector2.op_Implicit(new Vector2(0f, 0f)), x = new FsmFloat { UseVariable = false }, y = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("DisableBossCollider") { Value = "DisableBossCollider" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("InitClimbRoamParameters") { Value = "InitClimbRoamParameters" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.2f)), finishEvent = FsmEvent.Finished }); initState.Actions = list.ToArray(); } private void AddClimbRoamSelectTargetActions(FsmState selectState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("CalculateClimbRoamTarget") { Value = "CalculateClimbRoamTarget" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished }); selectState.Actions = list.ToArray(); } private void AddClimbRoamMoveActions(FsmState moveState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SelectRoamAnimation") { Value = "SelectRoamAnimation" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("MoveToRoamTarget") { Value = "MoveToRoamTarget" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = true; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("CheckRoamMoveTimeout") { Value = "CheckRoamMoveTimeout" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = true; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(999f)), finishEvent = null }); moveState.Actions = list.ToArray(); } private void AddClimbRoamIdleActions(FsmState idleState) { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_00f4: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown List list = new List(); if ((Object)(object)HeroController.instance != (Object)null) { list.Add((FsmStateAction)new FaceObjectV2 { objectA = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, objectB = new FsmGameObject { Value = ((Component)HeroController.instance).gameObject }, spriteFacesRight = FsmBool.op_Implicit(false), playNewAnimation = false, newAnimationClip = new FsmString("") { Value = "" }, resetFrame = false, pauseBetweenTurns = 0.5f, everyFrame = false }); } list.Add((FsmStateAction)new Tk2dPlayAnimation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animLibName = new FsmString("") { Value = "" }, clipName = new FsmString("Idle") { Value = "Idle" } }); list.Add((FsmStateAction)new WaitRandom { timeMin = new FsmFloat(FsmFloat.op_Implicit(1f)), timeMax = new FsmFloat(FsmFloat.op_Implicit(2f)), finishEvent = FsmEvent.Finished }); idleState.Actions = list.ToArray(); } private void AddClimbRoamTransitions(FsmState initState, FsmState selectState, FsmState moveState, FsmState idleState) { FsmStateBuilder.SetFinishedTransition(initState, selectState); FsmStateBuilder.SetFinishedTransition(selectState, moveState); FsmStateBuilder.SetFinishedTransition(moveState, idleState); FsmStateBuilder.SetFinishedTransition(idleState, selectState); Log.Info("漫游状态转换设置完成"); } private void AddClimbRoarPrepareActions(FsmState roarPrepareState) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_003b: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_0081: Expected O, but got Unknown //IL_0086: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown List list = new List(); SendEventToRegister item = new SendEventToRegister { Fsm = _bossControlFsm.Fsm, eventName = new FsmString("ATTACK CLEAR") { Value = "ATTACK CLEAR" } }; list.Add((FsmStateAction)(object)item); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = _silkHair } } }, sendEvent = FsmString.op_Implicit("ROAR"), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); Tk2dPlayAnimationWithEvents item2 = new Tk2dPlayAnimationWithEvents { Fsm = _bossControlFsm.Fsm, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Roar") { Value = "Roar" }, animationTriggerEvent = FsmEvent.Finished }; list.Add((FsmStateAction)(object)item2); roarPrepareState.Actions = list.ToArray(); } private void AddClimbRoarActions(FsmState climbRoarState) { //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Expected O, but got Unknown //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Expected O, but got Unknown //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Expected O, but got Unknown List list = new List(); FsmState val = ((IEnumerable)_bossControlFsm.FsmStates).FirstOrDefault((Func)((FsmState x) => x.Name == "Rerise Roar")); if (val == null) { Log.Error("Could not find 'Rerise Roar' state in Boss Control FSM"); return; } FsmStateAction? obj = ((IEnumerable)val.Actions).FirstOrDefault((Func)((FsmStateAction x) => x is StartRoarEmitter)); StartRoarEmitter val2 = (StartRoarEmitter)(object)((obj is StartRoarEmitter) ? obj : null); List list2 = val.Actions.Where((FsmStateAction x) => x is PlayAudioEvent).Cast().ToList(); if (val2 == null) { Log.Error("Missing StartRoarEmitter in 'Rerise Roar' state"); return; } StartRoarEmitter item = new StartRoarEmitter { Fsm = _bossControlFsm.Fsm, spawnPoint = val2.spawnPoint, delay = val2.delay, stunHero = new FsmBool(FsmBool.op_Implicit(true)) { Value = true }, roarBurst = val2.roarBurst, isSmall = val2.isSmall, noVisualEffect = val2.noVisualEffect, forceThroughBind = val2.forceThroughBind, stopOnExit = val2.stopOnExit }; list.Add((FsmStateAction)(object)item); Tk2dWatchAnimationEvents item2 = new Tk2dWatchAnimationEvents { Fsm = _bossControlFsm.Fsm, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animationTriggerEvent = FsmEvent.Finished }; list.Add((FsmStateAction)(object)item2); foreach (PlayAudioEvent item4 in list2) { PlayAudioEvent item3 = new PlayAudioEvent { Fsm = _bossControlFsm.Fsm, audioClip = item4.audioClip, volume = ((PlayAudioEventBase)item4).volume, pitchMin = ((PlayAudioEventBase)item4).pitchMin, pitchMax = ((PlayAudioEventBase)item4).pitchMax, audioPlayerPrefab = ((PlayAudioEventBase)item4).audioPlayerPrefab, spawnPoint = ((PlayAudioEventBase)item4).spawnPoint, spawnPosition = ((PlayAudioEventBase)item4).spawnPosition, SpawnedPlayerRef = ((PlayAudioEventBase)item4).SpawnedPlayerRef }; list.Add((FsmStateAction)(object)item3); } climbRoarState.Actions = list.ToArray(); Log.Info($"Climb Roar 状态添加了 {list.Count} 个 Actions(含 {list2.Count} 个音效)"); } private void AddClimbRoarEndActions(FsmState roarEndState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0045: Expected O, but got Unknown //IL_004a: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = _silkHair } } }, sendEvent = FsmString.op_Implicit("IDLE"), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new Tk2dWatchAnimationEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animationCompleteEvent = FsmEvent.Finished }); roarEndState.Actions = list.ToArray(); } private void AddClimbRoarDoneActions(FsmState roarDoneState) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_0085: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown //IL_00f9: Expected O, but got Unknown //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Expected O, but got Unknown //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0171: Expected O, but got Unknown //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Expected O, but got Unknown //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Expected O, but got Unknown //IL_01ae: Expected O, but got Unknown //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Expected O, but got Unknown //IL_01eb: Expected O, but got Unknown List list = new List(); MusicCue val = ((IEnumerable)Resources.FindObjectsOfTypeAll()).FirstOrDefault((Func)((MusicCue mc) => ((Object)mc).name == "Silk Boss B")); if ((Object)(object)val != (Object)null) { list.Add((FsmStateAction)new ApplyMusicCue { musicCue = new FsmObject { Value = (Object)(object)val }, delayTime = new FsmFloat(FsmFloat.op_Implicit(0f)), transitionTime = new FsmFloat(FsmFloat.op_Implicit(0f)) }); Log.Info("已添加二阶段音乐 ApplyMusicCue (Silk Boss B)"); } else { Log.Warn("未找到 Silk Boss B MusicCue,二阶段音乐可能无法播放"); } list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Phase Control") { Value = "Phase Control" } }, sendEvent = new FsmString("CLIMB ROAR DONE") { Value = "CLIMB ROAR DONE" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new Tk2dPlayAnimation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Idle") { Value = "Idle" } }); list.Add((FsmStateAction)new SendEventToRegisterDelay { delay = new FsmFloat(FsmFloat.op_Implicit(3.5f)), EventName = new FsmString("BLADES RETURN") { Value = "BLADES RETURN" } }); list.Add((FsmStateAction)new SendEventToRegisterDelay { delay = new FsmFloat(FsmFloat.op_Implicit(4.5f)), EventName = new FsmString("BLADES RETURN") { Value = "BLADES RETURN" } }); roarDoneState.Actions = list.ToArray(); } private void AddClimbRoarTransitions(FsmState roarPrepareState, FsmState roarState, FsmState roarEndState, FsmState roarDoneState) { FsmStateBuilder.SetFinishedTransition(roarPrepareState, roarState); FsmStateBuilder.SetFinishedTransition(roarState, roarEndState); FsmStateBuilder.SetFinishedTransition(roarEndState, roarDoneState); roarDoneState.Transitions = Array.Empty(); } private void AddClimbPhaseGlobalTransitionsNew(FsmState climbRoarPrepare, FsmState climbRoamInit, FsmState? idleState) { List list = _bossControlFsm.Fsm.GlobalTransitions.ToList(); list.Add(FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB ROAR START"), climbRoarPrepare)); list.Add(FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB PHASE START"), climbRoamInit)); if (idleState != null) { list.Add(FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB PHASE END"), idleState)); } _bossControlFsm.Fsm.GlobalTransitions = list.ToArray(); Log.Info("爬升阶段全局转换添加完成(含Roar)"); } private void AddClimbPhaseGlobalTransitions(FsmState climbRoamInit, FsmState? idleState) { List list = _bossControlFsm.Fsm.GlobalTransitions.ToList(); list.Add(FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB PHASE START"), climbRoamInit)); if (idleState != null) { list.Add(FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB PHASE END"), idleState)); } _bossControlFsm.Fsm.GlobalTransitions = list.ToArray(); Log.Info("爬升阶段全局转换添加完成"); } public void InitClimbRoamParameters() { Log.Info("漫游参数初始化完成"); } public void CalculateClimbRoamTarget() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) HeroController instance = HeroController.instance; if ((Object)(object)instance == (Object)null) { Log.Warn("HeroController 未找到,使用默认目标点"); _currentRoamTarget = new Vector3(39.5f, 140f, 0f); return; } Vector3 position = instance.transform.position; float num = 25f; float num2 = 55f; float num3 = position.y + 12f; float num4 = 145f; float num5 = Mathf.Clamp(position.x + Random.Range(-8f, 8f), num, num2); float num6 = Mathf.Clamp(position.y + 17f + Random.Range(-5f, 5f), num3, num4); _currentRoamTarget = new Vector3(num5, num6, 0f); Log.Info($"选择漫游目标: {_currentRoamTarget}(玩家上方12-22单位)"); } public void SelectRoamAnimation() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)this).transform.position; bool flag = _currentRoamTarget.x > position.x; tk2dSpriteAnimator component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { component.Play(flag ? "Drift F" : "Drift B"); } _roamMoveStartTime = Time.time; _roamMoveComplete = false; Log.Info("选择动画: " + (flag ? "Drift F" : "Drift B")); } public void MoveToRoamTarget() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) if (_roamMoveComplete) { return; } Vector3 position = ((Component)this).transform.position; float num = Vector3.Distance(position, _currentRoamTarget); if (num < 0.5f) { _roamMoveComplete = true; if ((Object)(object)_bossControlFsm != (Object)null) { _bossControlFsm.SendEvent("FINISHED"); Log.Info("到达漫游目标"); } } else { float num2 = 9f; Vector3 val = _currentRoamTarget - position; Vector3 normalized = ((Vector3)(ref val)).normalized; Transform transform = ((Component)this).transform; transform.position += normalized * num2 * Time.deltaTime; } } public void CheckRoamMoveTimeout() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (!_roamMoveComplete && Time.time - _roamMoveStartTime > 3f) { Log.Warn($"漫游移动超时(3秒),强制完成。当前位置: {((Component)this).transform.position},目标: {_currentRoamTarget}"); _roamMoveComplete = true; if ((Object)(object)_bossControlFsm != (Object)null) { _bossControlFsm.SendEvent("FINISHED"); } } } public void CheckAndTriggerDashPath() { if ((Object)(object)_bossControlFsm == (Object)null) { return; } FsmBool val = _bossControlFsm.FsmVariables.FindFsmBool("Silk Ball Dash Pending"); if (val != null && val.Value) { FsmBool val2 = _bossControlFsm.FsmVariables.FindFsmBool("Special Attack"); bool flag = val2 != null && val2.Value; val.Value = false; if (flag) { _bossControlFsm.SendEvent("SILK BALL DASH BRIDGE"); Log.Info("触发Phase2 Dash路径,Special将在Point 0后插入"); } else { _bossControlFsm.SendEvent("SILK BALL DASH BRIDGE"); Log.Info("触发普通Dash路径"); } } } private void InitializeClimbCastProtection() { PlayMakerFSM val = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Control"); if (!((Object)(object)val == (Object)null)) { CreateClimbCastPrepareState(); val.Fsm.InitData(); Log.Info("爬升Cast保护初始化完成"); } } private void CreateClimbCastPrepareState() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_008d: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown PlayMakerFSM val = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Control"); if ((Object)(object)val == (Object)null) { return; } if (FsmStateBuilder.StateExists(val, "Climb Cast Prepare")) { Log.Info("Climb Cast Prepare状态已存在,跳过创建"); return; } FsmState val2 = FsmStateBuilder.CreateAndAddState(val, "Climb Cast Prepare", "爬升Cast动画保护状态(长Wait时间)"); List list = new List(); FsmBool boolVariable = EnsureBoolVariable(val, "Climb Cast Pending"); list.Add((FsmStateAction)new SetBoolValue { boolVariable = boolVariable, boolValue = new FsmBool(FsmBool.op_Implicit(false)) }); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(2.5f)), finishEvent = FsmEvent.Finished, realTime = false }); val2.Actions = list.ToArray(); FsmState val3 = FsmStateBuilder.FindState(val, "Idle"); if (val3 != null) { FsmStateBuilder.SetFinishedTransition(val2, val3); } Log.Info("创建Climb Cast Prepare状态完成"); } private void SetupControlIdlePendingTransitions() { //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Expected O, but got Unknown //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Expected O, but got Unknown //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Expected O, but got Unknown //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Expected O, but got Unknown //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Expected O, but got Unknown //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Expected O, but got Unknown //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Expected O, but got Unknown if ((Object)(object)_bossControlFsm == (Object)null) { Log.Warn("_bossControlFsm未初始化,无法配置Idle布尔检测"); return; } FsmState val = ((IEnumerable)_bossControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Idle")); if (val == null) { Log.Warn("未找到Idle状态,无法配置布尔检测"); return; } FsmState val2 = ((IEnumerable)_bossControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Climb Cast Prepare")); FsmState val3 = ((IEnumerable)_bossControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Dash Antic 0")); FsmState val4 = ((IEnumerable)_bossControlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Dash Antic Special")); FsmBool climbPendingVar = EnsureBoolVariable(_bossControlFsm, "Climb Cast Pending"); FsmBool dashPendingVar = EnsureBoolVariable(_bossControlFsm, "Silk Ball Dash Pending"); FsmBool val5 = EnsureBoolVariable(_bossControlFsm, "Special Attack"); List list = val.Actions?.ToList() ?? new List(); list.RemoveAll(delegate(FsmStateAction action) { BoolTest val7 = (BoolTest)(object)((action is BoolTest) ? action : null); return val7 != null && (val7.boolVariable == climbPendingVar || val7.boolVariable == dashPendingVar); }); FsmEvent climbBridgeEvent = FsmEvent.GetFsmEvent("CLIMB CAST BRIDGE"); FsmEvent dashBridgeEvent = FsmEvent.GetFsmEvent("SILK BALL DASH BRIDGE"); FsmEvent dashSpecialBridgeEvent = FsmEvent.GetFsmEvent("SILK BALL DASH SPECIAL BRIDGE"); if (val4 != null && val3 != null) { CallMethod val6 = new CallMethod(); val6.behaviour = new FsmObject { Value = (Object)(object)this }; val6.methodName = new FsmString("CheckAndTriggerDashPath") { Value = "CheckAndTriggerDashPath" }; val6.parameters = (FsmVar[])(object)new FsmVar[0]; val6.everyFrame = true; list.Insert(2, (FsmStateAction)(object)val6); } else if (val3 != null) { list.Insert(2, (FsmStateAction)new BoolTest { boolVariable = dashPendingVar, isTrue = dashBridgeEvent, isFalse = FsmEvent.GetFsmEvent("NULL"), everyFrame = true }); } if (val2 != null) { list.Insert(2, (FsmStateAction)new BoolTest { boolVariable = climbPendingVar, isTrue = climbBridgeEvent, isFalse = FsmEvent.GetFsmEvent("NULL"), everyFrame = true }); } AddBurst3BoolTestToIdle(val, list); val.Actions = list.ToArray(); List list2 = val.Transitions?.ToList() ?? new List(); list2.RemoveAll((FsmTransition t) => t.FsmEvent == climbBridgeEvent || t.FsmEvent == dashBridgeEvent || t.FsmEvent == dashSpecialBridgeEvent); if (val2 != null) { list2.Add(new FsmTransition { FsmEvent = climbBridgeEvent, toState = val2.Name, toFsmState = val2 }); } if (val4 != null && val3 != null) { list2.Add(new FsmTransition { FsmEvent = dashSpecialBridgeEvent, toState = val3.Name, toFsmState = val3 }); } if (val3 != null) { list2.Add(new FsmTransition { FsmEvent = dashBridgeEvent, toState = val3.Name, toFsmState = val3 }); } val.Transitions = list2.ToArray(); Log.Info("Idle状态布尔检测配置完成"); } private FsmBool EnsureBoolVariable(PlayMakerFSM targetFsm, string variableName) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown string variableName2 = variableName; List list = targetFsm.FsmVariables.BoolVariables.ToList(); FsmBool val = ((IEnumerable)list).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == variableName2)); if (val != null) { return val; } FsmBool val2 = new FsmBool(variableName2) { Value = false }; list.Add(val2); targetFsm.FsmVariables.BoolVariables = list.ToArray(); targetFsm.FsmVariables.Init(); Log.Info("创建Control FSM Bool变量: " + variableName2); return val2; } public void DisableBossCollider() { if ((Object)(object)_bossCollider2D == (Object)null) { _bossCollider2D = ((Component)this).GetComponent(); } if ((Object)(object)_bossCollider2D != (Object)null) { _collider2DWasEnabled = ((Behaviour)_bossCollider2D).enabled; ((Behaviour)_bossCollider2D).enabled = false; Log.Info("已禁用Boss Collider2D(爬升漫游阶段)"); } else { Log.Warn("未找到Boss Collider2D组件"); } } public void EnableBossCollider() { if ((Object)(object)_bossCollider2D != (Object)null) { ((Behaviour)_bossCollider2D).enabled = _collider2DWasEnabled; Log.Info("已恢复Boss Collider2D"); } } private void ModifyBossControlFSM() { if ((Object)(object)_bossControlFsm == (Object)null) { Log.Error("BossControl FSM未初始化,无法修改"); return; } Log.Info("修改Boss Control FSM"); CreateSilkBallDashStates(); CreateBigSilkBallLockState(); CreateClimbRoamStates(); CreatePinArrayRoarStates(); AddGlobalEventListeners(); AddStunInterruptHandling(); InitializeClimbCastProtection(); CreateBlastBurst3BridgeStates(); SetupControlIdlePendingTransitions(); FsmStateBuilder.ReinitializeFsmVariables(_bossControlFsm); Log.Info("Boss Control FSM修改完成"); } private void CreateSilkBallDashStates() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Expected O, but got Unknown //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Expected O, but got Unknown if (!((Object)(object)_bossControlFsm == (Object)null)) { Log.Info("=== 开始创建移动丝球攻击状态链 ==="); CreateInvisibleTargetPoints(); RoutePoint0X = new FsmFloat("Route Point 0 X") { Value = 0f }; RoutePoint0Y = new FsmFloat("Route Point 0 Y") { Value = 0f }; RoutePoint1X = new FsmFloat("Route Point 1 X") { Value = 0f }; RoutePoint1Y = new FsmFloat("Route Point 1 Y") { Value = 0f }; RoutePoint2X = new FsmFloat("Route Point 2 X") { Value = 0f }; RoutePoint2Y = new FsmFloat("Route Point 2 Y") { Value = 0f }; RoutePointSpecialX = new FsmFloat("Route Point Special X") { Value = 0f }; RoutePointSpecialY = new FsmFloat("Route Point Special Y") { Value = 0f }; IdleWaitTime = new FsmFloat("Idle Wait Time") { Value = 0.6f }; _fsmTargetPoint0 = new FsmGameObject("Target Point 0") { Value = _targetPoint0 }; _fsmTargetPoint1 = new FsmGameObject("Target Point 1") { Value = _targetPoint1 }; _fsmTargetPoint2 = new FsmGameObject("Target Point 2") { Value = _targetPoint2 }; _fsmTargetPointSpecial = new FsmGameObject("Target Point Special") { Value = _targetPointSpecial }; List list = _bossControlFsm.FsmVariables.FloatVariables.ToList(); list.Add(RoutePoint0X); list.Add(RoutePoint0Y); list.Add(RoutePoint1X); list.Add(RoutePoint1Y); list.Add(RoutePoint2X); list.Add(RoutePoint2Y); list.Add(RoutePointSpecialX); list.Add(RoutePointSpecialY); list.Add(IdleWaitTime); _bossControlFsm.FsmVariables.FloatVariables = list.ToArray(); List list2 = _bossControlFsm.FsmVariables.GameObjectVariables.ToList(); list2.Add(_fsmTargetPoint0); list2.Add(_fsmTargetPoint1); list2.Add(_fsmTargetPoint2); list2.Add(_fsmTargetPointSpecial); _bossControlFsm.FsmVariables.GameObjectVariables = list2.ToArray(); EnsureBoolVariable(_bossControlFsm, "Special Attack"); Log.Info("Route Point变量(包括Special)、时间变量、目标点GameObject变量和Special Attack变量已创建"); FsmState val = CreateDashAnticState(-1); FsmState val2 = CreateDashToPointState(-1); FsmState val3 = CreateIdleAtPointState(-1); FsmState val4 = CreateDashAnticState(0); FsmState val5 = CreateDashToPointState(0); FsmState val6 = CreateIdleAtPointState(0); FsmState val7 = CreateDashSpecialCheckState(); FsmState val8 = CreateDashAnticState(1); FsmState val9 = CreateDashToPointState(1); FsmState val10 = CreateIdleAtPointState(1); FsmState val11 = CreateDashAnticState(2); FsmState val12 = CreateDashToPointState(2); FsmState val13 = CreateSilkBallDashEndState(); FsmStateBuilder.AddStatesToFsm(_bossControlFsm, val, val2, val3, val4, val5, val6, val7, val8, val9, val10, val11, val12, val13); SetupSilkBallDashTransitions(val, val2, val3, val4, val5, val6, val7, val8, val9, val10, val11, val12, val13); Log.Info("移动丝球状态链创建完成"); } } private void SetupSilkBallDashTransitions(FsmState dashAnticSpecial, FsmState dashToSpecial, FsmState idleAtSpecial, FsmState dashAntic0, FsmState dashToPoint0, FsmState idleAtPoint0, FsmState dashSpecialCheck, FsmState dashAntic1, FsmState dashToPoint1, FsmState idleAtPoint1, FsmState dashAntic2, FsmState dashToPoint2, FsmState dashEnd) { FsmStateBuilder.SetFinishedTransition(dashAnticSpecial, dashToSpecial); FsmStateBuilder.SetFinishedTransition(dashToSpecial, idleAtSpecial); FsmStateBuilder.SetFinishedTransition(idleAtSpecial, dashAntic1); FsmStateBuilder.SetFinishedTransition(dashAntic0, dashToPoint0); FsmStateBuilder.SetFinishedTransition(dashToPoint0, idleAtPoint0); FsmStateBuilder.SetFinishedTransition(idleAtPoint0, dashSpecialCheck); FsmEvent fsmEvent = FsmEvent.GetFsmEvent("DASH SPECIAL"); dashSpecialCheck.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(fsmEvent, dashAnticSpecial), FsmStateBuilder.CreateFinishedTransition(dashAntic1) }; FsmStateBuilder.SetFinishedTransition(dashAntic1, dashToPoint1); FsmStateBuilder.SetFinishedTransition(dashToPoint1, idleAtPoint1); FsmStateBuilder.SetFinishedTransition(idleAtPoint1, dashAntic2); FsmStateBuilder.SetFinishedTransition(dashAntic2, dashToPoint2); FsmStateBuilder.SetFinishedTransition(dashToPoint2, dashEnd); FsmState val = FsmStateBuilder.FindState(_bossControlFsm, "Idle"); if (val != null) { FsmStateBuilder.SetFinishedTransition(dashEnd, val); } Log.Info("移动丝球状态链转换设置完成(包括Special路径)"); } private FsmState CreateDashSpecialCheckState() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_bossControlFsm.Fsm, "Dash Special Check", "二阶段Dash Special插入判断"); FsmBool boolVariable = EnsureBoolVariable(_bossControlFsm, "Special Attack"); val.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)new BoolTest { boolVariable = boolVariable, isTrue = FsmEvent.GetFsmEvent("DASH SPECIAL"), isFalse = FsmEvent.Finished, everyFrame = false } }; return val; } private FsmState CreateDashAnticState(int pointIndex) { //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Expected O, but got Unknown //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Expected O, but got Unknown //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Expected O, but got Unknown //IL_01eb: Expected O, but got Unknown string name = ((pointIndex == -1) ? "Dash Antic Special" : $"Dash Antic {pointIndex}"); string description = ((pointIndex == -1) ? "准备冲刺到Special点位" : $"准备冲刺到点位 {pointIndex}"); FsmState val = FsmStateBuilder.CreateState(_bossControlFsm.Fsm, name, description); List list = new List(); FsmGameObject val2 = null; switch (pointIndex) { case -1: val2 = _fsmTargetPointSpecial; break; case 0: val2 = _fsmTargetPoint0; break; case 1: val2 = _fsmTargetPoint1; break; case 2: val2 = _fsmTargetPoint2; break; } if (val2 == null) { Log.Error($"CreateDashAnticState: Target object for point {pointIndex} is null."); return val; } list.Add((FsmStateAction)new FaceObjectV2 { objectA = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, objectB = val2, spriteFacesRight = FsmBool.op_Implicit(false), playNewAnimation = false, resetFrame = false, pauseBetweenTurns = 0f, everyFrame = false }); list.Add((FsmStateAction)new Tk2dPlayAnimationWithEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Dash Antic") { Value = "Dash Antic" }, animationCompleteEvent = null }); float num = ((pointIndex == 0) ? 0.6f : 0.3f); list.Add((FsmStateAction)new Wait { time = FsmFloat.op_Implicit(num), finishEvent = FsmEvent.Finished, realTime = false }); if (pointIndex == 0 && (Object)(object)_bossControlFsm != (Object)null) { FsmBool boolVariable = EnsureBoolVariable(_bossControlFsm, "Silk Ball Dash Pending"); list.Insert(0, (FsmStateAction)new SetBoolValue { boolVariable = boolVariable, boolValue = new FsmBool(FsmBool.op_Implicit(false)) }); } val.Actions = list.ToArray(); return val; } private void CreateBigSilkBallLockState() { if (!((Object)(object)_bossControlFsm == (Object)null)) { Log.Info("创建大丝球大招锁定状态"); FsmState val = FsmStateBuilder.CreateAndAddState(_bossControlFsm, "Big Silk Ball Lock", "大丝球大招期间锁定BOSS,只播放Idle动画"); val.Actions = Array.Empty(); FsmState val2 = FsmStateBuilder.FindState(_bossControlFsm, "Idle"); if (val2 != null) { val.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("BIG SILK BALL UNLOCK"), val2) }; } Log.Info("大丝球大招锁定状态创建完成"); } } private void AddGlobalEventListeners() { if ((Object)(object)_bossControlFsm == (Object)null) { return; } FsmState val = FsmStateBuilder.FindState(_bossControlFsm, "Idle"); if (val == null) { Log.Error("未找到Idle状态,跳过添加FORCE IDLE全局监听"); return; } FsmState val2 = FsmStateBuilder.FindState(_bossControlFsm, "Big Silk Ball Lock"); if (val2 == null) { Log.Warn("未找到Big Silk Ball Lock状态,跳过添加BIG SILK BALL LOCK全局监听"); } List list = _bossControlFsm.FsmGlobalTransitions.ToList(); list.Add(FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("FORCE IDLE"), val)); if (val2 != null) { list.Add(FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("BIG SILK BALL LOCK"), val2)); } _bossControlFsm.Fsm.GlobalTransitions = list.ToArray(); } private FsmState CreateDashToPointState(int pointIndex) { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_00de: Expected O, but got Unknown //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Expected O, but got Unknown //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Expected O, but got Unknown //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Expected O, but got Unknown //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Expected O, but got Unknown //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Expected O, but got Unknown //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Expected O, but got Unknown //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Expected O, but got Unknown //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Expected O, but got Unknown //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Expected O, but got Unknown //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Expected O, but got Unknown //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Expected O, but got Unknown //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Expected O, but got Unknown //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Expected O, but got Unknown //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Expected O, but got Unknown //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Expected O, but got Unknown //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Expected O, but got Unknown string name = ((pointIndex == -1) ? "Dash To Special" : $"Dash To Point {pointIndex}"); string description = ((pointIndex == -1) ? "冲刺到Special点位" : $"冲刺到点位 {pointIndex}"); FsmState val = FsmStateBuilder.CreateState(_bossControlFsm.Fsm, name, description); List list = new List(); FsmFloat val2 = null; FsmFloat val3 = null; switch (pointIndex) { case -1: val2 = RoutePointSpecialX; val3 = RoutePointSpecialY; break; case 0: val2 = RoutePoint0X; val3 = RoutePoint0Y; list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 } }, sendEvent = new FsmString("STUN CONTROL STOP") { Value = "STUN CONTROL STOP" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); break; case 1: val2 = RoutePoint1X; val3 = RoutePoint1Y; break; case 2: val2 = RoutePoint2X; val3 = RoutePoint2Y; break; } if (val2 == null || val3 == null) { Log.Error($"CreateDashToPointState: Route Point for point {pointIndex} is null"); return val; } list.Add((FsmStateAction)new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = FsmVector2.op_Implicit(new Vector2(0f, 0f)), x = new FsmFloat { UseVariable = false }, y = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new Tk2dPlayAnimationWithEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Dash") { Value = "Dash" }, animationTriggerEvent = null, animationCompleteEvent = FsmEvent.Finished }); list.Add((FsmStateAction)new AnimateXPositionTo { GameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, ToValue = val2, localSpace = false, time = new FsmFloat(FsmFloat.op_Implicit(4f)), speed = new FsmFloat(FsmFloat.op_Implicit(8f)), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), easeType = (EaseType)21, reverse = new FsmBool(FsmBool.op_Implicit(false)), realTime = false }); list.Add((FsmStateAction)new AnimateYPositionTo { GameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, ToValue = val3, localSpace = false, time = new FsmFloat(FsmFloat.op_Implicit(4f)), speed = new FsmFloat(FsmFloat.op_Implicit(8f)), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), easeType = (EaseType)21, reverse = new FsmBool(FsmBool.op_Implicit(false)), realTime = false }); val.Actions = list.ToArray(); Log.Info($"创建Dash To Point {pointIndex}状态(动态计算时间和动画速度)"); return val; } private FsmState CreateIdleAtPointState(int pointIndex) { //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_0137: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown string name = ((pointIndex == -1) ? "Idle At Special" : $"Idle At Point {pointIndex}"); string description = ((pointIndex == -1) ? "在Special点位等待" : $"在点位 {pointIndex} 等待"); FsmState val = FsmStateBuilder.CreateState(_bossControlFsm.Fsm, name, description); List list = new List(); if ((Object)(object)HeroController.instance != (Object)null) { list.Add((FsmStateAction)new FaceObjectV2 { objectA = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, objectB = FsmGameObject.op_Implicit(((Component)HeroController.instance).gameObject), spriteFacesRight = FsmBool.op_Implicit(false), playNewAnimation = false, newAnimationClip = new FsmString("") { Value = "" }, resetFrame = false, pauseBetweenTurns = 0f, everyFrame = false }); } list.Add((FsmStateAction)new Tk2dPlayAnimation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animLibName = new FsmString("") { Value = "" }, clipName = new FsmString("Idle") { Value = "Idle" } }); list.Add((FsmStateAction)new Wait { time = IdleWaitTime, finishEvent = FsmEvent.Finished, realTime = false }); val.Actions = list.ToArray(); Log.Info($"创建Idle At Point {pointIndex}状态(面向英雄+Idle动画+等待)"); return val; } private FsmState CreateSilkBallDashEndState() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_005e: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_00f4: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Expected O, but got Unknown //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Expected O, but got Unknown //IL_0188: Expected O, but got Unknown //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Expected O, but got Unknown FsmState val = FsmStateBuilder.CreateState(_bossControlFsm.Fsm, "Silk Ball Move End", "移动丝球结束,恢复硬直"); List list = new List(); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 } }, sendEvent = new FsmString("STUN CONTROL START") { Value = "STUN CONTROL START" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" } }, sendEvent = new FsmString("SILK BALL DASH END") { Value = "SILK BALL DASH END" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new Tk2dPlayAnimation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animLibName = new FsmString("") { Value = "" }, clipName = new FsmString("Idle") { Value = "Idle" } }); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.5f)), finishEvent = FsmEvent.Finished, realTime = false }); val.Actions = list.ToArray(); Log.Info("创建Silk Ball Dash End状态"); return val; } private void CreateInvisibleTargetPoints() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) _targetPointSpecial = new GameObject("DashTargetPointSpecial"); _targetPointSpecial.transform.position = Vector3.zero; _targetPointSpecial.SetActive(true); _targetPoint0 = new GameObject("DashTargetPoint0"); _targetPoint0.transform.position = Vector3.zero; _targetPoint0.SetActive(true); _targetPoint1 = new GameObject("DashTargetPoint1"); _targetPoint1.transform.position = Vector3.zero; _targetPoint1.SetActive(true); _targetPoint2 = new GameObject("DashTargetPoint2"); _targetPoint2.transform.position = Vector3.zero; _targetPoint2.SetActive(true); Log.Info("已创建隐形目标点GameObject(包括Special)"); } public void UpdateTargetPointPositions(Vector3 point0, Vector3 point1, Vector3 point2, Vector3? pointSpecial = null) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) if (pointSpecial.HasValue && (Object)(object)_targetPointSpecial != (Object)null) { _targetPointSpecial.transform.position = pointSpecial.Value; } if ((Object)(object)_targetPoint0 != (Object)null) { _targetPoint0.transform.position = point0; } if ((Object)(object)_targetPoint1 != (Object)null) { _targetPoint1.transform.position = point1; } if ((Object)(object)_targetPoint2 != (Object)null) { _targetPoint2.transform.position = point2; } Log.Info($"已更新目标点位置: P0={point0}, P1={point1}, P2={point2}"); } private void CreateBlastBurst3BridgeStates() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_00a3: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown //IL_00fb: Expected O, but got Unknown //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Expected O, but got Unknown //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Expected O, but got Unknown //IL_0160: Expected O, but got Unknown //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Expected O, but got Unknown //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Expected O, but got Unknown //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Expected O, but got Unknown //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Expected O, but got Unknown if (!((Object)(object)_bossControlFsm == (Object)null)) { Log.Info("=== 开始创建 BlastBurst3 协作状态 ==="); FsmBool boolVariable = EnsureBoolVariable(_bossControlFsm, "InBurst3"); FsmEvent fsmEvent = FsmEvent.GetFsmEvent("BURST3 BRIDGE"); FsmEvent fsmEvent2 = FsmEvent.GetFsmEvent("END BURST3"); FsmState val = FsmStateBuilder.CreateAndAddState(_bossControlFsm, "StartBlastBurst3", "BlastBurst3开始,播放Appear动画"); FsmState val2 = FsmStateBuilder.CreateAndAddState(_bossControlFsm, "EndBlastBurst3", "BlastBurst3结束,播放TurnToIdle动画"); List list = new List(); list.Add((FsmStateAction)new SetBoolValue { boolVariable = boolVariable, boolValue = new FsmBool(FsmBool.op_Implicit(false)) }); list.Add((FsmStateAction)new Tk2dPlayAnimation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animLibName = new FsmString("") { Value = "" }, clipName = new FsmString("Appear") { Value = "Appear" } }); list.Add((FsmStateAction)new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = new FsmVector2 { Value = Vector2.zero }, x = new FsmFloat { Value = 0f }, y = new FsmFloat { Value = 0f } }); val.Actions = list.ToArray(); List list2 = new List(); list2.Add((FsmStateAction)new Tk2dPlayAnimationWithEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("TurnToIdle") { Value = "TurnToIdle" }, animationCompleteEvent = FsmEvent.Finished }); list2.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.2f)), finishEvent = FsmEvent.Finished }); val2.Actions = list2.ToArray(); val.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(fsmEvent2, val2) }; FsmState val3 = FsmStateBuilder.FindState(_bossControlFsm, "Idle"); if (val3 != null) { FsmStateBuilder.SetFinishedTransition(val2, val3); } Log.Info("BlastBurst3 协作状态创建完成"); } } private void AddBurst3BoolTestToIdle(FsmState idleState, List actions) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown FsmState val = FsmStateBuilder.FindState(_bossControlFsm, "StartBlastBurst3"); if (val == null) { Log.Warn("未找到 StartBlastBurst3 状态,跳过 InBurst3 BoolTest 添加"); return; } FsmBool boolVariable = EnsureBoolVariable(_bossControlFsm, "InBurst3"); FsmEvent burst3BridgeEvent = FsmEvent.GetFsmEvent("BURST3 BRIDGE"); actions.Insert(2, (FsmStateAction)new BoolTest { boolVariable = boolVariable, isTrue = burst3BridgeEvent, isFalse = FsmEvent.GetFsmEvent("NULL"), everyFrame = true }); List list = idleState.Transitions?.ToList() ?? new List(); list.RemoveAll((FsmTransition t) => t.FsmEvent == burst3BridgeEvent); list.Add(new FsmTransition { FsmEvent = burst3BridgeEvent, toState = val.Name, toFsmState = val }); idleState.Transitions = list.ToArray(); Log.Info("已在 Idle 状态添加 InBurst3 BoolTest 和转换"); } } internal class DomainBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__24 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public DomainBehavior <>4__this; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__24(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.Initialize(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__37 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float duration; public DomainBehavior <>4__this; private float 5__1; private float 5__2; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__37(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 0f; break; case 1: <>1__state = -1; break; } if (5__1 < duration) { 5__1 += Time.deltaTime; 5__2 = 5__1 / duration; <>4__this._currentAlpha = 5__2; if ((Object)(object)<>4__this._domainMaskRenderer != (Object)null) { <>4__this._domainMaskRenderer.color = new Color(1f, 1f, 1f, 5__2); } <>2__current = null; <>1__state = 1; return true; } <>4__this._currentAlpha = 1f; if ((Object)(object)<>4__this._domainMaskRenderer != (Object)null) { <>4__this._domainMaskRenderer.color = new Color(1f, 1f, 1f, 1f); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__38 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float duration; public DomainBehavior <>4__this; private float 5__1; private float 5__2; private float 5__3; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__38(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 0f; 5__2 = <>4__this._currentAlpha; break; case 1: <>1__state = -1; break; } if (5__1 < duration) { 5__1 += Time.deltaTime; 5__3 = 5__1 / duration; <>4__this._currentAlpha = Mathf.Lerp(5__2, 0f, 5__3); if ((Object)(object)<>4__this._domainMaskRenderer != (Object)null) { <>4__this._domainMaskRenderer.color = new Color(1f, 1f, 1f, <>4__this._currentAlpha); } <>2__current = null; <>1__state = 1; return true; } <>4__this._currentAlpha = 0f; if ((Object)(object)<>4__this._domainMaskObject != (Object)null) { <>4__this._domainMaskObject.SetActive(false); } if ((Object)(object)<>4__this._domainMaskRenderer != (Object)null) { <>4__this._domainMaskRenderer.color = new Color(1f, 1f, 1f, 0f); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private Camera? _mainCamera; private Transform? _bossTransform; private Transform? _heroTransform; private float _currentRadius = 12f; private float _targetRadius = 12f; private bool _isActive = false; private bool _isShrinking = false; private float _damageInterval = 1f; private float _damageTimer = 0f; private const int DAMAGE_AMOUNT = 2; private const float SHRINK_DURATION = 0.5f; private const float FEATHER_FRACTION = 0.15f; private const int SPRITE_RESOLUTION = 1024; private GameObject? _domainMaskObject; private SpriteRenderer? _domainMaskRenderer; private Sprite? _domainMaskSprite; private float _currentAlpha = 0f; private float _shrinkStartRadius = 12f; private float _shrinkElapsed = 0f; private float _shrinkDuration = 0.5f; private bool _initialized = false; private void Awake() { SceneManager.sceneLoaded += OnSceneLoaded; ((MonoBehaviour)this).StartCoroutine(DelayedInitialize()); } private void OnDestroy() { SceneManager.sceneLoaded -= OnSceneLoaded; } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { if (((Scene)(ref scene)).name == "Cradle_03") { Log.Info("[DomainBehavior] 检测到进入 BOSS 场景: " + ((Scene)(ref scene)).name + ",执行重置"); if ((Object)(object)_domainMaskObject == (Object)null || (Object)(object)_domainMaskRenderer == (Object)null) { Log.Info("[DomainBehavior] 场景切换后检测到对象丢失,重新初始化"); _initialized = false; ((MonoBehaviour)this).StartCoroutine(DelayedInitialize()); } else { ResetDomain(); } } } [IteratorStateMachine(typeof(d__24))] private IEnumerator DelayedInitialize() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__24(0) { <>4__this = this }; } private void Initialize() { _mainCamera = Camera.main; if ((Object)(object)_mainCamera == (Object)null) { _mainCamera = Object.FindFirstObjectByType(); } CreateDomainMask(); _initialized = true; Log.Info("[DomainBehavior] 初始化完成(单层结构)"); } private void CreateDomainMask() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_domainMaskObject != (Object)null) { Object.Destroy((Object)(object)_domainMaskObject); } _domainMaskObject = new GameObject("Domain Mask"); _domainMaskObject.transform.SetParent(((Component)this).transform); _domainMaskRenderer = _domainMaskObject.AddComponent(); _domainMaskSprite = CreateDomainMaskSprite(1024, 0.15f); _domainMaskRenderer.sprite = _domainMaskSprite; ((Renderer)_domainMaskRenderer).sortingLayerName = "Over"; ((Renderer)_domainMaskRenderer).sortingOrder = 1000; _domainMaskRenderer.color = new Color(1f, 1f, 1f, 0f); _domainMaskObject.SetActive(false); Log.Info("[DomainBehavior] 领域遮罩对象已创建"); } private Sprite CreateDomainMaskSprite(int resolution, float featherFraction) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(resolution, resolution, (TextureFormat)4, false); Color[] array = (Color[])(object)new Color[resolution * resolution]; float num = (float)resolution / 2f; float num2 = (float)resolution / 10f; float num3 = Mathf.Max(4f, num2 * Mathf.Clamp01(featherFraction)); for (int i = 0; i < resolution; i++) { for (int j = 0; j < resolution; j++) { float num4 = Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(num, num)); float num5; if (num4 <= num2 - num3) { num5 = 0f; } else if (num4 >= num2) { num5 = 1f; } else { float num6 = (num4 - (num2 - num3)) / num3; num5 = num6 * num6 * (3f - 2f * num6); } array[i * resolution + j] = new Color(0f, 0f, 0f, num5); } } val.SetPixels(array); ((Texture)val).filterMode = (FilterMode)1; ((Texture)val).wrapMode = (TextureWrapMode)1; val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, (float)resolution, (float)resolution), new Vector2(0.5f, 0.5f), (float)resolution / 10f); } private void Update() { if (_isActive && _initialized) { UpdateMaskPosition(); if (_isShrinking) { UpdateShrinkAnimation(); } CheckPlayerDamage(); } } public void ActivateDomain(Vector3 bossPos, float initialRadius) { //IL_0143: Unknown result type (might be due to invalid IL or missing references) if (!_initialized || (Object)(object)_domainMaskObject == (Object)null || (Object)(object)_domainMaskRenderer == (Object)null) { Log.Warn("[DomainBehavior] 检测到未初始化或对象丢失,重新初始化"); Initialize(); } if ((Object)(object)_domainMaskRenderer == (Object)null) { Log.Error("[DomainBehavior] 领域遮罩组件未正确初始化,无法激活"); return; } _currentRadius = initialRadius; _targetRadius = initialRadius; _isActive = true; _isShrinking = false; _damageTimer = 0f; _currentAlpha = 0f; GameObject val = GameObject.Find("Silk Boss"); if ((Object)(object)val != (Object)null) { _bossTransform = val.transform; } else { Log.Warn("[DomainBehavior] 未找到 Silk Boss,使用传入的位置"); } HeroController val2 = Object.FindFirstObjectByType(); if ((Object)(object)val2 != (Object)null) { _heroTransform = val2.transform; } if ((Object)(object)_domainMaskObject != (Object)null) { _domainMaskObject.SetActive(true); } UpdateMaskPosition(); UpdateMaskSize(); if ((Object)(object)_domainMaskRenderer != (Object)null) { _domainMaskRenderer.color = new Color(1f, 1f, 1f, 0f); } ((MonoBehaviour)this).StartCoroutine(FadeInDomain()); Log.Info($"[DomainBehavior] 领域结界已激活,初始安全半径: {initialRadius}"); } public void ShrinkDomain(float newRadius, float duration = 0.5f) { if (_isActive) { _targetRadius = newRadius; _shrinkStartRadius = _currentRadius; _shrinkElapsed = 0f; _shrinkDuration = Mathf.Max(0.01f, duration); _isShrinking = true; Log.Info($"[DomainBehavior] 领域结界开始缩小: {_currentRadius} -> {_targetRadius}"); } } public void DeactivateDomain() { if (_isActive) { _isActive = false; _isShrinking = false; ((MonoBehaviour)this).StartCoroutine(FadeOutDomain()); Log.Info("[DomainBehavior] 领域结界已停用"); } } public void ResetDomain() { //IL_00bb: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)this).StopAllCoroutines(); _currentRadius = 12f; _targetRadius = 12f; _isActive = false; _isShrinking = false; _damageTimer = 0f; _shrinkStartRadius = 12f; _shrinkElapsed = 0f; _shrinkDuration = 0.5f; _currentAlpha = 0f; _bossTransform = null; _heroTransform = null; if ((Object)(object)_domainMaskObject != (Object)null) { _domainMaskObject.SetActive(false); } if ((Object)(object)_domainMaskRenderer != (Object)null) { _domainMaskRenderer.color = new Color(1f, 1f, 1f, 0f); } Log.Info("[DomainBehavior] 领域结界已重置"); } private void UpdateMaskPosition() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_domainMaskObject == (Object)null) && !((Object)(object)_bossTransform == (Object)null)) { _domainMaskObject.transform.position = _bossTransform.position; } } private void UpdateMaskSize() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_domainMaskObject == (Object)null)) { float currentRadius = _currentRadius; _domainMaskObject.transform.localScale = new Vector3(currentRadius, currentRadius, 1f); } } private void UpdateShrinkAnimation() { _shrinkElapsed += Time.deltaTime; float num = Mathf.Clamp01(_shrinkElapsed / Mathf.Max(0.01f, _shrinkDuration)); _currentRadius = Mathf.Lerp(_shrinkStartRadius, _targetRadius, num); UpdateMaskSize(); if (num >= 1f || Mathf.Approximately(_currentRadius, _targetRadius)) { _currentRadius = _targetRadius; _isShrinking = false; UpdateMaskSize(); } } private void CheckPlayerDamage() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_bossTransform == (Object)null || (Object)(object)_heroTransform == (Object)null) { return; } float num = Vector2.Distance(new Vector2(_heroTransform.position.x, _heroTransform.position.y), new Vector2(_bossTransform.position.x, _bossTransform.position.y)); if (num > _currentRadius) { _damageTimer += Time.deltaTime; if (_damageTimer >= _damageInterval) { HeroController component = ((Component)_heroTransform).GetComponent(); if ((Object)(object)component != (Object)null) { component.TakeDamage((GameObject)null, (CollisionSide)4, 2, (HazardType)0, (DamagePropertyFlags)0); Log.Debug($"[DomainBehavior] 玩家在危险区,造成 {2} 点伤害"); } _damageTimer = 0f; } } else { _damageTimer = 0f; } } [IteratorStateMachine(typeof(d__37))] private IEnumerator FadeInDomain(float duration = 0.5f) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__37(0) { <>4__this = this, duration = duration }; } [IteratorStateMachine(typeof(d__38))] private IEnumerator FadeOutDomain(float duration = 0.5f) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__38(0) { <>4__this = this, duration = duration }; } } internal class MemoryBigSilkBallBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__92 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryBigSilkBallBehavior <>4__this; private float 5__1; private float 5__2; private float 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__92(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.isAbsorbing = true; <>4__this.absorbedCount = 0; <>4__this.currentScale = <>4__this.initialScale; <>4__this.shouldStopSpawning = false; <>4__this.forceOverrideScale = true; <>4__this.targetHeartScale = Vector3.one * <>4__this.currentScale; if ((Object)(object)<>4__this.collisionBoxScript != (Object)null) { <>4__this.collisionBoxScript.SetScale(<>4__this.currentScale); } Log.Info($"吸收蓄力开始 - 初始缩放: {<>4__this.currentScale}, 目标吸收数: {<>4__this.absorbCountToMax}, 每秒生成: {<>4__this.absorbSpawnRate}"); 5__1 = 0f; 5__2 = 1f / <>4__this.absorbSpawnRate; 5__3 = 0f; break; case 1: <>1__state = -1; break; } if (5__1 < <>4__this.absorbDuration && !<>4__this.shouldStopSpawning) { 5__1 += Time.deltaTime; if (5__1 >= 5__3) { <>4__this.SpawnAbsorbBall(); 5__3 = 5__1 + 5__2; } <>2__current = null; <>1__state = 1; return true; } <>4__this.isAbsorbing = false; Log.Info($"吸收蓄力完成 - 共吸收: {<>4__this.absorbedCount} 个,最终缩放: {<>4__this.currentScale}"); <>4__this.PlayBurstAnimation(); <>4__this.NotifyPhaseControl("ChargeComplete"); if ((Object)(object)<>4__this.controlFSM != (Object)null) { <>4__this.controlFSM.SendEvent("FINISHED"); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__101 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SilkBallBehavior behavior; public MemoryBigSilkBallBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__101(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)behavior != (Object)null) { behavior.SendFsmEvent("HAS_GRAVITY"); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__110 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject tempInstance; public MemoryBigSilkBallBehavior <>4__this; private PlayMakerFSM 5__1; private FsmState 5__2; private FsmStateAction[] <>s__3; private int <>s__4; private FsmStateAction 5__5; private PlayAudioEvent 5__6; private Exception 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__110(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; <>s__3 = null; 5__5 = null; 5__6 = null; 5__7 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; try { if ((Object)(object)tempInstance == (Object)null) { Log.Warn("临时实例已被销毁,无法提取音效"); return false; } 5__1 = ((IEnumerable)tempInstance.GetComponents()).FirstOrDefault((Func)((PlayMakerFSM fsm) => fsm.FsmName == "Control")); if ((Object)(object)5__1 == (Object)null) { Log.Warn("无法提取吸收音效:临时实例上未找到 Control FSM"); return false; } 5__2 = ((IEnumerable)5__1.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Disappear")); if (5__2 == null) { Log.Warn("无法提取吸收音效:Control FSM 中未找到 Disappear 状态"); return false; } <>s__3 = 5__2.Actions; for (<>s__4 = 0; <>s__4 < <>s__3.Length; <>s__4++) { 5__5 = <>s__3[<>s__4]; ref PlayAudioEvent reference = ref 5__6; FsmStateAction obj = 5__5; reference = (PlayAudioEvent)(object)((obj is PlayAudioEvent) ? obj : null); if (5__6 != null) { MemoryBigSilkBallBehavior memoryBigSilkBallBehavior = <>4__this; FsmObject audioClip = 5__6.audioClip; ref AudioClip? absorbAudioClip = ref memoryBigSilkBallBehavior.absorbAudioClip; Object obj2 = ((audioClip != null) ? audioClip.Value : null); absorbAudioClip = (AudioClip?)(object)((obj2 is AudioClip) ? obj2 : null); MemoryBigSilkBallBehavior memoryBigSilkBallBehavior2 = <>4__this; FsmFloat pitchMin = ((PlayAudioEventBase)5__6).pitchMin; memoryBigSilkBallBehavior2.absorbAudioPitchMin = ((pitchMin != null) ? pitchMin.Value : 1f); MemoryBigSilkBallBehavior memoryBigSilkBallBehavior3 = <>4__this; FsmFloat pitchMax = ((PlayAudioEventBase)5__6).pitchMax; memoryBigSilkBallBehavior3.absorbAudioPitchMax = ((pitchMax != null) ? pitchMax.Value : 1f); MemoryBigSilkBallBehavior memoryBigSilkBallBehavior4 = <>4__this; FsmFloat volume = ((PlayAudioEventBase)5__6).volume; memoryBigSilkBallBehavior4.absorbAudioVolume = ((volume != null) ? volume.Value : 1f); break; } 5__6 = null; 5__5 = null; } <>s__3 = null; 5__1 = null; 5__2 = null; } catch (Exception ex) { 5__7 = ex; Log.Error("提取音效数据时出错:" + 5__7.Message); } finally { if ((Object)(object)tempInstance != (Object)null) { Object.Destroy((Object)(object)tempInstance); Log.Debug("已销毁临时音效提取实例"); } } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__103 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryBigSilkBallBehavior <>4__this; private List> 5__1; private int 5__2; private float 5__3; private float 5__4; private float 5__5; private List 5__6; private int 5__7; private float 5__8; private SilkBallBehavior 5__9; private int 5__10; private List 5__11; private List.Enumerator <>s__12; private SilkBallBehavior 5__13; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__103(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__6 = null; 5__9 = null; 5__11 = null; <>s__12 = default(List.Enumerator); 5__13 = null; <>1__state = -2; } private bool MoveNext() { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Expected O, but got Unknown //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Expected O, but got Unknown //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info($"最终爆炸开始 - 圈数: {<>4__this.finalBurstRings}, 每圈数量: {<>4__this.ballsPerRing}"); <>2__current = (object)new WaitForSeconds(2f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = new List>(); 5__2 = 0; goto IL_0221; case 2: <>1__state = -1; goto IL_01a3; case 3: <>1__state = -1; 5__6 = null; 5__2++; goto IL_0221; case 4: <>1__state = -1; 5__10 = 0; goto IL_0382; case 5: { <>1__state = -1; goto IL_036a; } IL_0382: if (5__10 < 5__1.Count) { 5__11 = 5__1[5__10]; <>s__12 = 5__11.GetEnumerator(); try { while (<>s__12.MoveNext()) { 5__13 = <>s__12.Current; if ((Object)(object)5__13 != (Object)null) { <>4__this.BurstRingBall(5__13, 5__10); } 5__13 = null; } } finally { ((IDisposable)<>s__12).Dispose(); } <>s__12 = default(List.Enumerator); if (5__10 < 5__1.Count - 1) { <>2__current = (object)new WaitForSeconds(<>4__this.ringSpawnInterval); <>1__state = 5; return true; } goto IL_036a; } Log.Info("所有圈已爆发完成"); <>4__this.NotifyPhaseControl("BurstComplete"); if ((Object)(object)<>4__this.controlFSM != (Object)null) { <>4__this.controlFSM.SendEvent("FINISHED"); } return false; IL_01bb: if (5__7 < <>4__this.ballsPerRing) { 5__8 = (float)5__7 * 5__4 + 5__5; 5__9 = <>4__this.SpawnRingBall(5__3, 5__8); if ((Object)(object)5__9 != (Object)null) { 5__6.Add(5__9); } if ((5__7 + 1) % 2 == 0) { <>2__current = null; <>1__state = 2; return true; } goto IL_01a3; } 5__1.Add(5__6); <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 3; return true; IL_0221: if (5__2 < <>4__this.finalBurstRings && 5__2 < <>4__this.ringRadii.Length) { 5__3 = <>4__this.ringRadii[5__2]; 5__4 = 360f / (float)<>4__this.ballsPerRing; 5__5 = ((5__2 % 2 == 1) ? (5__4 / 2f) : 0f); 5__6 = new List(); 5__7 = 0; goto IL_01bb; } <>2__current = (object)new WaitForSeconds(<>4__this.ringBurstDelay); <>1__state = 4; return true; IL_01a3: 5__9 = null; 5__7++; goto IL_01bb; IL_036a: 5__11 = null; 5__10++; goto IL_0382; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__97 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SilkBallBehavior behavior; public float timeout; public MemoryBigSilkBallBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__97(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(timeout); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)behavior != (Object)null && (Object)(object)((Component)behavior).gameObject != (Object)null && behavior.isActive && behavior.canBeAbsorbed) { Log.Info($"吸收小丝球超时 ({timeout}秒),自动回收"); behavior.RecycleToPoolWithZTransition(); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__96 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject silkBall; public MemoryBigSilkBallBehavior <>4__this; private PlayMakerFSM 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__96(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; if (!((Object)(object)silkBall != (Object)null)) { break; } 5__1 = silkBall.GetComponent(); if ((Object)(object)5__1 != (Object)null) { 5__1.SendEvent("PREPARE"); <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 2; return true; } goto IL_00b8; case 2: { <>1__state = -1; 5__1.SendEvent("SILK BALL RELEASE"); goto IL_00b8; } IL_00b8: 5__1 = null; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__99 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryBigSilkBallBehavior <>4__this; private int 5__1; private (float spawnAngle, float radiusMult, float shootAngle, int ballCount, float interval) 5__2; private int 5__3; private float 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__99(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info($"抛射波次开始 - 总波数: {<>4__this._shootWaveConfigs.Length}"); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = 0; break; case 2: <>1__state = -1; 5__1++; break; } if (5__1 < <>4__this._shootWaveConfigs.Length) { 5__2 = <>4__this._shootWaveConfigs[5__1]; 5__3 = 0; while (5__3 < 5__2.ballCount) { 5__4 = 0.4f + (float)5__3 * 0.1f; <>4__this.SpawnShootBall(5__2.spawnAngle, 5__2.radiusMult, 5__2.shootAngle, 5__4); 5__3++; } <>2__current = (object)new WaitForSeconds(5__2.interval); <>1__state = 2; return true; } Log.Info("抛射波次完成"); <>4__this.NotifyPhaseControl("ShootComplete"); if ((Object)(object)<>4__this.controlFSM != (Object)null) { <>4__this.controlFSM.SendEvent("FINISHED"); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [Header("Boss引用")] public GameObject? bossObject; private MemoryPhaseControlBehavior? phaseControlBehavior; [Header("位置参数")] public Vector3 chestOffset = new Vector3(0f, -1f, 0f); [Header("碰撞箱参数")] public float collisionBoxRadius = 5f; public float initialScale = 0.1f; public float maxScale = 0.7f; [Header("爆炸参数")] public string burstAnimationName = "Silk_Cocoon_Intro_Burst"; public float burstDuration = 11.53f; public int ballsPerWave = 3; [Header("吸收蓄力参数")] public float absorbDuration = 10f; public float absorbSpawnRate = 10f; public float absorbSpawnRadius = 40f; public int absorbCountToMax = 30; public float scaleIncreasePerAbsorb = 0.012f; public float lowerHalfProbability = 0.7f; public float absorbAudioVolumeMultiplier = 3f; [Header("抛射波次参数")] public float shootSpeed = 13f; public float shootSpeedRandomRange = 5f; public float shootAngleRandomRange = 15f; public float shootGravityScale = 0.0005f; public float shootAcceleration = 15f; private readonly (float spawnAngle, float radiusMult, float shootAngle, int ballCount, float interval)[] _shootWaveConfigs = new(float, float, float, int, float)[7] { (352.5f, 0.5f, 65f, 5, 0.7f), (0f, 0f, 60f, 4, 0.35f), (45f, 0.125f, 65f, 4, 0.35f), (130f, 0.5f, 105f, 8, 0.5f), (0f, 0f, 80f, 4, 0.35f), (0f, 0f, 120f, 8, 1f), (0f, 0f, 90f, 8, 0.5f) }; [Header("最终爆炸参数")] public int finalBurstRings = 5; public int ballsPerRing = 20; public float[] ringRadii = new float[5] { 1f, 2f, 3f, 4f, 5f }; public float orbitalAngularSpeed = 60f; public float ringSpawnInterval = 0.5f; public float ringBurstDelay = 1.6f; public float burstSpeed = 18f; public float innerRingSpeedMultiplier = 1.2f; public float outerRingSpeedMultiplier = 0.8f; public float finalBurstGravityScale = 0f; private PlayMakerFSM? controlFSM; private Animator? animator; private SilkBallManager? silkBallManager; [Header("内部引用")] public Transform? heartTransform; public GameObject? collisionBox; public Transform? collisionBoxTransform; private MemoryBigSilkBallCollisionBox? collisionBoxScript; private GameObject? heroObject; private float lastHeroX = 0f; private Vector3 collisionBoxBaseLocalPos; private readonly Vector3 collisionBoxVisualAnchorLocalPos = new Vector3(-6.4f, -5f, 0f); private readonly Vector3 collisionBoxWorldOffset = new Vector3(-1.75f, 1.75f, 0f); private AudioClip? absorbAudioClip; private float absorbAudioPitchMin = 1f; private float absorbAudioPitchMax = 1f; private float absorbAudioVolume = 1f; private FsmGameObject? bossTransformVar; private FsmVector3? chestOffsetVar; private FsmFloat? maxScaleVar; private FsmEvent? startChargeEvent; private FsmEvent? animationCompleteEvent; private bool isInitialized = false; private bool isAbsorbing = false; private int absorbedCount = 0; private float currentScale = 0.1f; private bool shouldStopSpawning = false; private bool shouldUpdateCollisionBoxPosition = true; private bool forceOverrideScale = false; private Vector3 targetHeartScale; private Vector3 savedBurstCenter; public void Initialize(GameObject rootObject, GameObject boss, Transform? heart = null) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) if (isInitialized) { Log.Warn("大丝球已初始化"); return; } bossObject = boss; heartTransform = heart; if ((Object)(object)heartTransform != (Object)null) { Log.Info($"heart保持原版相对位置: {heartTransform.localPosition}"); Log.Info("将只调整根物品XY轴跟随BOSS,Z轴保持原版"); } if ((Object)(object)boss != (Object)null) { phaseControlBehavior = boss.GetComponent(); if ((Object)(object)phaseControlBehavior == (Object)null) { Log.Warn("未找到 PhaseControlBehavior 组件"); } } HeroController instance = HeroController.instance; heroObject = ((instance != null) ? ((Component)instance).gameObject : null); if ((Object)(object)heroObject != (Object)null) { lastHeroX = heroObject.transform.position.x; Log.Info($"成功获取英雄引用,初始X位置: {lastHeroX}"); } SilkSpool instance2 = SilkSpool.Instance; GetComponentReferences(rootObject); CreateCollisionBox(); CreateControlFSM(); isInitialized = true; Log.Info("大丝球初始化完成,heart引用: " + (((Object)(object)heartTransform != (Object)null) ? "已设置" : "未设置") + ",碰撞箱: " + (((Object)(object)collisionBox != (Object)null) ? "已创建" : "未创建")); } private void Update() { UpdateCollisionBoxPosition(); } private void UpdateCollisionBoxPosition() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) if (shouldUpdateCollisionBoxPosition && !((Object)(object)collisionBox == (Object)null)) { if (TryProjectVisualAnchorToWorldZ0(out var projectedCenter)) { collisionBox.transform.position = projectedCenter; } else { collisionBox.transform.localPosition = collisionBoxBaseLocalPos; } } } private bool TryProjectVisualAnchorToWorldZ0(out Vector3 projectedCenter) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) projectedCenter = Vector3.zero; GameCameras silentInstance = GameCameras.SilentInstance; Camera val = (((Object)(object)silentInstance != (Object)null) ? silentInstance.mainCamera : Camera.main); if ((Object)(object)val == (Object)null) { val = Camera.main; } if ((Object)(object)val == (Object)null) { return false; } Vector3 val2 = ((Component)this).transform.TransformPoint(collisionBoxVisualAnchorLocalPos); Vector3 val3 = val.WorldToViewportPoint(val2); if (val3.z <= 0f) { return false; } Ray val4 = val.ViewportPointToRay(new Vector3(val3.x, val3.y, 0f)); Plane val5 = default(Plane); ((Plane)(ref val5))..ctor(Vector3.forward, Vector3.zero); float num = default(float); if (!((Plane)(ref val5)).Raycast(val4, ref num)) { return false; } projectedCenter = ((Ray)(ref val4)).GetPoint(num); projectedCenter.z = 0f; projectedCenter += collisionBoxWorldOffset; return true; } private void LateUpdate() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)heartTransform != (Object)null && forceOverrideScale) { heartTransform.localScale = targetHeartScale; } UpdateCollisionBoxPosition(); } private void GetComponentReferences(GameObject rootObject) { animator = rootObject.GetComponent(); if ((Object)(object)animator == (Object)null) { Log.Warn("未找到 Animator 组件"); } else { RuntimeAnimatorController runtimeAnimatorController = animator.runtimeAnimatorController; Log.Info("找到 Animator 组件,RuntimeAnimatorController: " + (((runtimeAnimatorController != null) ? ((Object)runtimeAnimatorController).name : null) ?? "null")); if ((Object)(object)animator.runtimeAnimatorController != (Object)null) { AnimationClip[] animationClips = animator.runtimeAnimatorController.animationClips; if (animationClips != null && animationClips.Length != 0) { Log.Info($"Animator 包含 {animationClips.Length} 个动画片段"); AnimationClip[] array = animationClips; foreach (AnimationClip val in array) { Log.Info($" - {((Object)val).name} ({val.length:F2}s)"); } } else { Log.Warn("Animator 没有动画片段"); } } } GameObject val2 = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val2 != (Object)null) { silkBallManager = val2.GetComponent(); if ((Object)(object)silkBallManager == (Object)null) { Log.Warn("未找到 SilkBallManager 组件"); } else { ExtractAbsorbAudioAction(); } } else { Log.Warn("未找到 AnySilkBossManager 对象"); } } private void CreateCollisionBox() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) collisionBox = new GameObject("CollisionBox"); collisionBox.transform.parent = ((Component)this).transform; collisionBoxBaseLocalPos = new Vector3(-6.4f, -5f, -57.4491f) + collisionBoxWorldOffset; collisionBox.transform.localPosition = collisionBoxBaseLocalPos; collisionBoxScript = collisionBox.AddComponent(); collisionBoxScript.parentBehavior = this; collisionBoxTransform = collisionBox.transform; collisionBox.transform.localScale = Vector3.one * initialScale; collisionBox.layer = LayerMask.NameToLayer("Terrain"); Log.Info($"碰撞箱已创建 - 世界位置: {collisionBox.transform.position}, 本地位置: {collisionBox.transform.localPosition}, 初始缩放: {initialScale}"); } private void CreateControlFSM() { if ((Object)(object)controlFSM != (Object)null) { Log.Warn("Control FSM 已存在"); return; } controlFSM = ((Component)this).gameObject.AddComponent(); controlFSM.FsmName = "Big Silk Ball Control"; FsmState val = CreateInitState(); FsmState val2 = CreateFollowBossState(); FsmState val3 = CreateAbsorbChargeState(); FsmState val4 = CreateShootWavesState(); FsmState val5 = CreateFinalBurstState(); FsmState val6 = CreateDestroyState(); controlFSM.Fsm.States = (FsmState[])(object)new FsmState[6] { val, val2, val3, val4, val5, val6 }; RegisterFSMEvents(); CreateFSMVariables(); AddInitActions(val); AddFollowBossActions(val2); AddAbsorbChargeActions(val3); AddShootWavesActions(val4); AddFinalBurstActions(val5); AddDestroyActions(val6); AddInitTransitions(val, val2); AddFollowBossTransitions(val2, val3); AddAbsorbChargeTransitions(val3, val4); AddShootWavesTransitions(val4, val5); AddFinalBurstTransitions(val5, val6); controlFSM.Fsm.InitData(); Type type = ((object)controlFSM.Fsm).GetType(); FieldInfo field = type.GetField("started", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { field.SetValue(controlFSM.Fsm, true); } controlFSM.Fsm.SetState(val.Name); Log.Info("=== 大丝球 Control FSM 创建完成,当前状态: " + controlFSM.Fsm.ActiveStateName + " ==="); } private void RegisterFSMEvents() { startChargeEvent = FsmEvent.GetFsmEvent("START CHARGE"); animationCompleteEvent = FsmEvent.GetFsmEvent("ANIMATION COMPLETE"); List list = controlFSM.Fsm.Events.ToList(); if (!list.Contains(startChargeEvent)) { list.Add(startChargeEvent); } if (!list.Contains(animationCompleteEvent)) { list.Add(animationCompleteEvent); } controlFSM.Fsm.Events = list.ToArray(); Log.Info("FSM 事件注册完成"); } private void CreateFSMVariables() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown bossTransformVar = new FsmGameObject("Boss Transform") { Value = bossObject }; controlFSM.FsmVariables.GameObjectVariables = (FsmGameObject[])(object)new FsmGameObject[1] { bossTransformVar }; chestOffsetVar = new FsmVector3("Chest Offset") { Value = chestOffset }; controlFSM.FsmVariables.Vector3Variables = (FsmVector3[])(object)new FsmVector3[1] { chestOffsetVar }; maxScaleVar = new FsmFloat("Max Scale") { Value = maxScale }; controlFSM.FsmVariables.FloatVariables = (FsmFloat[])(object)new FsmFloat[1] { maxScaleVar }; controlFSM.FsmVariables.IntVariables = (FsmInt[])(object)new FsmInt[0]; controlFSM.FsmVariables.Init(); } private FsmState CreateInitState() { return FsmStateBuilder.CreateState(controlFSM.Fsm, "Init", "初始化状态"); } private FsmState CreateFollowBossState() { return FsmStateBuilder.CreateState(controlFSM.Fsm, "Follow Boss", "跟随Boss胸前"); } private FsmState CreateAbsorbChargeState() { return FsmStateBuilder.CreateState(controlFSM.Fsm, "Absorb Charge", "吸收蓄力"); } private FsmState CreateShootWavesState() { return FsmStateBuilder.CreateState(controlFSM.Fsm, "Shoot Waves", "抛射波次"); } private FsmState CreateFinalBurstState() { return FsmStateBuilder.CreateState(controlFSM.Fsm, "Final Burst", "最终爆炸"); } private FsmState CreateDestroyState() { return FsmStateBuilder.CreateState(controlFSM.Fsm, "Destroy", "销毁自身"); } private void AddInitActions(FsmState initState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SetInitialScale") { Value = "SetInitialScale" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished }; initState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, (FsmStateAction)val3 }; } private void AddFollowBossActions(FsmState followBossState) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown FollowTargetAction followTargetAction = new FollowTargetAction(); GameObject? obj = bossObject; followTargetAction.targetTransform = ((obj != null) ? obj.transform : null); followTargetAction.positionOffset = new FsmVector3 { Value = chestOffset }; followTargetAction.followX = new FsmBool { Value = true }; followTargetAction.followY = new FsmBool { Value = true }; followTargetAction.followZ = new FsmBool { Value = false }; followTargetAction.followRotation = new FsmBool { Value = false }; followTargetAction.forceDirectSet = new FsmBool { Value = true }; FollowTargetAction followTargetAction2 = followTargetAction; followBossState.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { followTargetAction2 }; } private void AddAbsorbChargeActions(FsmState absorbChargeState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartAbsorbChargeCoroutine") { Value = "StartAbsorbChargeCoroutine" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; FollowTargetAction followTargetAction = new FollowTargetAction(); GameObject? obj = bossObject; followTargetAction.targetTransform = ((obj != null) ? obj.transform : null); followTargetAction.positionOffset = new FsmVector3 { Value = chestOffset }; followTargetAction.followX = new FsmBool { Value = true }; followTargetAction.followY = new FsmBool { Value = true }; followTargetAction.followZ = new FsmBool { Value = false }; followTargetAction.followRotation = new FsmBool { Value = false }; followTargetAction.forceDirectSet = new FsmBool { Value = true }; FollowTargetAction followTargetAction2 = followTargetAction; absorbChargeState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, followTargetAction2 }; } private void AddShootWavesActions(FsmState shootWavesState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("FixPosition") { Value = "FixPosition" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartShootWavesCoroutine") { Value = "StartShootWavesCoroutine" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val3 = val; Wait val4 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(6f)), finishEvent = FsmEvent.Finished }; shootWavesState.Actions = (FsmStateAction[])(object)new FsmStateAction[3] { (FsmStateAction)val2, (FsmStateAction)val3, (FsmStateAction)val4 }; } private void AddFinalBurstActions(FsmState finalBurstState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartFinalBurstCoroutine") { Value = "StartFinalBurstCoroutine" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(8f)), finishEvent = FsmEvent.Finished }; finalBurstState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, (FsmStateAction)val3 }; } private void AddDestroyActions(FsmState destroyState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("DestroySelf") { Value = "DestroySelf" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; destroyState.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)val2 }; } private void AddInitTransitions(FsmState initState, FsmState followBossState) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown initState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.Finished, toState = "Follow Boss", toFsmState = followBossState } }; } private void AddFollowBossTransitions(FsmState followBossState, FsmState absorbChargeState) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown followBossState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = startChargeEvent, toState = "Absorb Charge", toFsmState = absorbChargeState } }; } private void AddAbsorbChargeTransitions(FsmState absorbChargeState, FsmState shootWavesState) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown absorbChargeState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.Finished, toState = "Shoot Waves", toFsmState = shootWavesState } }; } private void AddShootWavesTransitions(FsmState shootWavesState, FsmState finalBurstState) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown shootWavesState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.Finished, toState = "Final Burst", toFsmState = finalBurstState } }; } private void AddFinalBurstTransitions(FsmState finalBurstState, FsmState destroyState) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown finalBurstState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.Finished, toState = "Destroy", toFsmState = destroyState } }; } public void SetInitialScale() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)heartTransform != (Object)null) { targetHeartScale = Vector3.one * initialScale; forceOverrideScale = true; Log.Info($"设置heart初始缩放: {initialScale}(启用强制覆盖)"); } else { Log.Warn("heartTransform为null,无法设置初始缩放"); } } public void FixPosition() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)heartTransform != (Object)null) { targetHeartScale = heartTransform.localScale; forceOverrideScale = true; Log.Info($"固定状态 - 根物品位置: {((Component)this).transform.position}, heart缩放: {targetHeartScale}"); } else { Log.Info($"固定根物品位置: {((Component)this).transform.position}"); } } public void StartAbsorbChargeCoroutine() { Log.Info("开始吸收蓄力阶段"); ((MonoBehaviour)this).StartCoroutine(AbsorbChargeCoroutine()); } [IteratorStateMachine(typeof(d__92))] private IEnumerator AbsorbChargeCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__92(0) { <>4__this = this }; } private void PlayBurstAnimation() { if ((Object)(object)animator != (Object)null) { Log.Info("播放爆炸动画: " + burstAnimationName); animator.Play(burstAnimationName); RuntimeAnimatorController runtimeAnimatorController = animator.runtimeAnimatorController; AnimationClip[] array = ((runtimeAnimatorController != null) ? runtimeAnimatorController.animationClips : null); if (array != null) { AnimationClip val = ((IEnumerable)array).FirstOrDefault((Func)((AnimationClip c) => ((Object)c).name == burstAnimationName)); if ((Object)(object)val != (Object)null) { Log.Info($"动画长度: {val.length:F2}s"); } else { Log.Warn("未找到动画片段: " + burstAnimationName); } } } else { Log.Warn("Animator 为 null,无法播放动画"); } } public void OnAbsorbBall(SilkBallBehavior silkBall) { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)silkBall == (Object)null || !silkBall.canBeAbsorbed) { return; } if (!isAbsorbing) { silkBall.RecycleToPoolWithZTransition(); return; } if (shouldStopSpawning) { Log.Info("已达到最大缩放,立即回收超额丝球"); silkBall.RecycleToPoolWithZTransition(); return; } absorbedCount++; currentScale += scaleIncreasePerAbsorb; if (currentScale >= maxScale) { currentScale = maxScale; shouldStopSpawning = true; Log.Info($"达到最大缩放 {maxScale},停止生成新的小丝球"); } targetHeartScale = Vector3.one * currentScale; if ((Object)(object)collisionBoxScript != (Object)null) { collisionBoxScript.SetScale(currentScale); } Log.Info($"吸收小丝球 #{absorbedCount} - 当前缩放: {currentScale:F2}"); PlayAbsorbAudio(); silkBall.RecycleToPoolWithZTransition(); } private void SpawnAbsorbBall() { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)silkBallManager == (Object)null) && !((Object)(object)collisionBoxTransform == (Object)null)) { float num = ((!(Random.value < lowerHalfProbability)) ? Random.Range(90f, 270f) : Random.Range(-90f, 90f)); float num2 = num * (MathF.PI / 180f); Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(Mathf.Cos(num2), Mathf.Sin(num2)); Vector3 position = collisionBoxTransform.position + new Vector3(val.x, val.y, 0f) * absorbSpawnRadius; SilkBallBehavior silkBallBehavior = silkBallManager.SpawnSilkBall(position, 10f, 15f, 100f, 1f, enableRotation: true, collisionBoxTransform, ignoreWall: true, delayDamageActivation: false); if ((Object)(object)silkBallBehavior != (Object)null) { silkBallBehavior.canBeAbsorbed = true; ((MonoBehaviour)this).StartCoroutine(RecycleAbsorbBallAfterTimeout(silkBallBehavior, 15f)); ((MonoBehaviour)this).StartCoroutine(ReleaseAbsorbBall(((Component)silkBallBehavior).gameObject)); } } } [IteratorStateMachine(typeof(d__96))] private IEnumerator ReleaseAbsorbBall(GameObject silkBall) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__96(0) { <>4__this = this, silkBall = silkBall }; } [IteratorStateMachine(typeof(d__97))] private IEnumerator RecycleAbsorbBallAfterTimeout(SilkBallBehavior behavior, float timeout) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__97(0) { <>4__this = this, behavior = behavior, timeout = timeout }; } public void StartShootWavesCoroutine() { Log.Info("开始抛射波次阶段"); ((MonoBehaviour)this).StartCoroutine(ShootWavesCoroutine()); } [IteratorStateMachine(typeof(d__99))] private IEnumerator ShootWavesCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__99(0) { <>4__this = this }; } private void SpawnShootBall(float spawnAngle, float radiusMult, float shootAngle, float boostDelay) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)silkBallManager == (Object)null) && !((Object)(object)collisionBoxTransform == (Object)null)) { float num = collisionBoxRadius; float num2 = num * radiusMult; float num3 = spawnAngle * (MathF.PI / 180f); Vector2 val = new Vector2(Mathf.Cos(num3), Mathf.Sin(num3)) * num2; Vector3 position = collisionBoxTransform.position + new Vector3(val.x, val.y, 0f); float num4 = Random.Range(0f - shootAngleRandomRange, shootAngleRandomRange); float num5 = shootAngle + num4; float num6 = num5 * (MathF.PI / 180f); Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(Mathf.Cos(num6), Mathf.Sin(num6)); float num7 = Random.Range(0f - shootSpeedRandomRange, shootSpeedRandomRange); float num8 = shootSpeed + num7; SilkBallBehavior silkBallBehavior = silkBallManager.SpawnSilkBall(position, 0f, 25f, 10f, 1.33f, enableRotation: true, null, ignoreWall: false, delayDamageActivation: false); if ((Object)(object)silkBallBehavior != (Object)null) { silkBallBehavior.StartProtectionTime(1f); silkBallBehavior.SetPhysics(val2 * num8, shootGravityScale); silkBallBehavior.SetGravityScale(shootGravityScale); silkBallBehavior.SendFsmEvent("PREPARE"); ((MonoBehaviour)this).StartCoroutine(DelayedSendHasGravityEvent(silkBallBehavior)); silkBallBehavior.ApplyDelayedBoostTowardsHero(boostDelay, 45f); } } } [IteratorStateMachine(typeof(d__101))] private IEnumerator DelayedSendHasGravityEvent(SilkBallBehavior behavior) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__101(0) { <>4__this = this, behavior = behavior }; } public void StartFinalBurstCoroutine() { //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) Log.Info("开始最终爆炸阶段"); if ((Object)(object)silkBallManager != (Object)null) { Log.Info($"[MemoryBigSilkBall] FinalBurst需求数量: {finalBurstRings * ballsPerRing} (圈数:{finalBurstRings}, 每圈:{ballsPerRing})"); silkBallManager.LogPoolStatus(); } shouldUpdateCollisionBoxPosition = false; if ((Object)(object)collisionBoxTransform != (Object)null) { savedBurstCenter = collisionBoxTransform.position; } else { savedBurstCenter = ((Component)this).transform.position; } savedBurstCenter += Vector3.up * 1.3f; if ((Object)(object)collisionBox != (Object)null) { collisionBox.SetActive(false); } ((MonoBehaviour)this).StartCoroutine(FinalBurstCoroutine()); } [IteratorStateMachine(typeof(d__103))] private IEnumerator FinalBurstCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__103(0) { <>4__this = this }; } private SilkBallBehavior? SpawnRingBall(float radius, float angle) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)silkBallManager == (Object)null) { return null; } float num = angle * (MathF.PI / 180f); Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(Mathf.Cos(num), Mathf.Sin(num)); Vector3 position = savedBurstCenter + new Vector3(val.x, val.y, 0f) * radius; SilkBallBehavior silkBallBehavior = silkBallManager.SpawnSilkBall(position, 0f, burstSpeed, 10f, 1f, enableRotation: true, null, ignoreWall: false, delayDamageActivation: false); if ((Object)(object)silkBallBehavior != (Object)null) { silkBallBehavior.StartProtectionTime(2f); silkBallBehavior.SetPhysics(Vector2.zero, finalBurstGravityScale); silkBallBehavior.SendFsmEvent("SILK BALL RELEASE"); return silkBallBehavior; } return null; } private void BurstRingBall(SilkBallBehavior behavior, int ringIndex) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)behavior == (Object)null)) { Vector3 val = ((Component)behavior).transform.position - savedBurstCenter; Vector3 normalized = ((Vector3)(ref val)).normalized; float num = 1f; if (ringIndex == 0) { num = innerRingSpeedMultiplier; } else if (ringIndex >= finalBurstRings - 1) { num = outerRingSpeedMultiplier; } Vector2 velocity = new Vector2(normalized.x, normalized.y) * burstSpeed * num; behavior.SetPhysics(velocity, finalBurstGravityScale); float angularSpeed = ((ringIndex % 2 == 0) ? (0f - orbitalAngularSpeed) : orbitalAngularSpeed); behavior.StartOrbitalMotion(savedBurstCenter, angularSpeed, burstSpeed * num); } } private void NotifyPhaseControl(string eventName) { if ((Object)(object)phaseControlBehavior != (Object)null) { Log.Info("通知 PhaseControl: " + eventName); phaseControlBehavior.OnBigSilkBallEvent(eventName); } else { Log.Warn("PhaseControlBehavior 为 null,无法发送通知"); } } public void DestroySelf() { Log.Info("销毁大丝球"); Object.Destroy((Object)(object)((Component)this).gameObject); } public void StartCharge() { if ((Object)(object)controlFSM != (Object)null) { Log.Info("发送 START CHARGE 事件,当前状态: " + controlFSM.ActiveStateName); controlFSM.SendEvent("START CHARGE"); Log.Info("事件发送后状态: " + controlFSM.ActiveStateName); } else { Log.Error("controlFSM 为 null,无法发送 START CHARGE 事件"); } } private void ExtractAbsorbAudioAction() { GameObject val = null; try { GameObject val2 = null; GameObject val3 = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val3 != (Object)null) { AssetManager component = val3.GetComponent(); if ((Object)(object)component != (Object)null) { val2 = component.Get("Reaper Silk Bundle"); } } if ((Object)(object)val2 == (Object)null && (Object)(object)silkBallManager?.CustomSilkBallPrefab != (Object)null) { val2 = silkBallManager.CustomSilkBallPrefab; } if ((Object)(object)val2 == (Object)null) { Log.Warn("无法提取吸收音效:找不到预制体"); return; } val = Object.Instantiate(val2); val.SetActive(false); ((Object)val).name = "TempSilkBallForAudioExtraction"; Log.Info("临时实例化预制体用于提取音效: " + ((Object)val).name); ((MonoBehaviour)this).StartCoroutine(ExtractAudioAfterFrame(val)); } catch (Exception ex) { Log.Error("提取吸收音效失败:" + ex.Message); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } } [IteratorStateMachine(typeof(d__110))] private IEnumerator ExtractAudioAfterFrame(GameObject tempInstance) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__110(0) { <>4__this = this, tempInstance = tempInstance }; } private void PlayAbsorbAudio() { //IL_00b5: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)absorbAudioClip == (Object)null) { return; } try { HeroController instance = HeroController.instance; if ((Object)(object)instance != (Object)null) { float num = absorbAudioVolume * absorbAudioVolumeMultiplier; float num2 = Random.Range(absorbAudioPitchMin, absorbAudioPitchMax); AudioSource component = ((Component)instance).GetComponent(); if ((Object)(object)component != (Object)null) { component.pitch = num2; component.PlayOneShot(absorbAudioClip, num); Log.Debug($"通过英雄播放吸收音效: {((Object)absorbAudioClip).name}, pitch={num2:F2}"); } else { AudioSource.PlayClipAtPoint(absorbAudioClip, ((Component)Camera.main).transform.position, num); Log.Debug("通过摄像机播放吸收音效: " + ((Object)absorbAudioClip).name); } } } catch (Exception ex) { Log.Error("播放吸收音效失败:" + ex.Message); } } } internal class MemoryBigSilkBallCollisionBox : MonoBehaviour { public MemoryBigSilkBallBehavior? parentBehavior; private CircleCollider2D? circleCollider; private Rigidbody2D? rb; private void Awake() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) rb = ((Component)this).gameObject.AddComponent(); if ((Object)(object)rb != (Object)null) { rb.bodyType = (RigidbodyType2D)1; rb.useFullKinematicContacts = true; rb.gravityScale = 0f; rb.constraints = (RigidbodyConstraints2D)4; Log.Info($"碰撞箱Rigidbody2D已创建 - BodyType: {rb.bodyType}, useFullKinematicContacts: {rb.useFullKinematicContacts}"); } circleCollider = ((Component)this).gameObject.AddComponent(); if ((Object)(object)circleCollider != (Object)null) { circleCollider.radius = 5f; ((Collider2D)circleCollider).isTrigger = true; Log.Info($"碰撞箱CircleCollider2D已创建 - 半径: {circleCollider.radius}, isTrigger: {((Collider2D)circleCollider).isTrigger}"); } Log.Info("碰撞箱组件设置完成 - Layer: " + LayerMask.LayerToName(((Component)this).gameObject.layer)); } private void OnEnable() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) Log.Info($"碰撞箱已激活 - 位置: {((Component)this).transform.position}, Layer: {LayerMask.LayerToName(((Component)this).gameObject.layer)}"); } private void OnTriggerEnter2D(Collider2D other) { if ((Object)(object)parentBehavior == (Object)null) { Log.Warn("[大丝球碰撞箱] parentBehavior为null,无法处理吸收"); return; } SilkBallBehavior silkBallBehavior = ((Component)other).GetComponent(); if ((Object)(object)silkBallBehavior == (Object)null) { silkBallBehavior = ((Component)other).GetComponentInParent(); } if ((Object)(object)silkBallBehavior != (Object)null) { parentBehavior.OnAbsorbBall(silkBallBehavior); } } public void OnCollisionWithSilkBall(SilkBallBehavior silkBall) { if ((Object)(object)parentBehavior == (Object)null) { Log.Warn("[大丝球碰撞箱] parentBehavior为null,无法处理吸收"); return; } Log.Info("[大丝球碰撞箱] 小丝球主动报告碰撞: " + ((Object)((Component)silkBall).gameObject).name); parentBehavior.OnAbsorbBall(silkBall); } public void SetScale(float scale) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.localScale = Vector3.one * scale; } } internal class MemoryFingerBladeBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__65 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PlayMakerFSM fsm; public MemoryFingerBladeBehavior <>4__this; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__65(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)fsm != (Object)null) { fsm.SendEvent("ATTACK"); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__40 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryFingerBladeBehavior <>4__this; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__40(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)<>4__this.controlFSM == (Object)null) { return false; } <>4__this.controlFSM.FsmVariables.Init(); <>4__this.controlFSM.Fsm.InitStates(); <>4__this.controlFSM.Fsm.InitData(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [Header("Finger Blade配置")] public int bladeIndex = -1; public string parentHandName = ""; public MemoryHandControlBehavior? parentHand; [Header("环绕参数")] private FsmFloat? _orbitRadiusVar; private FsmFloat? _orbitSpeedVar; private FsmFloat? _orbitOffsetVar; private FsmFloat? _trackTimeVar; private FsmFloat? _dashRotationOffsetVar; private FsmBool? _specialAttackVar; private FsmVector3? _pinArraySlotTargetVar; private FsmBool? _dashReadyVar; private FsmBool? _ReadyVar; private FsmVector3? _dashOrbitTargetPosVar; private FsmFloat? _dashOrbitTargetRotationVar; private PlayMakerFSM? controlFSM; private PlayMakerFSM? tinkFSM; private Transform? playerTransform; private FWPinManager? _pinManager; private MeshRenderer? _meshRenderer; private FsmEvent? _orbitStartEvent; private FsmEvent? _shootEvent; private FsmEvent? _dashOrbitStartEvent; private FsmEvent? _pinArrayEnterEvent; private FsmEvent? _pinArrayAttackEvent; private FsmState? _shootState; private FsmState? _pinArrayMoveToSlotState; private FsmState? _pinArrayAimState; public void Initialize(int index, string handName, MemoryHandControlBehavior hand) { int num = ((handName == "Hand L") ? index : (index + 3)); bladeIndex = num; parentHandName = handName; parentHand = hand; HeroController val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { playerTransform = val.transform; } InitializeFSMs(); } private void InitializeFSMs() { PlayMakerFSM[] components = ((Component)this).GetComponents(); PlayMakerFSM[] array = components; foreach (PlayMakerFSM val in array) { if (val.FsmName == "Control") { controlFSM = val; } else if (val.FsmName == "Tink") { tinkFSM = val; } } _pinManager = Object.FindFirstObjectByType(); if ((Object)(object)_pinManager == (Object)null) { Log.Warn($"[MemoryFingerBlade {bladeIndex}] 未找到 FWPinManager,Pin 发射功能将不可用"); } if ((Object)(object)controlFSM == (Object)null) { Log.Warn($"Finger Blade {bladeIndex} ({((Object)((Component)this).gameObject).name}) 未找到Control FSM"); } _meshRenderer = ((Component)this).GetComponent(); if ((Object)(object)_meshRenderer == (Object)null) { Log.Warn($"Finger Blade {bladeIndex} ({((Object)((Component)this).gameObject).name}) 未找到 MeshRenderer,无法控制显示层级"); } AddDynamicVariables(); EnsureDashOrbitVariables(); RegisterFingerBladeEvents(); AddCustomStompStates(); AddCustomSwipeStates(); ModifyAnticPullState(); ModifyAnticPauseState(); ModifyShootState(); ModifyThunkState(); InitializePinArraySpecialStates(); AddOrbitGlobalTransition(); AddDashOrbitGlobalTransition(); RelinkFingerBladeEventReferences(); } private void InitializePinArraySpecialStates() { if (!((Object)(object)controlFSM == (Object)null)) { EnsurePinArrayVariables(); RegisterPinArrayEvents(); CreatePinArraySpecialStates(); AddPinArrayGlobalTransition(); } } private void EnsurePinArrayVariables() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown if (!((Object)(object)controlFSM == (Object)null)) { FsmVariables fsmVariables = controlFSM.FsmVariables; List list = fsmVariables.Vector3Variables.ToList(); _pinArraySlotTargetVar = ((IEnumerable)list).FirstOrDefault((Func)((FsmVector3 v) => ((NamedVariable)v).Name == "PinArray Slot Target")); if (_pinArraySlotTargetVar == null) { _pinArraySlotTargetVar = new FsmVector3("PinArray Slot Target") { Value = Vector3.zero }; list.Add(_pinArraySlotTargetVar); fsmVariables.Vector3Variables = list.ToArray(); fsmVariables.Init(); } } } private void RegisterPinArrayEvents() { if (!((Object)(object)controlFSM == (Object)null)) { _pinArrayEnterEvent = FsmEvent.GetFsmEvent("PINARRAY_ENTER"); _pinArrayAttackEvent = FsmEvent.GetFsmEvent("PINARRAY_ATTACK"); List list = controlFSM.Fsm.Events.ToList(); if (!list.Contains(_pinArrayEnterEvent)) { list.Add(_pinArrayEnterEvent); } if (!list.Contains(_pinArrayAttackEvent)) { list.Add(_pinArrayAttackEvent); } controlFSM.Fsm.Events = list.ToArray(); } } private void CreatePinArraySpecialStates() { if (!((Object)(object)controlFSM == (Object)null)) { _pinArrayMoveToSlotState = FsmStateBuilder.GetOrCreateState(controlFSM, "PinArray MoveToSlot", $"Finger Blade {bladeIndex} PinArray MoveToSlot"); _pinArrayAimState = FsmStateBuilder.GetOrCreateState(controlFSM, "PinArray Aim", $"Finger Blade {bladeIndex} PinArray Aim"); AddPinArrayMoveToSlotActions(_pinArrayMoveToSlotState); AddPinArrayAimActions(_pinArrayAimState); FsmStateBuilder.SetFinishedTransition(_pinArrayMoveToSlotState, _pinArrayAimState); FsmState val = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Antic Pull")); if (val != null && _pinArrayAttackEvent != null) { _pinArrayAimState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(_pinArrayAttackEvent, val) }; } } } private void AddPinArrayMoveToSlotActions(FsmState state) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Expected O, but got Unknown //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Expected O, but got Unknown //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Expected O, but got Unknown if (!((Object)(object)controlFSM == (Object)null)) { SetVelocity2d val = new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = new FsmVector2 { Value = Vector2.zero, UseVariable = false }, x = new FsmFloat { Value = 0f, UseVariable = false }, y = new FsmFloat { Value = 0f, UseVariable = false }, everyFrame = false }; AnimatePositionTo val2 = new AnimatePositionTo { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, toValue = _pinArraySlotTargetVar, localSpace = false, time = new FsmFloat(FsmFloat.op_Implicit(0.6f)), speed = new FsmFloat(FsmFloat.op_Implicit(10f)), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), easeType = (EaseType)21, reverse = new FsmBool(FsmBool.op_Implicit(false)), realTime = false }; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.4f)), finishEvent = FsmEvent.Finished }; state.Actions = (FsmStateAction[])(object)new FsmStateAction[3] { (FsmStateAction)val, (FsmStateAction)val2, (FsmStateAction)val3 }; } } private void AddPinArrayAimActions(FsmState state) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = FsmObject.op_Implicit((Object)(object)this); val.methodName = FsmString.op_Implicit("UpdatePinArrayAim"); val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = true; CallMethod val2 = val; state.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)val2 }; } private void AddPinArrayGlobalTransition() { if (!((Object)(object)controlFSM == (Object)null) && _pinArrayEnterEvent != null && _pinArrayMoveToSlotState != null) { List list = controlFSM.Fsm.GlobalTransitions.ToList(); if (!list.Any((FsmTransition t) => t.FsmEvent == _pinArrayEnterEvent && (t.toState == _pinArrayMoveToSlotState.Name || t.toFsmState == _pinArrayMoveToSlotState))) { list.Add(FsmStateBuilder.CreateTransition(_pinArrayEnterEvent, _pinArrayMoveToSlotState)); controlFSM.Fsm.GlobalTransitions = list.ToArray(); } } } public void UpdatePinArrayAim() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)controlFSM == (Object)null) { return; } Vector3 position = ((Component)this).transform.position; Vector3 val = (((Object)(object)playerTransform != (Object)null) ? playerTransform.position : position); Vector3 val2 = val - position; if (!(((Vector3)(ref val2)).sqrMagnitude < 0.0001f)) { ((Vector3)(ref val2)).Normalize(); float num = Mathf.Atan2(val2.y, val2.x) * 57.29578f - 3f; FsmFloat fsmFloat = controlFSM.FsmVariables.GetFsmFloat("Attack Rotation"); if (fsmFloat != null) { fsmFloat.Value = num; } FsmFloat fsmFloat2 = controlFSM.FsmVariables.GetFsmFloat("Attack Angle"); if (fsmFloat2 != null) { fsmFloat2.Value = num; } ((Component)this).transform.rotation = Quaternion.Euler(0f, 0f, num + 180f); } } public void AddDynamicVariables() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown if (!((Object)(object)controlFSM == (Object)null)) { List list = controlFSM.FsmVariables.FloatVariables.ToList(); _orbitRadiusVar = new FsmFloat("OrbitRadius") { Value = 7f }; list.Add(_orbitRadiusVar); _orbitSpeedVar = new FsmFloat("OrbitSpeed") { Value = 200f }; list.Add(_orbitSpeedVar); _orbitOffsetVar = new FsmFloat("OrbitOffset") { Value = 0f }; list.Add(_orbitOffsetVar); _dashRotationOffsetVar = new FsmFloat("Dash Rotation Offset") { Value = 45f }; list.Add(_dashRotationOffsetVar); controlFSM.FsmVariables.FloatVariables = list.ToArray(); _ReadyVar = controlFSM.FsmVariables.FindFsmBool("Ready"); } } private void RegisterFingerBladeEvents() { if (!((Object)(object)controlFSM == (Object)null)) { _orbitStartEvent = FsmEvent.GetFsmEvent($"ORBIT START {parentHandName} Blade {bladeIndex}"); _shootEvent = FsmEvent.GetFsmEvent($"SHOOT {parentHandName} Blade {bladeIndex}"); _dashOrbitStartEvent = FsmEvent.GetFsmEvent($"DASH ORBIT START {parentHandName} Blade {bladeIndex}"); List list = controlFSM.Fsm.Events.ToList(); list.Add(_orbitStartEvent); list.Add(_shootEvent); list.Add(_dashOrbitStartEvent); controlFSM.Fsm.Events = list.ToArray(); } } private void RelinkFingerBladeEventReferences() { ((MonoBehaviour)this).StartCoroutine(MyCoroutine()); } [IteratorStateMachine(typeof(d__40))] private IEnumerator MyCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__40(0) { <>4__this = this }; } public void AddOrbitGlobalTransition() { if ((Object)(object)controlFSM == (Object)null) { return; } FsmState val = CreateOrbitStartState(); if (val == null) { Log.Error($"Finger Blade {bladeIndex} ({((Object)((Component)this).gameObject).name}) 创建Orbit Start状态失败"); return; } FsmState val2 = CreateOrbitPrepareState(); if (val2 == null) { Log.Error($"Finger Blade {bladeIndex} ({((Object)((Component)this).gameObject).name}) 创建Orbit Prepare状态失败"); return; } FsmState val3 = CreateOrbitShootState(); if (val3 == null) { Log.Error($"Finger Blade {bladeIndex} ({((Object)((Component)this).gameObject).name}) 创建Orbit Shoot状态失败"); return; } AddOrbitStartActions(val); AddOrbitPrepareActions(val2); AddOrbitShootActions(val3); val.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(_shootEvent, val2) }; FsmStateBuilder.SetFinishedTransition(val2, val3); FsmState val4 = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Shoot")); if (val4 != null) { FsmStateBuilder.SetFinishedTransition(val3, val4); } FsmTransition item = FsmStateBuilder.CreateTransition(_orbitStartEvent, val); List list = controlFSM.Fsm.GlobalTransitions.ToList(); list.Add(item); controlFSM.Fsm.GlobalTransitions = list.ToArray(); } public void AddDashOrbitGlobalTransition() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Expected O, but got Unknown //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Expected O, but got Unknown //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Expected O, but got Unknown //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Expected O, but got Unknown //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Expected O, but got Unknown //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Expected O, but got Unknown //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Expected O, but got Unknown //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Expected O, but got Unknown //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Expected O, but got Unknown //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Expected O, but got Unknown //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Expected O, but got Unknown //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Expected O, but got Unknown //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Expected O, but got Unknown //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Expected O, but got Unknown //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Expected O, but got Unknown //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Expected O, but got Unknown //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Expected O, but got Unknown //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Expected O, but got Unknown //IL_0332: Expected O, but got Unknown //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Expected O, but got Unknown if (!((Object)(object)controlFSM == (Object)null) && _dashOrbitStartEvent != null && _shootEvent != null) { FsmState orCreateState = FsmStateBuilder.GetOrCreateState(controlFSM, "Dash Orbit MoveToPose"); FsmState orCreateState2 = FsmStateBuilder.GetOrCreateState(controlFSM, "Dash Orbit"); FsmStateAction[] obj = new FsmStateAction[4] { (FsmStateAction)new SetBoolValue { boolVariable = _dashReadyVar, boolValue = new FsmBool(FsmBool.op_Implicit(false)), everyFrame = false }, default(FsmStateAction), default(FsmStateAction), default(FsmStateAction) }; CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("CalcDashOrbitTargetPos") { Value = "CalcDashOrbitTargetPos" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; obj[1] = (FsmStateAction)val; obj[2] = (FsmStateAction)new AnimatePositionTo { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, toValue = _dashOrbitTargetPosVar, localSpace = false, time = new FsmFloat(FsmFloat.op_Implicit(0.6f)), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), speed = new FsmFloat { UseVariable = true }, easeType = (EaseType)21, reverse = new FsmBool(FsmBool.op_Implicit(false)), realTime = false, finishEvent = FsmEvent.Finished }; obj[3] = (FsmStateAction)new AnimateRotationTo { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fromValue = new FsmFloat { UseVariable = true }, toValue = _dashOrbitTargetRotationVar, worldSpace = false, negativeSpace = false, time = new FsmFloat(FsmFloat.op_Implicit(0.6f)), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), speed = new FsmFloat { UseVariable = true }, easeType = (EaseType)21, reverse = new FsmBool(FsmBool.op_Implicit(false)), realTime = false }; orCreateState.Actions = (FsmStateAction[])(object)obj; FsmStateBuilder.SetFinishedTransition(orCreateState, orCreateState2); GameObject value = GameObject.Find("Silk Boss"); FsmGameObject fsmGameObject = controlFSM.FsmVariables.GetFsmGameObject("Damager"); orCreateState2.Actions = (FsmStateAction[])(object)new FsmStateAction[5] { (FsmStateAction)new SetBoolValue { boolVariable = _dashReadyVar, boolValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }, (FsmStateAction)new SetBoolValue { boolVariable = _ReadyVar, boolValue = new FsmBool(FsmBool.op_Implicit(false)), everyFrame = false }, (FsmStateAction)new SetLayer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = fsmGameObject }, layer = LayerMask.NameToLayer("Enemy Attack") }, (FsmStateAction)new ActivateGameObjectDelay { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = fsmGameObject }, activate = new FsmBool(FsmBool.op_Implicit(true)), resetOnExit = true, delay = new FsmFloat(FsmFloat.op_Implicit(0.4f)) }, new OrbitAroundTargetAction { targetGameObject = new FsmGameObject { Value = value }, orbitRadius = (_orbitRadiusVar ?? controlFSM.FsmVariables.GetFsmFloat("OrbitRadius")), orbitSpeed = (_orbitSpeedVar ?? controlFSM.FsmVariables.GetFsmFloat("OrbitSpeed")), orbitAngleOffset = (_orbitOffsetVar ?? controlFSM.FsmVariables.GetFsmFloat("OrbitOffset")), followTarget = FsmBool.op_Implicit(true), positionLerpSpeed = FsmFloat.op_Implicit(30f), rotateToFaceCenter = FsmBool.op_Implicit(true), pointOutward = FsmBool.op_Implicit(false), rotationOffset = FsmFloat.op_Implicit(45f), applyDirectionalRotationOffset = FsmBool.op_Implicit(true), directionalRotationOffset = FsmFloat.op_Implicit(8f), rotationLerpSpeed = FsmFloat.op_Implicit(30f), zeroVelocityOnEnter = FsmBool.op_Implicit(true), zeroVelocityOnExit = FsmBool.op_Implicit(true) } }; FsmState val2 = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Antic Pull")); if (val2 != null) { orCreateState2.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(_shootEvent, val2) }; } List list = controlFSM.Fsm.GlobalTransitions.ToList(); list.Add(FsmStateBuilder.CreateTransition(_dashOrbitStartEvent, orCreateState)); controlFSM.Fsm.GlobalTransitions = list.ToArray(); } } private void EnsureDashOrbitVariables() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Expected O, but got Unknown if (!((Object)(object)controlFSM == (Object)null)) { FsmVariables fsmVariables = controlFSM.FsmVariables; List list = fsmVariables.BoolVariables.ToList(); _dashReadyVar = ((IEnumerable)list).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == "Dash Ready")); if (_dashReadyVar == null) { _dashReadyVar = new FsmBool("Dash Ready") { Value = false }; list.Add(_dashReadyVar); fsmVariables.BoolVariables = list.ToArray(); fsmVariables.Init(); } List list2 = fsmVariables.Vector3Variables.ToList(); _dashOrbitTargetPosVar = ((IEnumerable)list2).FirstOrDefault((Func)((FsmVector3 v) => ((NamedVariable)v).Name == "DashOrbit Target Pos")); if (_dashOrbitTargetPosVar == null) { _dashOrbitTargetPosVar = new FsmVector3("DashOrbit Target Pos") { Value = Vector3.zero }; list2.Add(_dashOrbitTargetPosVar); fsmVariables.Vector3Variables = list2.ToArray(); fsmVariables.Init(); } List list3 = fsmVariables.FloatVariables.ToList(); _dashOrbitTargetRotationVar = ((IEnumerable)list3).FirstOrDefault((Func)((FsmFloat v) => ((NamedVariable)v).Name == "DashOrbit Target Rotation")); if (_dashOrbitTargetRotationVar == null) { _dashOrbitTargetRotationVar = new FsmFloat("DashOrbit Target Rotation") { Value = 0f }; list3.Add(_dashOrbitTargetRotationVar); fsmVariables.FloatVariables = list3.ToArray(); fsmVariables.Init(); } } } public void CalcDashOrbitTargetPos() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)controlFSM == (Object)null || _dashOrbitTargetPosVar == null || _dashOrbitTargetRotationVar == null) { return; } GameObject val = GameObject.Find("Silk Boss"); Vector3 val2 = (((Object)(object)val != (Object)null) ? val.transform.position : ((Component)this).transform.position); if ((Object)(object)val != (Object)null) { PlayMakerFSM val3 = FSMUtility.LocateMyFSM(val, "Attack Control"); if ((Object)(object)val3 != (Object)null) { FsmFloat fsmFloat = val3.FsmVariables.GetFsmFloat("Antic X"); if (fsmFloat != null) { val2.x = fsmFloat.Value; } } val2.y = 140f; } FsmFloat? obj = _orbitRadiusVar ?? controlFSM.FsmVariables.GetFsmFloat("OrbitRadius"); float num = ((obj != null) ? obj.Value : 5f); FsmFloat? obj2 = _orbitOffsetVar ?? controlFSM.FsmVariables.GetFsmFloat("OrbitOffset"); float num2 = ((obj2 != null) ? obj2.Value : 0f); float num3 = num2 * (MathF.PI / 180f); _dashOrbitTargetPosVar.Value = new Vector3(val2.x + Mathf.Cos(num3) * num, val2.y + Mathf.Sin(num3) * num, val2.z); _dashOrbitTargetRotationVar.Value = num2 + 180f; } private FsmState? CreateOrbitStartState() { if ((Object)(object)controlFSM == (Object)null) { return null; } FsmState val = FsmStateBuilder.CreateState(controlFSM.Fsm, "Orbit Start", $"Finger Blade {bladeIndex} 环绕开始状态"); FsmStateBuilder.AddStateToFsm(controlFSM, val); return val; } private FsmState? CreateOrbitPrepareState() { if ((Object)(object)controlFSM == (Object)null) { return null; } FsmState val = FsmStateBuilder.CreateState(controlFSM.Fsm, "Orbit Prepare", $"Finger Blade {bladeIndex} 环绕准备状态"); FsmStateBuilder.AddStateToFsm(controlFSM, val); return val; } private FsmState? CreateOrbitShootState() { if ((Object)(object)controlFSM == (Object)null) { return null; } FsmState val = FsmStateBuilder.CreateState(controlFSM.Fsm, "Orbit Shoot", $"Finger Blade {bladeIndex} 环绕发射状态"); FsmStateBuilder.AddStateToFsm(controlFSM, val); return val; } private void AddOrbitStartActions(FsmState orbitStartState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Expected O, but got Unknown //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("UpdateRenderOrder") { Value = "UpdateRenderOrder" }; val.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar(typeof(bool)) { boolValue = true } }; val.everyFrame = false; CallMethod val2 = val; OrbitAroundTargetAction orbitAroundTargetAction = new OrbitAroundTargetAction { orbitRadius = (_orbitRadiusVar ?? controlFSM.FsmVariables.GetFsmFloat("OrbitRadius")), orbitSpeed = (_orbitSpeedVar ?? controlFSM.FsmVariables.GetFsmFloat("OrbitSpeed")), orbitAngleOffset = (_orbitOffsetVar ?? controlFSM.FsmVariables.GetFsmFloat("OrbitOffset")), followTarget = FsmBool.op_Implicit(true), positionLerpSpeed = FsmFloat.op_Implicit(30f), rotateToFaceCenter = FsmBool.op_Implicit(true), pointOutward = FsmBool.op_Implicit(true), rotationOffset = FsmFloat.op_Implicit(0f), applyDirectionalRotationOffset = FsmBool.op_Implicit(true), directionalRotationOffset = FsmFloat.op_Implicit(8f), rotationLerpSpeed = FsmFloat.op_Implicit(30f), zeroVelocityOnEnter = FsmBool.op_Implicit(true), zeroVelocityOnExit = FsmBool.op_Implicit(true) }; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(19f)), finishEvent = _shootEvent }; orbitStartState.Actions = (FsmStateAction[])(object)new FsmStateAction[3] { (FsmStateAction)val2, orbitAroundTargetAction, (FsmStateAction)val3 }; } private void AddOrbitPrepareActions(FsmState orbitPrepareState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Expected O, but got Unknown //IL_0169: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Expected O, but got Unknown //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Expected O, but got Unknown //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Expected O, but got Unknown //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StopOrbitImmediately") { Value = "StopOrbitImmediately" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; CallMethod val2 = val; SetVelocity2d val3 = new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = new FsmVector2 { Value = Vector2.zero, UseVariable = false }, x = new FsmFloat { Value = 0f, UseVariable = false }, y = new FsmFloat { Value = 0f, UseVariable = false }, everyFrame = false }; val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SetAttackParameters") { Value = "SetAttackParameters" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; CallMethod val4 = val; ActivateGameObject val5 = new ActivateGameObject(); FsmOwnerDefault val6 = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1 }; FsmGameObject val7 = new FsmGameObject(); Transform obj = ((Component)this).gameObject.transform.Find("silk_boss_finger_antic"); val7.Value = ((obj != null) ? ((Component)obj).gameObject : null); val6.gameObject = val7; val5.gameObject = val6; val5.activate = new FsmBool(FsmBool.op_Implicit(true)); val5.recursive = new FsmBool(FsmBool.op_Implicit(false)); val5.resetOnExit = true; ActivateGameObject val8 = val5; Wait val9 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.2f)), finishEvent = FsmEvent.Finished }; orbitPrepareState.Actions = (FsmStateAction[])(object)new FsmStateAction[5] { (FsmStateAction)val2, (FsmStateAction)val3, (FsmStateAction)val4, (FsmStateAction)val8, (FsmStateAction)val9 }; } private void AddOrbitShootActions(FsmState orbitShootState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_001c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown //IL_00fb: Expected O, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Expected O, but got Unknown //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Expected O, but got Unknown //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Expected O, but got Unknown //IL_0160: Expected O, but got Unknown //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Expected O, but got Unknown //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Expected O, but got Unknown //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Expected O, but got Unknown SetGravity2dScale val = new SetGravity2dScale { gravityScale = new FsmFloat(FsmFloat.op_Implicit(0f)) }; SetVelocity2d val2 = new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = new FsmVector2 { Value = Vector2.zero, UseVariable = false }, x = new FsmFloat { Value = 0f, UseVariable = false }, y = new FsmFloat { Value = 0f, UseVariable = false }, everyFrame = false }; FsmGameObject fsmGameObject = controlFSM.FsmVariables.GetFsmGameObject("Damager"); FsmGameObject fsmGameObject2 = controlFSM.FsmVariables.GetFsmGameObject("Phys Collider"); ActivateGameObjectDelay val3 = new ActivateGameObjectDelay { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((fsmGameObject != null) ? fsmGameObject.Value : null) } }, activate = new FsmBool(FsmBool.op_Implicit(true)), delay = new FsmFloat(FsmFloat.op_Implicit(0.1f)), resetOnExit = true }; ActivateGameObject val4 = new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((fsmGameObject2 != null) ? fsmGameObject2.Value : null) } }, activate = new FsmBool(FsmBool.op_Implicit(true)), recursive = new FsmBool(FsmBool.op_Implicit(false)), resetOnExit = true }; Wait val5 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished }; orbitShootState.Actions = (FsmStateAction[])(object)new FsmStateAction[5] { (FsmStateAction)val, (FsmStateAction)val2, (FsmStateAction)val3, (FsmStateAction)val4, (FsmStateAction)val5 }; } public void SetAttackParameters() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)controlFSM == (Object)null)) { Vector3 position = ((Component)this).transform.position; Vector3 val = (((Object)(object)playerTransform != (Object)null) ? playerTransform.position : Vector3.zero); Vector3 val2 = val - position; Vector3 normalized = ((Vector3)(ref val2)).normalized; float value = Mathf.Atan2(normalized.y, normalized.x) * 57.29578f - 3f; FsmFloat fsmFloat = controlFSM.FsmVariables.GetFsmFloat("Attack Rotation"); if (fsmFloat != null) { fsmFloat.Value = value; } else { Log.Warn("未找到Attack Rotation变量"); } FsmFloat fsmFloat2 = controlFSM.FsmVariables.GetFsmFloat("Attack Angle"); if (fsmFloat2 != null) { fsmFloat2.Value = value; } else { Log.Warn("未找到Attack Angle变量"); } FsmFloat fsmFloat3 = controlFSM.FsmVariables.GetFsmFloat("Attack Y Scale"); if (fsmFloat3 != null) { fsmFloat3.Value = 1f; } else { Log.Warn("未找到Attack Y Scale变量"); } FsmFloat fsmFloat4 = controlFSM.FsmVariables.GetFsmFloat("Travel Time Multiplier"); if (fsmFloat4 != null) { fsmFloat4.Value = 0.02f; } else { Log.Warn("未找到Travel Time Multiplier变量"); } FsmFloat fsmFloat5 = controlFSM.FsmVariables.GetFsmFloat("Wait Min"); if (fsmFloat5 != null) { fsmFloat5.Value = 0f; } else { Log.Warn("未找到Wait Min变量"); } FsmFloat fsmFloat6 = controlFSM.FsmVariables.GetFsmFloat("Wait Max"); if (fsmFloat6 != null) { fsmFloat6.Value = 0f; } else { Log.Warn("未找到Wait Max变量"); } FsmBool fsmBool = controlFSM.FsmVariables.GetFsmBool("Quick Recover"); if (fsmBool != null) { fsmBool.Value = false; } else { Log.Warn("未找到Quick Recover变量"); } FsmFloat fsmFloat7 = controlFSM.FsmVariables.GetFsmFloat("Thunk Time"); if (fsmFloat7 != null) { fsmFloat7.Value = Random.Range(0.75f, 0.9f); } else { Log.Warn("未找到Thunk Time变量"); } FsmBool fsmBool2 = controlFSM.FsmVariables.GetFsmBool("Ready"); if (fsmBool2 != null) { fsmBool2.Value = false; } else { Log.Warn("未找到Ready变量"); } } } public void AddCustomStompStates() { if (!((Object)(object)controlFSM == (Object)null)) { CreateStompState("CUSTOM_STOMP_CENTER", "Custom Stomp Center Prepare", 90f, 1f, trackX: true, trackY: false); CreateStompState("CUSTOM_STOMP_LEFT", "Custom Stomp Left Prepare", 120f, 1f, trackX: false, trackY: false); CreateStompState("CUSTOM_STOMP_RIGHT", "Custom Stomp Right Prepare", 60f, 1f, trackX: false, trackY: false); } } private void CreateStompState(string eventName, string paramsStateName, float rotation, float yScale, bool trackX, bool trackY) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Expected O, but got Unknown //IL_014f: Expected O, but got Unknown //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Expected O, but got Unknown //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Expected O, but got Unknown //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Expected O, but got Unknown //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Expected O, but got Unknown //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Expected O, but got Unknown //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Expected O, but got Unknown //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Expected O, but got Unknown //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Expected O, but got Unknown //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Expected O, but got Unknown //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Expected O, but got Unknown //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Expected O, but got Unknown if (!((Object)(object)controlFSM == (Object)null)) { FsmEvent fsmEvent = FsmEvent.GetFsmEvent(eventName); List list = controlFSM.Fsm.Events.ToList(); if (!list.Contains(fsmEvent)) { list.Add(fsmEvent); controlFSM.Fsm.Events = list.ToArray(); } FsmState val = FsmStateBuilder.CreateState(controlFSM.Fsm, paramsStateName); List list2 = new List(); FsmFloat fsmFloat = controlFSM.FsmVariables.GetFsmFloat("Attack Rotation"); SetFloatValue item = new SetFloatValue { floatVariable = fsmFloat, floatValue = new FsmFloat(FsmFloat.op_Implicit(rotation)), everyFrame = false }; list2.Add((FsmStateAction)(object)item); FsmFloat fsmFloat2 = controlFSM.FsmVariables.GetFsmFloat("Ground Y"); FsmFloat fsmFloat3 = controlFSM.FsmVariables.GetFsmFloat("Attack Y"); SetFloatValue item2 = new SetFloatValue { floatVariable = fsmFloat3, floatValue = fsmFloat2, everyFrame = false }; FloatAddRandom item3 = new FloatAddRandom { floatVariable = fsmFloat3, addMin = new FsmFloat(FsmFloat.op_Implicit(11f)), addMax = new FsmFloat(FsmFloat.op_Implicit(12f)) }; list2.Add((FsmStateAction)(object)item2); list2.Add((FsmStateAction)(object)item3); FsmFloat fsmFloat4 = controlFSM.FsmVariables.GetFsmFloat("Attack Y Scale"); SetFloatValue item4 = new SetFloatValue { floatVariable = fsmFloat4, floatValue = new FsmFloat(FsmFloat.op_Implicit(yScale)), everyFrame = false }; list2.Add((FsmStateAction)(object)item4); FsmFloat fsmFloat5 = controlFSM.FsmVariables.GetFsmFloat("Wait Min"); FsmFloat fsmFloat6 = controlFSM.FsmVariables.GetFsmFloat("Wait Max"); SetFloatValue item5 = new SetFloatValue { floatVariable = fsmFloat5, floatValue = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }; SetFloatValue item6 = new SetFloatValue { floatVariable = fsmFloat6, floatValue = new FsmFloat(FsmFloat.op_Implicit(0.2f)), everyFrame = false }; list2.Add((FsmStateAction)(object)item5); list2.Add((FsmStateAction)(object)item6); FsmBool fsmBool = controlFSM.FsmVariables.GetFsmBool("Quick Recover"); SetBoolValue item7 = new SetBoolValue { boolVariable = fsmBool, boolValue = new FsmBool(FsmBool.op_Implicit(false)), everyFrame = false }; list2.Add((FsmStateAction)(object)item7); FsmFloat fsmFloat7 = controlFSM.FsmVariables.GetFsmFloat("X Target Min"); FsmFloat fsmFloat8 = controlFSM.FsmVariables.GetFsmFloat("X Target Max"); SetFloatValue item8 = new SetFloatValue { floatVariable = fsmFloat7, floatValue = new FsmFloat(FsmFloat.op_Implicit(20f)), everyFrame = false }; SetFloatValue item9 = new SetFloatValue { floatVariable = fsmFloat8, floatValue = new FsmFloat(FsmFloat.op_Implicit(57f)), everyFrame = false }; list2.Add((FsmStateAction)(object)item8); list2.Add((FsmStateAction)(object)item9); val.Actions = list2.ToArray(); FsmState val2 = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Attack Start Pause")); if (val2 != null) { FsmStateBuilder.SetFinishedTransition(val, val2); } FsmStateBuilder.AddStateToFsm(controlFSM, val); List list3 = controlFSM.FsmGlobalTransitions.ToList(); list3.Add(FsmStateBuilder.CreateTransition(fsmEvent, val)); controlFSM.Fsm.GlobalTransitions = list3.ToArray(); } } public void AddCustomSwipeStates() { if (!((Object)(object)controlFSM == (Object)null)) { CreateSwipeState("CUSTOM_SWIPE_L", "Custom Swipe L Prepare", 0f, -1f, 23f, 55f); CreateSwipeState("CUSTOM_SWIPE_R", "Custom Swipe R Prepare", 180f, 1f, 23f, 55f); } } private void CreateSwipeState(string eventName, string paramsStateName, float rotation, float yScale, float xMin, float xMax) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Expected O, but got Unknown //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Expected O, but got Unknown //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Expected O, but got Unknown //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Expected O, but got Unknown //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Expected O, but got Unknown //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Expected O, but got Unknown //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Expected O, but got Unknown //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Expected O, but got Unknown if (!((Object)(object)controlFSM == (Object)null)) { FsmEvent fsmEvent = FsmEvent.GetFsmEvent(eventName); List list = controlFSM.Fsm.Events.ToList(); if (!list.Contains(fsmEvent)) { list.Add(fsmEvent); controlFSM.Fsm.Events = list.ToArray(); } FsmState val = FsmStateBuilder.CreateState(controlFSM.Fsm, paramsStateName); List list2 = new List(); FsmFloat fsmFloat = controlFSM.FsmVariables.GetFsmFloat("Attack Rotation"); SetFloatValue item = new SetFloatValue { floatVariable = fsmFloat, floatValue = new FsmFloat(FsmFloat.op_Implicit(rotation)), everyFrame = false }; list2.Add((FsmStateAction)(object)item); FsmFloat fsmFloat2 = controlFSM.FsmVariables.GetFsmFloat("Attack Y Scale"); SetFloatValue item2 = new SetFloatValue { floatVariable = fsmFloat2, floatValue = new FsmFloat(FsmFloat.op_Implicit(yScale)), everyFrame = false }; list2.Add((FsmStateAction)(object)item2); FsmFloat fsmFloat3 = controlFSM.FsmVariables.GetFsmFloat("Wait Min"); FsmFloat fsmFloat4 = controlFSM.FsmVariables.GetFsmFloat("Wait Max"); SetFloatValue item3 = new SetFloatValue { floatVariable = fsmFloat3, floatValue = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }; SetFloatValue item4 = new SetFloatValue { floatVariable = fsmFloat4, floatValue = new FsmFloat(FsmFloat.op_Implicit(0.2f)), everyFrame = false }; list2.Add((FsmStateAction)(object)item3); list2.Add((FsmStateAction)(object)item4); FsmBool fsmBool = controlFSM.FsmVariables.GetFsmBool("Quick Recover"); SetBoolValue item5 = new SetBoolValue { boolVariable = fsmBool, boolValue = new FsmBool(FsmBool.op_Implicit(false)), everyFrame = false }; list2.Add((FsmStateAction)(object)item5); FsmFloat fsmFloat5 = controlFSM.FsmVariables.GetFsmFloat("X Target Min"); FsmFloat fsmFloat6 = controlFSM.FsmVariables.GetFsmFloat("X Target Max"); SetFloatValue item6 = new SetFloatValue { floatVariable = fsmFloat5, floatValue = new FsmFloat(FsmFloat.op_Implicit(xMin)), everyFrame = false }; SetFloatValue item7 = new SetFloatValue { floatVariable = fsmFloat6, floatValue = new FsmFloat(FsmFloat.op_Implicit(xMax)), everyFrame = false }; list2.Add((FsmStateAction)(object)item6); list2.Add((FsmStateAction)(object)item7); val.Actions = list2.ToArray(); FsmState val2 = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Attack Start Pause")); if (val2 != null) { FsmStateBuilder.SetFinishedTransition(val, val2); } FsmStateBuilder.AddStateToFsm(controlFSM, val); List list3 = controlFSM.FsmGlobalTransitions.ToList(); list3.Add(FsmStateBuilder.CreateTransition(fsmEvent, val)); controlFSM.Fsm.GlobalTransitions = list3.ToArray(); } } public void StopOrbitImmediately() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)this).gameObject != (Object)null) { Rigidbody2D component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.linearVelocity = Vector2.zero; component.angularVelocity = 0f; } } } public void CheckAndSendPhase2SwipeEvent() { if ((Object)(object)controlFSM == (Object)null) { return; } FsmFloat fsmFloat = controlFSM.FsmVariables.GetFsmFloat("Attack Rotation"); FsmBool fsmBool = controlFSM.FsmVariables.GetFsmBool("Special Attack"); if (fsmFloat != null && fsmBool != null) { float value = fsmFloat.Value; bool value2 = fsmBool.Value; bool flag = Mathf.Abs(value) < 2f || Mathf.Abs(value - 180f) < 2f; if (flag && value2) { controlFSM.SendEvent("IS_PHASE2_SWIPE"); } } } private void ModifyAnticPullState() { //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown if ((Object)(object)controlFSM == (Object)null) { return; } FsmState val = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Antic Pull")); if (val == null) { Log.Warn($"Finger Blade {bladeIndex} 未找到 Antic Pull 状态"); return; } List list = val.Actions.ToList(); int num = 0; int num2 = 0; for (int i = 0; i < list.Count; i++) { FsmStateAction obj = list[i]; Wait val2 = (Wait)(object)((obj is Wait) ? obj : null); if (val2 != null) { num++; if (num == 1) { val2.time = new FsmFloat(FsmFloat.op_Implicit(0.48f)); } continue; } FsmStateAction obj2 = list[i]; WaitBool val3 = (WaitBool)(object)((obj2 is WaitBool) ? obj2 : null); if (val3 != null) { num2++; if (num2 == 1) { val3.time = new FsmFloat(FsmFloat.op_Implicit(0.36f)); } } } list.Insert(0, (FsmStateAction)new WaitBool { boolTest = controlFSM.FsmVariables.GetFsmBool("Special Attack"), time = new FsmFloat(FsmFloat.op_Implicit(0.25f)), finishEvent = FsmEvent.Finished, realTime = false }); val.Actions = list.ToArray(); } private void ModifyAnticPauseState() { //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown if ((Object)(object)controlFSM == (Object)null) { return; } FsmState val = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Antic Pause")); if (val == null) { Log.Warn($"Finger Blade {bladeIndex} 未找到 Antic Pause 状态"); return; } List list = controlFSM.FsmVariables.BoolVariables.ToList(); _specialAttackVar = ((IEnumerable)list).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == "Special Attack")); if (_specialAttackVar == null) { _specialAttackVar = new FsmBool("Special Attack") { Value = false }; list.Add(_specialAttackVar); controlFSM.FsmVariables.BoolVariables = list.ToArray(); } List list2 = controlFSM.FsmVariables.FloatVariables.ToList(); _trackTimeVar = ((IEnumerable)list2).FirstOrDefault((Func)((FsmFloat v) => ((NamedVariable)v).Name == "Track Time")); if (_trackTimeVar == null) { _trackTimeVar = new FsmFloat("Track Time") { Value = 1f }; list2.Add(_trackTimeVar); controlFSM.FsmVariables.FloatVariables = list2.ToArray(); } CreatePhase2TrackState(); } private void CreatePhase2TrackState() { //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Expected O, but got Unknown if (!((Object)(object)controlFSM == (Object)null)) { FsmState val = FsmStateBuilder.CreateState(controlFSM.Fsm, "Phase2 Track"); List list = new List(); SoftLockTrackAction item = new SoftLockTrackAction { followX = FsmBool.op_Implicit(false), followY = FsmBool.op_Implicit(true), followZ = FsmBool.op_Implicit(false), maintainInitialOffset = FsmBool.op_Implicit(true), positionLerpSpeed = FsmFloat.op_Implicit(3f), useRigidbody = FsmBool.op_Implicit(true), useMinY = FsmBool.op_Implicit(true), minY = FsmFloat.op_Implicit(132f), rotationZ = controlFSM.FsmVariables.GetFsmFloat("Attack Rotation"), rotationLerpSpeed = FsmFloat.op_Implicit(20f), zeroVelocityOnEnter = FsmBool.op_Implicit(true), zeroVelocityOnExit = FsmBool.op_Implicit(true) }; list.Add((FsmStateAction)(object)item); Wait item2 = new Wait { time = _trackTimeVar, finishEvent = FsmEvent.Finished }; list.Add((FsmStateAction)(object)item2); val.Actions = list.ToArray(); FsmState val2 = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Antic Pull")); if (val2 != null) { val.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.Finished, toState = "Antic Pull", toFsmState = val2 } }; } List list2 = controlFSM.Fsm.States.ToList(); list2.Add(val); controlFSM.Fsm.States = list2.ToArray(); FsmStateAction[] actions = val.Actions; foreach (FsmStateAction val3 in actions) { val3.Init(val); } ModifyAnticPauseTransitions(val); } } private void ModifyAnticPauseTransitions(FsmState trackState) { //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Expected O, but got Unknown //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Expected O, but got Unknown if ((Object)(object)controlFSM == (Object)null) { return; } FsmState val = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Antic Pause")); if (val != null) { List list = val.Actions.ToList(); FsmFloat fsmFloat = controlFSM.FsmVariables.GetFsmFloat("Attack Rotation"); FsmBool specialAttackVar = _specialAttackVar; List list2 = controlFSM.FsmVariables.BoolVariables.ToList(); FsmBool val2 = ((IEnumerable)list2).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == "Is Swipe")); if (val2 == null) { val2 = new FsmBool("Is Swipe") { Value = false }; list2.Add(val2); controlFSM.FsmVariables.BoolVariables = list2.ToArray(); } List list3 = controlFSM.Fsm.Events.ToList(); FsmEvent fsmEvent = FsmEvent.GetFsmEvent("IS_PHASE2_SWIPE"); if (!list3.Contains(fsmEvent)) { list3.Add(fsmEvent); } controlFSM.Fsm.Events = list3.ToArray(); CallMethod val3 = new CallMethod(); val3.behaviour = FsmObject.op_Implicit((Object)(object)this); val3.methodName = FsmString.op_Implicit("CheckAndSendPhase2SwipeEvent"); val3.parameters = (FsmVar[])(object)new FsmVar[0]; val3.everyFrame = false; CallMethod item = val3; list.Add((FsmStateAction)(object)item); val.Actions = list.ToArray(); List list4 = val.Transitions.ToList(); list4.Add(new FsmTransition { FsmEvent = fsmEvent, toState = "Phase2 Track", toFsmState = trackState }); val.Transitions = list4.ToArray(); } } private void ModifyShootState() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown if (!((Object)(object)controlFSM == (Object)null)) { FsmState val = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Shoot")); if (val == null) { Log.Warn($"[MemoryFingerBlade {bladeIndex}] 未找到 Shoot 状态"); return; } CallMethod val2 = new CallMethod(); val2.behaviour = FsmObject.op_Implicit((Object)(object)this); val2.methodName = FsmString.op_Implicit("SpawnAndFirePin"); val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; CallMethod item = val2; List list = val.Actions.ToList(); list.Insert(0, (FsmStateAction)(object)item); val.Actions = list.ToArray(); } } private void ModifyThunkState() { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown if ((Object)(object)controlFSM == (Object)null) { return; } FsmState val = ((IEnumerable)controlFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Thunk")); if (val == null) { Log.Warn($"[MemoryFingerBlade {bladeIndex}] 未找到 Thunk 状态"); return; } FsmGameObject fsmGameObject = controlFSM.FsmVariables.GetFsmGameObject("Damager"); if (fsmGameObject == null) { Log.Warn($"[MemoryFingerBlade {bladeIndex}] 未找到 Damager 变量"); return; } SetLayer item = new SetLayer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = fsmGameObject }, layer = LayerMask.NameToLayer("Attack") }; CallMethod val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("UpdateRenderOrder") { Value = "UpdateRenderOrder" }; val2.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar(typeof(bool)) { boolValue = false } }; val2.everyFrame = false; CallMethod item2 = val2; List list = val.Actions.ToList(); list.Insert(0, (FsmStateAction)(object)item2); list.Insert(0, (FsmStateAction)(object)item); val.Actions = list.ToArray(); } public void SpawnAndFirePin() { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_pinManager == (Object)null || !_pinManager.IsInitialized) { Log.Warn($"[MemoryFingerBlade {bladeIndex}] FWPinManager 未就绪,跳过 Pin 发射"); return; } if ((Object)(object)controlFSM == (Object)null) { Log.Warn($"[MemoryFingerBlade {bladeIndex}] Control FSM 为空,无法发射 Pin"); return; } Vector3 position = ((Component)this).transform.position; float num = 0f; FsmFloat fsmFloat = controlFSM.FsmVariables.GetFsmFloat("Attack Angle"); if (fsmFloat != null) { num = fsmFloat.Value; } else { Log.Warn($"[MemoryFingerBlade {bladeIndex}] 未找到 Attack Angle 变量,使用默认角度 0"); } GameObject val = _pinManager.SpawnPinProjectile(position); if ((Object)(object)val == (Object)null) { Log.Warn($"[MemoryFingerBlade {bladeIndex}] 无法获取 Pin Projectile"); return; } val.transform.rotation = Quaternion.Euler(0f, 0f, num); PlayMakerFSM val2 = FSMUtility.LocateMyFSM(val, "Control"); if ((Object)(object)val2 != (Object)null) { val2.SendEvent("DIRECT_FIRE"); ((MonoBehaviour)this).StartCoroutine(DelayedAttack(val2)); } else { Log.Warn($"[MemoryFingerBlade {bladeIndex}] Pin 未找到 Control FSM"); } } [IteratorStateMachine(typeof(d__65))] private IEnumerator DelayedAttack(PlayMakerFSM fsm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__65(0) { <>4__this = this, fsm = fsm }; } public void UpdateRenderOrder(bool toFront) { if (!((Object)(object)_meshRenderer == (Object)null)) { if (toFront) { ((Renderer)_meshRenderer).sortingOrder = 10; } else { ((Renderer)_meshRenderer).sortingOrder = 0; } } } } internal class MemoryHandControlBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__17 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryHandControlBehavior <>4__this; private HeroController 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__17(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.handName = ((Object)((Component)<>4__this).gameObject).name; Log.Info("初始化手部: " + <>4__this.handName); 5__1 = Object.FindFirstObjectByType(); if ((Object)(object)5__1 != (Object)null) { <>4__this.playerTransform = 5__1.transform; } else { Log.Error(<>4__this.handName + " 未找到玩家Transform"); } <>4__this.handFSM = ((Component)<>4__this).GetComponent(); if (!((Object)(object)<>4__this.handFSM != (Object)null)) { Log.Warn(<>4__this.handName + " 未找到FSM"); } <>4__this.InitializeFingerBlades(); <>4__this.AddOrbitAttackState(); <>4__this.AddDashOrbitAttackState(); <>4__this.ModifyStompState_New(); <>4__this.ModifySwipeStates_New(); <>4__this.ModifyOriginalSwipeStates(); <>4__this.handFSM.FsmVariables.Init(); <>4__this.handFSM.Fsm.InitData(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__37 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryHandControlBehavior <>4__this; private int 5__1; private PlayMakerFSM 5__2; private int 5__3; private string 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__37(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; 5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; goto IL_0062; } <>1__state = -1; 5__1 = 0; goto IL_0186; IL_0062: if ((Object)(object)<>4__this.fingerBladeBehaviors[5__1] != (Object)null) { 5__2 = ((IEnumerable)((Component)<>4__this.fingerBladeBehaviors[5__1]).GetComponents()).FirstOrDefault((Func)((PlayMakerFSM fsm) => fsm.FsmName == "Control")); if ((Object)(object)5__2 != (Object)null) { 5__3 = ((<>4__this.handName == "Hand L") ? 5__1 : (5__1 + 3)); 5__4 = $"SHOOT {<>4__this.handName} Blade {5__3}"; 5__2.SendEvent(5__4); 5__4 = null; } else { Log.Warn($"{<>4__this.handName} -> Finger Blade {5__1} 未找到Control FSM"); } 5__2 = null; } 5__1++; goto IL_0186; IL_0186: if (5__1 < <>4__this.fingerBladeBehaviors.Length) { if (5__1 > 0) { <>2__current = (object)new WaitForSeconds(<>4__this.bladeShootInterval); <>1__state = 1; return true; } goto IL_0062; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [Header("手部配置")] public string handName = ""; [Header("Finger Blade配置")] public Transform[] fingerBlades = (Transform[])(object)new Transform[3]; public MemoryFingerBladeBehavior[] fingerBladeBehaviors = new MemoryFingerBladeBehavior[3]; [Header("环绕攻击配置")] public float orbitRotationDirection = 1f; public float bladeShootInterval = 0.5f; private PlayMakerFSM? handFSM; private Transform? playerTransform; private FsmGameObject? _silkBossFsmVar; private FsmGameObject? _fingerBladeLFsmVar; private FsmGameObject? _fingerBladeMFsmVar; private FsmGameObject? _fingerBladeRFsmVar; private FsmBool? _ReadyVar; private FsmEvent? _orbitStartEvent; private FsmEvent? _shootEvent; private FsmEvent? _dashOrbitStartEvent; private FsmEvent? _dashOrbitShootEvent; private void Start() { ((MonoBehaviour)this).StartCoroutine(InitializeHand()); } [IteratorStateMachine(typeof(d__17))] private IEnumerator InitializeHand() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__17(0) { <>4__this = this }; } private void ModifyStompState_New() { //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Expected O, but got Unknown //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Expected O, but got Unknown //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Expected O, but got Unknown //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Expected O, but got Unknown if (!((Object)(object)handFSM == (Object)null)) { CreateStompState("Custom Hand Stomp Center", "CUSTOM_STOMP_CENTER", 90f, new float[3] { -6f, 0f, 6f }); CreateStompState("Custom Hand Stomp Left", "CUSTOM_STOMP_LEFT", 135f, new float[3] { -6f, 0f, 6f }); CreateStompState("Custom Hand Stomp Right", "CUSTOM_STOMP_RIGHT", 45f, new float[3] { -6f, 0f, 6f }); string text = "Custom Stomp Decision"; FsmState val = FsmStateBuilder.CreateState(handFSM.Fsm, text); List list = new List(); FsmBool val2 = handFSM.FsmVariables.GetFsmBool("Stomp Random Bool"); if (val2 == null) { val2 = new FsmBool("Stomp Random Bool"); List list2 = handFSM.FsmVariables.BoolVariables.ToList(); list2.Add(val2); handFSM.FsmVariables.BoolVariables = list2.ToArray(); } List list3 = handFSM.Fsm.Events.ToList(); FsmEvent fsmEvent = FsmEvent.GetFsmEvent("CUSTOM_STOMP_L_DECISION"); FsmEvent fsmEvent2 = FsmEvent.GetFsmEvent("CUSTOM_STOMP_R_DECISION"); if (!list3.Contains(fsmEvent)) { list3.Add(fsmEvent); } if (!list3.Contains(fsmEvent2)) { list3.Add(fsmEvent2); } handFSM.Fsm.Events = list3.ToArray(); list.Add((FsmStateAction)new RandomBool { storeResult = val2 }); FsmBool fsmBool = handFSM.FsmVariables.GetFsmBool("Ready"); if (fsmBool != null) { list.Add((FsmStateAction)new SetBoolValue { boolVariable = fsmBool, boolValue = FsmBool.op_Implicit(false), everyFrame = false }); } list.Add((FsmStateAction)new BoolTest { boolVariable = val2, isTrue = FsmEvent.GetFsmEvent("CUSTOM_STOMP_L_DECISION"), isFalse = FsmEvent.GetFsmEvent("CUSTOM_STOMP_R_DECISION"), everyFrame = false }); val.Actions = list.ToArray(); FsmState targetState = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Custom Hand Stomp Left")); FsmState targetState2 = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Custom Hand Stomp Right")); val.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CUSTOM_STOMP_L_DECISION"), targetState), FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CUSTOM_STOMP_R_DECISION"), targetState2) }; List list4 = handFSM.FsmStates.ToList(); list4.Add(val); handFSM.Fsm.States = list4.ToArray(); List list5 = handFSM.FsmGlobalTransitions.ToList(); FsmTransition val3 = ((IEnumerable)list5).FirstOrDefault((Func)((FsmTransition t) => t.FsmEvent.Name == "STOMP")); if (val3 != null) { val3.toState = text; val3.toFsmState = val; } handFSM.Fsm.GlobalTransitions = list5.ToArray(); } } private void CreateStompState(string stateName, string eventName, float rotation, float[] xOffsets) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0095: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Expected O, but got Unknown //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Expected O, but got Unknown //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Expected O, but got Unknown //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Expected O, but got Unknown //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Expected O, but got Unknown //IL_0252: Expected O, but got Unknown //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Expected O, but got Unknown //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Expected O, but got Unknown //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Expected O, but got Unknown //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Expected O, but got Unknown //IL_02d3: Expected O, but got Unknown //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Expected O, but got Unknown //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Expected O, but got Unknown //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Expected O, but got Unknown //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Expected O, but got Unknown //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Expected O, but got Unknown //IL_037c: Expected O, but got Unknown //IL_0381: Expected O, but got Unknown //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Expected O, but got Unknown //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Expected O, but got Unknown if ((Object)(object)handFSM == (Object)null) { return; } FsmState val = FsmStateBuilder.CreateState(handFSM.Fsm, stateName); List list = new List(); FsmFloat fsmFloat = handFSM.FsmVariables.GetFsmFloat("Hero X"); FsmFloat fsmFloat2 = handFSM.FsmVariables.GetFsmFloat("Hero Y"); GetPosition item = new GetPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)HeroController.instance).gameObject } }, vector = new FsmVector3(), x = fsmFloat, y = fsmFloat2, z = new FsmFloat(), space = (Space)0, everyFrame = false }; list.Add((FsmStateAction)(object)item); FloatClamp item2 = new FloatClamp { floatVariable = fsmFloat, minValue = new FsmFloat(FsmFloat.op_Implicit(22f)), maxValue = new FsmFloat(FsmFloat.op_Implicit(55f)), everyFrame = false }; list.Add((FsmStateAction)(object)item2); for (int i = 0; i < fingerBlades.Length; i++) { if (!((Object)(object)fingerBlades[i] == (Object)null)) { string name = ((Object)fingerBlades[i]).name; float num = 0f; if (name.Contains("Blade L")) { num = xOffsets[0]; } else if (name.Contains("Blade M")) { num = xOffsets[1]; } else if (name.Contains("Blade R")) { num = xOffsets[2]; } FsmFloat fsmFloat3 = handFSM.FsmVariables.GetFsmFloat($"Attack X {i}"); SetFloatValue item3 = new SetFloatValue { floatVariable = fsmFloat3, floatValue = fsmFloat, everyFrame = false }; FloatAdd item4 = new FloatAdd { floatVariable = fsmFloat3, add = new FsmFloat(FsmFloat.op_Implicit(num)), everyFrame = false }; list.Add((FsmStateAction)(object)item3); list.Add((FsmStateAction)(object)item4); SetFsmFloat item5 = new SetFsmFloat { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Attack X") { Value = "Attack X" }, setValue = fsmFloat3, everyFrame = false }; SetFsmFloat item6 = new SetFsmFloat { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Attack Rotation") { Value = "Attack Rotation" }, setValue = new FsmFloat(FsmFloat.op_Implicit(rotation)), everyFrame = false }; list.Add((FsmStateAction)(object)item5); list.Add((FsmStateAction)(object)item6); SendEventByName item7 = new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } } }, sendEvent = FsmString.op_Implicit(eventName), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }; list.Add((FsmStateAction)(object)item7); } } Wait item8 = new Wait { time = FsmFloat.op_Implicit(2f), finishEvent = FsmEvent.Finished }; list.Add((FsmStateAction)(object)item8); val.Actions = list.ToArray(); List list2 = handFSM.FsmStates.ToList(); list2.Add(val); handFSM.Fsm.States = list2.ToArray(); FsmState targetState = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Attack Ready Frame")); FsmStateBuilder.SetFinishedTransition(val, targetState); } private void ModifySwipeStates_New() { if ((Object)(object)handFSM == (Object)null) { return; } CreateSwipeState("Custom Hand Swipe L", "CUSTOM_SWIPE_L", 11.5f, 180f, 1f); CreateSwipeState("Custom Hand Swipe R", "CUSTOM_SWIPE_R", -11.5f, 0f, -1f); CreateSwipeDirState(); List list = handFSM.FsmGlobalTransitions.ToList(); FsmTransition val = ((IEnumerable)list).FirstOrDefault((Func)((FsmTransition t) => t.FsmEvent.Name == "SWIPE")); if (val != null) { FsmState toFsmState = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Custom Hand Swipe Dir")); val.toState = "Custom Hand Swipe Dir"; val.toFsmState = toFsmState; } handFSM.Fsm.GlobalTransitions = list.ToArray(); } private void CreateSwipeDirState() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Expected O, but got Unknown //IL_0111: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Expected O, but got Unknown //IL_0212: Expected O, but got Unknown //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Expected O, but got Unknown //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Expected O, but got Unknown //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Expected O, but got Unknown //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Expected O, but got Unknown //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Expected O, but got Unknown //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Expected O, but got Unknown //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Expected O, but got Unknown //IL_02b6: Expected O, but got Unknown //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Expected O, but got Unknown //IL_02f3: Expected O, but got Unknown //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Expected O, but got Unknown //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Expected O, but got Unknown //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Expected O, but got Unknown //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Expected O, but got Unknown //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Expected O, but got Unknown //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Expected O, but got Unknown //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Expected O, but got Unknown //IL_0397: Expected O, but got Unknown //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Expected O, but got Unknown //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Expected O, but got Unknown //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Expected O, but got Unknown //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Expected O, but got Unknown if (!((Object)(object)handFSM == (Object)null)) { FsmState val = FsmStateBuilder.CreateState(handFSM.Fsm, "Custom Hand Swipe Dir"); List list = new List(); FsmBool fsmBool = handFSM.FsmVariables.GetFsmBool("Ready"); if (fsmBool != null) { list.Add((FsmStateAction)new SetBoolValue { boolVariable = fsmBool, boolValue = FsmBool.op_Implicit(false), everyFrame = false }); } CallMethod val2 = new CallMethod(); val2.behaviour = FsmObject.op_Implicit((Object)(object)this); val2.methodName = FsmString.op_Implicit("SetFingerBladePhase2Parameters"); val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; CallMethod item = val2; list.Add((FsmStateAction)(object)item); FsmFloat fsmFloat = handFSM.FsmVariables.GetFsmFloat("Hero X"); GetPosition item2 = new GetPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)HeroController.instance).gameObject } }, vector = new FsmVector3(), x = fsmFloat, y = new FsmFloat(), z = new FsmFloat(), space = (Space)0, everyFrame = false }; list.Add((FsmStateAction)(object)item2); FsmEvent fsmEvent = FsmEvent.GetFsmEvent("SWIPE_DIR_L"); FsmEvent fsmEvent2 = FsmEvent.GetFsmEvent("SWIPE_DIR_R"); FsmEvent fsmEvent3 = FsmEvent.GetFsmEvent("NULL"); List list2 = handFSM.Fsm.Events.ToList(); if (!list2.Contains(fsmEvent)) { list2.Add(fsmEvent); } if (!list2.Contains(fsmEvent2)) { list2.Add(fsmEvent2); } handFSM.Fsm.Events = list2.ToArray(); CheckXPosition item3 = new CheckXPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)HeroController.instance).gameObject } }, compareTo = new FsmFloat(FsmFloat.op_Implicit(47f)), compareToOffset = new FsmFloat(FsmFloat.op_Implicit(0f)), tolerance = new FsmFloat(FsmFloat.op_Implicit(0f)), equal = fsmEvent3, equalBool = new FsmBool(FsmBool.op_Implicit(false)), greaterThan = fsmEvent2, greaterThanBool = new FsmBool(FsmBool.op_Implicit(false)), lessThan = fsmEvent3, lessThanBool = new FsmBool(FsmBool.op_Implicit(false)), everyFrame = false, activeBool = new FsmBool(FsmBool.op_Implicit(false)) }; list.Add((FsmStateAction)(object)item3); CheckXPosition item4 = new CheckXPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)HeroController.instance).gameObject } }, compareTo = new FsmFloat(FsmFloat.op_Implicit(33f)), compareToOffset = new FsmFloat(FsmFloat.op_Implicit(0f)), tolerance = new FsmFloat(FsmFloat.op_Implicit(0f)), equal = fsmEvent3, equalBool = new FsmBool(FsmBool.op_Implicit(false)), greaterThan = fsmEvent3, greaterThanBool = new FsmBool(FsmBool.op_Implicit(false)), lessThan = fsmEvent, lessThanBool = new FsmBool(FsmBool.op_Implicit(false)), everyFrame = false, activeBool = new FsmBool(FsmBool.op_Implicit(false)) }; list.Add((FsmStateAction)(object)item4); SendRandomEvent val3 = new SendRandomEvent(); val3.events = (FsmEvent[])(object)new FsmEvent[2] { fsmEvent, fsmEvent2 }; val3.weights = (FsmFloat[])(object)new FsmFloat[2] { new FsmFloat(FsmFloat.op_Implicit(1f)), new FsmFloat(FsmFloat.op_Implicit(1f)) }; val3.delay = new FsmFloat(FsmFloat.op_Implicit(0f)); SendRandomEvent item5 = val3; list.Add((FsmStateAction)(object)item5); val.Actions = list.ToArray(); FsmState targetState = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Custom Hand Swipe L")); FsmState targetState2 = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Custom Hand Swipe R")); val.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(fsmEvent, targetState), FsmStateBuilder.CreateTransition(fsmEvent2, targetState2) }; List list3 = handFSM.FsmStates.ToList(); list3.Add(val); handFSM.Fsm.States = list3.ToArray(); } } private void CreateSwipeState(string stateName, string eventName, float xOffset, float rotation, float yScale) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0095: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Expected O, but got Unknown //IL_0581: Unknown result type (might be due to invalid IL or missing references) //IL_0586: Unknown result type (might be due to invalid IL or missing references) //IL_0596: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Expected O, but got Unknown //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Expected O, but got Unknown //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Expected O, but got Unknown //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Expected O, but got Unknown //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Expected O, but got Unknown //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Expected O, but got Unknown //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Expected O, but got Unknown //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Expected O, but got Unknown //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Expected O, but got Unknown //IL_02e4: Expected O, but got Unknown //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Expected O, but got Unknown //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Expected O, but got Unknown //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Expected O, but got Unknown //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Expected O, but got Unknown //IL_0365: Expected O, but got Unknown //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Expected O, but got Unknown //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Expected O, but got Unknown //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Expected O, but got Unknown //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Expected O, but got Unknown //IL_03e6: Expected O, but got Unknown //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Expected O, but got Unknown //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Expected O, but got Unknown //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Expected O, but got Unknown //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Expected O, but got Unknown //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Expected O, but got Unknown //IL_0471: Expected O, but got Unknown //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_048d: Expected O, but got Unknown //IL_048d: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Expected O, but got Unknown //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Expected O, but got Unknown //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Expected O, but got Unknown //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Expected O, but got Unknown //IL_052d: Expected O, but got Unknown //IL_0532: Expected O, but got Unknown //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_053e: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Expected O, but got Unknown //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Expected O, but got Unknown if ((Object)(object)handFSM == (Object)null) { return; } FsmState val = FsmStateBuilder.CreateState(handFSM.Fsm, stateName); List list = new List(); FsmFloat fsmFloat = handFSM.FsmVariables.GetFsmFloat("Hero X"); FsmFloat fsmFloat2 = handFSM.FsmVariables.GetFsmFloat("Hero Y"); GetPosition item = new GetPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)HeroController.instance).gameObject } }, vector = new FsmVector3(), x = fsmFloat, y = fsmFloat2, z = new FsmFloat(), space = (Space)0, everyFrame = false }; list.Add((FsmStateAction)(object)item); float[] array = new float[3] { 2f, 0f, -2f }; for (int i = 0; i < fingerBlades.Length; i++) { if (!((Object)(object)fingerBlades[i] == (Object)null)) { string name = ((Object)fingerBlades[i]).name; float num = 0f; if (name.Contains("Blade L")) { num = array[0]; } else if (name.Contains("Blade M")) { num = array[1]; } else if (name.Contains("Blade R")) { num = array[2]; } FsmFloat fsmFloat3 = handFSM.FsmVariables.GetFsmFloat($"Attack X {i}"); SetFloatValue item2 = new SetFloatValue { floatVariable = fsmFloat3, floatValue = fsmFloat, everyFrame = false }; FloatAdd item3 = new FloatAdd { floatVariable = fsmFloat3, add = new FsmFloat(FsmFloat.op_Implicit(xOffset)), everyFrame = false }; FloatClamp item4 = new FloatClamp { floatVariable = fsmFloat3, minValue = new FsmFloat(FsmFloat.op_Implicit(23f)), maxValue = new FsmFloat(FsmFloat.op_Implicit(55f)), everyFrame = false }; list.Add((FsmStateAction)(object)item2); list.Add((FsmStateAction)(object)item3); list.Add((FsmStateAction)(object)item4); FsmFloat fsmFloat4 = handFSM.FsmVariables.GetFsmFloat($"Attack Y {i}"); SetFloatValue item5 = new SetFloatValue { floatVariable = fsmFloat4, floatValue = fsmFloat2, everyFrame = false }; FloatAdd item6 = new FloatAdd { floatVariable = fsmFloat4, add = new FsmFloat(FsmFloat.op_Implicit(num)), everyFrame = false }; list.Add((FsmStateAction)(object)item5); list.Add((FsmStateAction)(object)item6); SetFsmFloat item7 = new SetFsmFloat { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Attack X") { Value = "Attack X" }, setValue = fsmFloat3, everyFrame = false }; SetFsmFloat item8 = new SetFsmFloat { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Attack Y") { Value = "Attack Y" }, setValue = fsmFloat4, everyFrame = false }; SetFsmFloat item9 = new SetFsmFloat { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Attack Rotation") { Value = "Attack Rotation" }, setValue = new FsmFloat(FsmFloat.op_Implicit(rotation)), everyFrame = false }; SetFsmFloat item10 = new SetFsmFloat { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Attack Y Scale") { Value = "Attack Y Scale" }, setValue = new FsmFloat(FsmFloat.op_Implicit(yScale)), everyFrame = false }; list.Add((FsmStateAction)(object)item7); list.Add((FsmStateAction)(object)item8); list.Add((FsmStateAction)(object)item9); list.Add((FsmStateAction)(object)item10); SendEventByName item11 = new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)fingerBlades[i]).gameObject } } }, sendEvent = FsmString.op_Implicit(eventName), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }; list.Add((FsmStateAction)(object)item11); } } Wait item12 = new Wait { time = FsmFloat.op_Implicit(2.5f), finishEvent = FsmEvent.Finished }; list.Add((FsmStateAction)(object)item12); val.Actions = list.ToArray(); List list2 = handFSM.FsmStates.ToList(); list2.Add(val); handFSM.Fsm.States = list2.ToArray(); FsmState targetState = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Attack Ready Frame")); FsmStateBuilder.SetFinishedTransition(val, targetState); } private void InitializeFingerBlades() { if ((Object)(object)handFSM == (Object)null) { Log.Warn(handName + " handFSM 为 null,无法初始化 Finger Blades"); return; } FsmVariables fsmVariables = handFSM.FsmVariables; _silkBossFsmVar = fsmVariables.FindFsmGameObject("Silk Boss"); _fingerBladeLFsmVar = fsmVariables.FindFsmGameObject("Finger Blade L"); _fingerBladeMFsmVar = fsmVariables.FindFsmGameObject("Finger Blade M"); _fingerBladeRFsmVar = fsmVariables.FindFsmGameObject("Finger Blade R"); _ReadyVar = fsmVariables.FindFsmBool("Ready"); Transform[] array = fingerBlades; FsmGameObject? fingerBladeLFsmVar = _fingerBladeLFsmVar; object obj; if (fingerBladeLFsmVar == null) { obj = null; } else { GameObject value = fingerBladeLFsmVar.Value; obj = ((value != null) ? value.transform : null); } array[0] = (Transform)obj; Transform[] array2 = fingerBlades; FsmGameObject? fingerBladeMFsmVar = _fingerBladeMFsmVar; object obj2; if (fingerBladeMFsmVar == null) { obj2 = null; } else { GameObject value2 = fingerBladeMFsmVar.Value; obj2 = ((value2 != null) ? value2.transform : null); } array2[1] = (Transform)obj2; Transform[] array3 = fingerBlades; FsmGameObject? fingerBladeRFsmVar = _fingerBladeRFsmVar; object obj3; if (fingerBladeRFsmVar == null) { obj3 = null; } else { GameObject value3 = fingerBladeRFsmVar.Value; obj3 = ((value3 != null) ? value3.transform : null); } array3[2] = (Transform)obj3; int num = 0; for (int i = 0; i < 3; i++) { if ((Object)(object)fingerBlades[i] == (Object)null) { Log.Warn($"{handName} Finger Blade {i} 未找到(FSM 变量为 null)"); continue; } GameObject gameObject = ((Component)fingerBlades[i]).gameObject; MemoryFingerBladeBehavior memoryFingerBladeBehavior = gameObject.GetComponent(); if ((Object)(object)memoryFingerBladeBehavior == (Object)null) { memoryFingerBladeBehavior = CreateFingerBladeBehavior(gameObject); } InitializeFingerBlade(memoryFingerBladeBehavior, num); fingerBladeBehaviors[num] = memoryFingerBladeBehavior; num++; } Log.Info($"{handName} 初始化完成,找到 {num} 根Finger Blade(使用 FSM 变量)"); } private MemoryFingerBladeBehavior CreateFingerBladeBehavior(GameObject bladeObj) { return bladeObj.AddComponent(); } private void InitializeFingerBlade(MemoryFingerBladeBehavior bladeBehavior, int bladeIndex) { if (bladeBehavior != null) { if (true) { bladeBehavior.Initialize(bladeIndex, handName, this); Log.Debug($"[MemoryHand] 已初始化 MemoryFingerBladeBehavior {bladeIndex}"); return; } } bladeBehavior.Initialize(bladeIndex, handName, this); } public void AddOrbitAttackState() { if (!((Object)(object)handFSM == (Object)null)) { RegisterHandEvents(); FsmState val = FsmStateBuilder.CreateState(handFSM.Fsm, "Orbit Start", handName + " 启动环绕状态"); FsmState val2 = FsmStateBuilder.CreateState(handFSM.Fsm, "Orbit Shoot", handName + " 环绕发射状态"); FsmStateBuilder.AddStatesToFsm(handFSM, val, val2); AddOrbitStartActions(val); AddOrbitShootActions(val2); AddOrbitAttackGlobalTransition(val, val2); AddOrbitStartTransitions(val, val2); AddOrbitShootTransitions(val2, ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Attack Ready Frame"))); RelinkHandEventReferences(); } } public void AddDashOrbitAttackState() { //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Expected O, but got Unknown //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Expected O, but got Unknown //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Expected O, but got Unknown //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Expected O, but got Unknown //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Expected O, but got Unknown //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Expected O, but got Unknown //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Expected O, but got Unknown //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Expected O, but got Unknown //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Expected O, but got Unknown //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Expected O, but got Unknown //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_03ff: Expected O, but got Unknown //IL_0404: Expected O, but got Unknown //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Expected O, but got Unknown //IL_0420: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_042b: Unknown result type (might be due to invalid IL or missing references) //IL_043c: Expected O, but got Unknown //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_044d: Expected O, but got Unknown //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Expected O, but got Unknown //IL_0479: Expected O, but got Unknown //IL_0479: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Expected O, but got Unknown //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Expected O, but got Unknown //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Expected O, but got Unknown //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04c7: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Unknown result type (might be due to invalid IL or missing references) //IL_04cd: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_04d6: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: Expected O, but got Unknown //IL_04ee: Expected O, but got Unknown //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Expected O, but got Unknown //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Expected O, but got Unknown //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_0537: Expected O, but got Unknown //IL_0537: Unknown result type (might be due to invalid IL or missing references) //IL_053e: Expected O, but got Unknown //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05eb: Expected O, but got Unknown //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_05ff: Expected O, but got Unknown //IL_0606: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Expected O, but got Unknown //IL_0635: Unknown result type (might be due to invalid IL or missing references) //IL_063a: Unknown result type (might be due to invalid IL or missing references) //IL_0645: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Expected O, but got Unknown //IL_064f: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Expected O, but got Unknown if (!((Object)(object)handFSM == (Object)null)) { _dashOrbitStartEvent = FsmEvent.GetFsmEvent("DASH ORBIT START " + handName); _dashOrbitShootEvent = FsmEvent.GetFsmEvent("DASH ORBIT SHOOT " + handName); List list = handFSM.Fsm.Events.ToList(); if (!list.Contains(_dashOrbitStartEvent)) { list.Add(_dashOrbitStartEvent); } if (!list.Contains(_dashOrbitShootEvent)) { list.Add(_dashOrbitShootEvent); } handFSM.Fsm.Events = list.ToArray(); List list2 = handFSM.FsmVariables.BoolVariables.ToList(); FsmBool val = ((IEnumerable)list2).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == "Dash Ready")); if (val == null) { val = new FsmBool("Dash Ready") { Value = false }; list2.Add(val); } FsmBool val2 = ((IEnumerable)list2).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == "Dash Ready Blade0")); if (val2 == null) { val2 = new FsmBool("Dash Ready Blade0") { Value = false }; list2.Add(val2); } FsmBool val3 = ((IEnumerable)list2).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == "Dash Ready Blade1")); if (val3 == null) { val3 = new FsmBool("Dash Ready Blade1") { Value = false }; list2.Add(val3); } FsmBool val4 = ((IEnumerable)list2).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == "Dash Ready Blade2")); if (val4 == null) { val4 = new FsmBool("Dash Ready Blade2") { Value = false }; list2.Add(val4); } handFSM.FsmVariables.BoolVariables = list2.ToArray(); FsmState dashOrbitStartState = FsmStateBuilder.GetOrCreateState(handFSM, "Dash Orbit Start"); FsmState orCreateState = FsmStateBuilder.GetOrCreateState(handFSM, "Dash Orbit Wait Fingers Dash Ready"); FsmState dashOrbitShootDispatchState = FsmStateBuilder.GetOrCreateState(handFSM, "Dash Orbit Shoot Dispatch"); SetBoolValue val5 = new SetBoolValue { boolVariable = val, boolValue = new FsmBool(FsmBool.op_Implicit(false)), everyFrame = false }; CallMethod val6 = new CallMethod(); val6.behaviour = new FsmObject { Value = (Object)(object)this }; val6.methodName = new FsmString("StartDashOrbitSequence") { Value = "StartDashOrbitSequence" }; val6.parameters = (FsmVar[])(object)new FsmVar[0]; val6.everyFrame = false; CallMethod val7 = val6; Wait val8 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished }; dashOrbitStartState.Actions = (FsmStateAction[])(object)new FsmStateAction[3] { (FsmStateAction)val5, (FsmStateAction)val7, (FsmStateAction)val8 }; FsmStateBuilder.SetFinishedTransition(dashOrbitStartState, orCreateState); GameObject value = ((fingerBlades.Length != 0 && (Object)(object)fingerBlades[0] != (Object)null) ? ((Component)fingerBlades[0]).gameObject : null); GameObject value2 = ((fingerBlades.Length > 1 && (Object)(object)fingerBlades[1] != (Object)null) ? ((Component)fingerBlades[1]).gameObject : null); GameObject value3 = ((fingerBlades.Length > 2 && (Object)(object)fingerBlades[2] != (Object)null) ? ((Component)fingerBlades[2]).gameObject : null); GetFsmBool val9 = new GetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = value } }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Dash Ready") { Value = "Dash Ready" }, storeValue = val2, everyFrame = true }; GetFsmBool val10 = new GetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = value2 } }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Dash Ready") { Value = "Dash Ready" }, storeValue = val3, everyFrame = true }; GetFsmBool val11 = new GetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = value3 } }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Dash Ready") { Value = "Dash Ready" }, storeValue = val4, everyFrame = true }; BoolAllTrue val12 = new BoolAllTrue(); val12.boolVariables = (FsmBool[])(object)new FsmBool[3] { val2, val3, val4 }; val12.sendEvent = FsmEvent.Finished; val12.storeResult = val; val12.everyFrame = true; BoolAllTrue val13 = val12; orCreateState.Actions = (FsmStateAction[])(object)new FsmStateAction[4] { (FsmStateAction)val9, (FsmStateAction)val10, (FsmStateAction)val11, (FsmStateAction)val13 }; FsmState val14 = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Attack Ready Frame")); if (val14 != null) { FsmStateBuilder.SetFinishedTransition(orCreateState, val14); } val6 = new CallMethod(); val6.behaviour = new FsmObject { Value = (Object)(object)this }; val6.methodName = new FsmString("SendDashOrbitShootEvents") { Value = "SendDashOrbitShootEvents" }; val6.parameters = (FsmVar[])(object)new FsmVar[0]; val6.everyFrame = false; CallMethod val15 = val6; Wait val16 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished }; dashOrbitShootDispatchState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val15, (FsmStateAction)val16 }; if (val14 != null) { FsmStateBuilder.SetFinishedTransition(dashOrbitShootDispatchState, val14); } List list3 = handFSM.FsmGlobalTransitions.ToList(); if (!list3.Any((FsmTransition t) => t.FsmEvent == _dashOrbitStartEvent && (t.toState == dashOrbitStartState.Name || t.toFsmState == dashOrbitStartState))) { list3.Add(FsmStateBuilder.CreateTransition(_dashOrbitStartEvent, dashOrbitStartState)); } if (!list3.Any((FsmTransition t) => t.FsmEvent == _dashOrbitShootEvent && (t.toState == dashOrbitShootDispatchState.Name || t.toFsmState == dashOrbitShootDispatchState))) { list3.Add(FsmStateBuilder.CreateTransition(_dashOrbitShootEvent, dashOrbitShootDispatchState)); } handFSM.Fsm.GlobalTransitions = list3.ToArray(); } } public void StartDashOrbitSequence() { float[] array = ((!(handName == "Hand L")) ? new float[3] { 60f, 180f, 300f } : new float[3] { 0f, 120f, 240f }); bool flag = false; FsmGameObject? silkBossFsmVar = _silkBossFsmVar; if ((Object)(object)((silkBossFsmVar != null) ? silkBossFsmVar.Value : null) != (Object)null) { PlayMakerFSM val = ((IEnumerable)_silkBossFsmVar.Value.GetComponents()).FirstOrDefault((Func)((PlayMakerFSM fsm) => fsm.FsmName == "Phase Control")); if ((Object)(object)val != (Object)null) { FsmBool fsmBool = val.FsmVariables.GetFsmBool("Special Attack"); if (fsmBool != null) { flag = fsmBool.Value; } } } for (int i = 0; i < fingerBladeBehaviors.Length; i++) { if ((Object)(object)fingerBladeBehaviors[i] == (Object)null) { continue; } PlayMakerFSM val2 = ((IEnumerable)((Component)fingerBladeBehaviors[i]).GetComponents()).FirstOrDefault((Func)((PlayMakerFSM fsm) => fsm.FsmName == "Control")); if (!((Object)(object)val2 == (Object)null)) { float value = 1200f; float value2 = array[i]; FsmFloat fsmFloat = val2.FsmVariables.GetFsmFloat("OrbitRadius"); if (fsmFloat != null) { fsmFloat.Value = 5f; } FsmFloat fsmFloat2 = val2.FsmVariables.GetFsmFloat("OrbitSpeed"); if (fsmFloat2 != null) { fsmFloat2.Value = value; } FsmFloat fsmFloat3 = val2.FsmVariables.GetFsmFloat("OrbitOffset"); if (fsmFloat3 != null) { fsmFloat3.Value = value2; } FsmFloat fsmFloat4 = val2.FsmVariables.GetFsmFloat("Dash Rotation Offset"); if (fsmFloat4 != null) { fsmFloat4.Value = (flag ? 45f : 0f); } FsmBool fsmBool2 = val2.FsmVariables.GetFsmBool("Dash Ready"); if (fsmBool2 != null) { fsmBool2.Value = false; } int num = ((handName == "Hand L") ? i : (i + 3)); string text = $"DASH ORBIT START {handName} Blade {num}"; val2.SendEvent(text); } } } public void SendDashOrbitShootEvents() { for (int i = 0; i < fingerBladeBehaviors.Length; i++) { if (!((Object)(object)fingerBladeBehaviors[i] == (Object)null)) { PlayMakerFSM val = ((IEnumerable)((Component)fingerBladeBehaviors[i]).GetComponents()).FirstOrDefault((Func)((PlayMakerFSM fsm) => fsm.FsmName == "Control")); if (!((Object)(object)val == (Object)null)) { int num = ((handName == "Hand L") ? i : (i + 3)); string text = $"SHOOT {handName} Blade {num}"; val.SendEvent(text); } } } _ReadyVar.Value = false; } private void OnDestroy() { ((MonoBehaviour)this).StopAllCoroutines(); fingerBlades = (Transform[])(object)new Transform[3]; fingerBladeBehaviors = new MemoryFingerBladeBehavior[3]; } private void RegisterHandEvents() { if (!((Object)(object)handFSM == (Object)null)) { _orbitStartEvent = FsmEvent.GetFsmEvent("ORBIT START " + handName); _shootEvent = FsmEvent.GetFsmEvent("SHOOT " + handName); List list = handFSM.Fsm.Events.ToList(); if (!list.Contains(_orbitStartEvent)) { list.Add(_orbitStartEvent); } if (!list.Contains(_shootEvent)) { list.Add(_shootEvent); } handFSM.Fsm.Events = list.ToArray(); } } private void RelinkHandEventReferences() { if (!((Object)(object)handFSM == (Object)null)) { Log.Info(handName + " 重新链接Hand FSM事件引用"); handFSM.Fsm.InitData(); Log.Info(handName + " Hand FSM事件引用重新链接完成"); } } private void AddOrbitAttackGlobalTransition(FsmState orbitStartState, FsmState orbitShootState) { if (_orbitStartEvent == null) { Log.Error(handName + " 未找到ORBIT START事件: ORBIT START " + handName); return; } FsmState val = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == "Idle")); if (val != null) { FsmStateBuilder.AddTransition(val, FsmStateBuilder.CreateTransition(_orbitStartEvent, orbitStartState)); } List list = handFSM.Fsm.GlobalTransitions.ToList(); list.Add(FsmStateBuilder.CreateTransition(_orbitStartEvent, orbitStartState)); handFSM.Fsm.GlobalTransitions = list.ToArray(); } public void StartOrbitAttackSequence() { float[] array = ((!(handName == "Hand L")) ? new float[3] { 60f, 180f, 300f } : new float[3] { 0f, 120f, 240f }); for (int i = 0; i < fingerBladeBehaviors.Length; i++) { if (!((Object)(object)fingerBladeBehaviors[i] != (Object)null)) { continue; } PlayMakerFSM val = ((IEnumerable)((Component)fingerBladeBehaviors[i]).GetComponents()).FirstOrDefault((Func)((PlayMakerFSM fsm) => fsm.FsmName == "Control")); if ((Object)(object)val != (Object)null) { float num = 200f * orbitRotationDirection; float num2 = array[i] * orbitRotationDirection; FsmFloat fsmFloat = val.FsmVariables.GetFsmFloat("OrbitRadius"); if (fsmFloat != null) { fsmFloat.Value = 7f; } FsmFloat fsmFloat2 = val.FsmVariables.GetFsmFloat("OrbitSpeed"); if (fsmFloat2 != null) { fsmFloat2.Value = num; } FsmFloat fsmFloat3 = val.FsmVariables.GetFsmFloat("OrbitOffset"); if (fsmFloat3 != null) { fsmFloat3.Value = num2; } FsmBool fsmBool = val.FsmVariables.GetFsmBool("Ready"); if (fsmBool != null) { fsmBool.Value = false; } int num3 = ((handName == "Hand L") ? i : (i + 3)); string text = $"ORBIT START {handName} Blade {num3}"; val.SendEvent(text); Log.Info($"{handName} Finger Blade {i}: Radius=7, Speed={num}, Offset={num2}"); } else { Log.Warn($"{handName} -> Finger Blade {i} 未找到Control FSM"); } } } public void StartShootSequence() { ((MonoBehaviour)this).StartCoroutine(ShootSequence()); } public void SetOrbitAttackConfig(float rotationDirection, float shootInterval) { orbitRotationDirection = rotationDirection; bladeShootInterval = shootInterval; Log.Info($"{handName} 设置环绕攻击参数: 方向={rotationDirection}, 间隔={shootInterval}秒"); } [IteratorStateMachine(typeof(d__37))] private IEnumerator ShootSequence() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__37(0) { <>4__this = this }; } private void AddOrbitStartActions(FsmState orbitStartState) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown if (_shootEvent == null) { Log.Error(handName + " 未找到SHOOT事件: SHOOT " + handName); return; } CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartOrbitAttackSequence") { Value = "StartOrbitAttackSequence" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; CallMethod val2 = val; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(6f)), finishEvent = _shootEvent }; orbitStartState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, (FsmStateAction)val3 }; } private void AddOrbitShootActions(FsmState orbitShootState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartShootSequence") { Value = "StartShootSequence" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; CallMethod val2 = val; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.2f)), finishEvent = FsmEvent.Finished }; orbitShootState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, (FsmStateAction)val3 }; } private void AddOrbitStartTransitions(FsmState orbitStartState, FsmState orbitShootState) { if (_shootEvent == null) { Log.Error(handName + " 未找到SHOOT事件: SHOOT " + handName); return; } orbitStartState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(_shootEvent, orbitShootState) }; } private void AddOrbitShootTransitions(FsmState orbitShootState, FsmState attackReadyFrameState) { FsmStateBuilder.SetFinishedTransition(orbitShootState, attackReadyFrameState); } public void SetFingerBladePhase2Parameters() { FsmGameObject? silkBossFsmVar = _silkBossFsmVar; GameObject val = ((silkBossFsmVar != null) ? silkBossFsmVar.Value : null); if ((Object)(object)val == (Object)null) { Log.Warn(handName + " 未找到 Silk Boss 对象(FSM 变量为 null)"); return; } PlayMakerFSM val2 = FSMUtility.LocateMyFSM(val, "Phase Control"); if ((Object)(object)val2 == (Object)null) { Log.Warn(handName + " 未找到 Phase Control FSM,无法设置追踪参数"); return; } FsmBool fsmBool = val2.FsmVariables.GetFsmBool("Special Attack"); if (fsmBool == null) { Log.Warn(handName + " 未找到 Phase Control FSM 的 Special Attack 变量"); return; } List list = new List { 1.2f + Random.Range(-0.1f, 0.1f), 1.55f + Random.Range(-0.1f, 0.1f), 1.9f + Random.Range(-0.1f, 0.1f) }; for (int num = list.Count - 1; num > 0; num--) { int index = Random.Range(0, num + 1); float value = list[num]; list[num] = list[index]; list[index] = value; } for (int i = 0; i < fingerBladeBehaviors.Length; i++) { MemoryFingerBladeBehavior memoryFingerBladeBehavior = fingerBladeBehaviors[i]; if ((Object)(object)memoryFingerBladeBehavior == (Object)null) { continue; } PlayMakerFSM component = ((Component)memoryFingerBladeBehavior).GetComponent(); if (!((Object)(object)component == (Object)null) && !(component.FsmName != "Control")) { FsmFloat fsmFloat = component.FsmVariables.GetFsmFloat("Track Time"); if (fsmFloat != null && i < list.Count) { fsmFloat.Value = list[i]; Log.Info($"{handName} Finger Blade {i} Track Time 随机设置为 {list[i]}s"); } else { Log.Warn($"{handName} Finger Blade {i} 未找到 Track Time 变量"); } FsmBool fsmBool2 = component.FsmVariables.GetFsmBool("Special Attack"); if (fsmBool2 != null) { fsmBool2.Value = fsmBool.Value; Log.Info($"{handName} Finger Blade {i} Special Attack 同步为 {fsmBool.Value}"); } } } } private void ModifyOriginalSwipeStates() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown if (!((Object)(object)handFSM == (Object)null)) { FsmState val = ((IEnumerable)handFSM.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Swipe Dir")); if (val != null) { List list = val.Actions.ToList(); CallMethod val2 = new CallMethod(); val2.behaviour = FsmObject.op_Implicit((Object)(object)this); val2.methodName = FsmString.op_Implicit("SetFingerBladePhase2Parameters"); val2.parameters = (FsmVar[])(object)new FsmVar[0]; val2.everyFrame = false; CallMethod item = val2; list.Insert(0, (FsmStateAction)(object)item); val.Actions = list.ToArray(); Log.Info(handName + " Set Swipe L Q 状态已添加追踪参数设置"); } } } } internal class MemorySpikeFloorBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__14 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemorySpikeFloorBehavior <>4__this; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.GetComponents(); if ((Object)(object)<>4__this._controlFsm == (Object)null) { Log.Error($"[SpikeFloor {<>4__this.spikeIndex}] 未找到 Control FSM"); return false; } <>4__this.ModifyControlFSM(); <>4__this._isInitialized = true; Log.Info($"[SpikeFloor {<>4__this.spikeIndex}] 初始化完成"); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__23 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemorySpikeFloorBehavior <>4__this; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__23(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(<>4__this.chainTriggerDelay); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.TriggerNextSpike(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [Header("地刺配置")] public int spikeIndex = 0; public string idleTag = "Extra Tag"; public float chainTriggerDelay = 0.1f; private PlayMakerFSM? _controlFsm; private Transform? _spikeFloorsParent; private bool _isInitialized = false; private bool _isAttacking = false; private int _currentPhase = 1; private static bool _isSpikeSystemPaused = false; private static int _pausedPhase = 1; private FsmState? _idleState; private FsmState? _spikesEndState; private FsmEvent? _attackEvent; public static bool IsSpikeSystemPaused => _isSpikeSystemPaused; private void Start() { ((MonoBehaviour)this).StartCoroutine(DelayedSetup()); } [IteratorStateMachine(typeof(d__14))] private IEnumerator DelayedSetup() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__14(0) { <>4__this = this }; } private void GetComponents() { _controlFsm = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Control"); _spikeFloorsParent = ((Component)this).transform.parent; string[] array = ((Object)((Component)this).gameObject).name.Split(' '); if (array.Length >= 3 && int.TryParse(array[2], out var result)) { spikeIndex = result - 1; } } private void ModifyControlFSM() { if (!((Object)(object)_controlFsm == (Object)null)) { _idleState = ((IEnumerable)_controlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Idle")); _spikesEndState = ((IEnumerable)_controlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Spikes End")); _attackEvent = FsmEvent.GetFsmEvent("ATTACK"); ModifyAnticState(); ModifyTinkState(); if (_spikesEndState != null) { ModifySpikesEndState(); } else { Log.Warn($"[SpikeFloor {spikeIndex}] 未找到 Spikes End 状态"); } if (_idleState != null) { ModifyIdleState(); } _controlFsm.Fsm.InitData(); } } private void ModifyAnticState() { if ((Object)(object)_controlFsm == (Object)null) { return; } FsmState val = ((IEnumerable)_controlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Antic")); if (val == null) { Log.Warn($"[SpikeFloor {spikeIndex}] 未找到 Antic 状态"); return; } FsmStateAction[] actions = val.Actions; foreach (FsmStateAction val2 in actions) { SetIntValue val3 = (SetIntValue)(object)((val2 is SetIntValue) ? val2 : null); if (val3 != null && val3.intValue.Value == 2) { val3.intValue.Value = 4; Log.Info($"[SpikeFloor {spikeIndex}] Antic 状态 Hits 修改: 2 -> 4"); } } } private void ModifyTinkState() { if ((Object)(object)_controlFsm == (Object)null) { return; } FsmState val = ((IEnumerable)_controlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Tink")); if (val == null) { Log.Warn($"[SpikeFloor {spikeIndex}] 未找到 Tink 状态"); return; } FsmStateAction[] actions = val.Actions; foreach (FsmStateAction val2 in actions) { FloatAdd val3 = (FloatAdd)(object)((val2 is FloatAdd) ? val2 : null); if (val3 != null && Mathf.Approximately(val3.add.Value, -2.5f)) { val3.add.Value = -1f; Log.Info($"[SpikeFloor {spikeIndex}] Tink 状态 FloatAdd 修改: -2.5 -> -1"); } } } private void ModifyIdleState() { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown if (_idleState != null && !((Object)(object)_controlFsm == (Object)null)) { List list = _idleState.Actions.ToList(); list.RemoveAll((FsmStateAction a) => a is Wait); _idleState.Actions = list.ToArray(); Log.Info($"[SpikeFloor {spikeIndex}] Idle 状态已移除自动攻击"); FsmState val = ((IEnumerable)_controlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Attack Delay")); if (val != null) { CallMethod val2 = new CallMethod(); val2.behaviour = new FsmObject { Value = (Object)(object)this }; val2.methodName = new FsmString("OnAttackStart") { Value = "OnAttackStart" }; val2.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod item = val2; List list2 = val.Actions.ToList(); list2.Insert(0, (FsmStateAction)(object)item); val.Actions = list2.ToArray(); Log.Info($"[SpikeFloor {spikeIndex}] 已在 Attack Delay 状态添加攻击开始回调"); } } } private void ModifySpikesEndState() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown if (_spikesEndState != null && !((Object)(object)_controlFsm == (Object)null)) { List list = _spikesEndState.Actions.ToList(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("OnAttackEnd") { Value = "OnAttackEnd" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod item = val; list.Insert(0, (FsmStateAction)(object)item); _spikesEndState.Actions = list.ToArray(); Log.Info($"[SpikeFloor {spikeIndex}] 已修改 Spikes End 状态,添加链式触发逻辑"); } } public void OnAttackStart() { _isAttacking = true; Log.Debug($"[SpikeFloor {spikeIndex}] 攻击开始"); } public void OnAttackEnd() { _isAttacking = false; Log.Debug($"[SpikeFloor {spikeIndex}] 攻击结束,触发下一个地刺"); ((MonoBehaviour)this).StartCoroutine(TriggerNextSpikeDelayed()); } [IteratorStateMachine(typeof(d__23))] private IEnumerator TriggerNextSpikeDelayed() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__23(0) { <>4__this = this }; } private void TriggerNextSpike() { if (_isSpikeSystemPaused) { Log.Debug($"[SpikeFloor {spikeIndex}] 地刺系统暂停中,跳过触发下一个地刺"); return; } if ((Object)(object)_spikeFloorsParent == (Object)null) { Log.Warn($"[SpikeFloor {spikeIndex}] 父物体引用为空"); return; } GameObject val = FindClosestIdleSpike(); if ((Object)(object)val != (Object)null) { PlayMakerFSM val2 = FSMUtility.LocateMyFSM(val, "Control"); if ((Object)(object)val2 != (Object)null) { val2.SendEvent("ATTACK"); Log.Debug($"[SpikeFloor {spikeIndex}] 触发下一个地刺: {((Object)val).name}"); } } else { Log.Debug($"[SpikeFloor {spikeIndex}] 没有找到空闲地刺"); } } private GameObject? FindClosestIdleSpike() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_spikeFloorsParent == (Object)null) { return null; } HeroController instance = HeroController.instance; if ((Object)(object)instance == (Object)null) { return null; } Vector3 position = instance.transform.position; GameObject result = null; float num = float.MaxValue; foreach (Transform item in _spikeFloorsParent) { Transform val = item; if ((Object)(object)((Component)val).gameObject == (Object)(object)((Component)this).gameObject) { continue; } MemorySpikeFloorBehavior component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null && component._isAttacking) { continue; } PlayMakerFSM val2 = FSMUtility.LocateMyFSM(((Component)val).gameObject, "Control"); if ((Object)(object)val2 != (Object)null && val2.ActiveStateName == "Idle") { float num2 = Vector3.Distance(position, val.position); if (num2 < num) { num = num2; result = ((Component)val).gameObject; } } } return result; } public void SetPhase(int phase) { _currentPhase = phase; Log.Debug($"[SpikeFloor {spikeIndex}] 阶段设置为 {phase}"); } public void ForceAttack() { if (_isSpikeSystemPaused) { Log.Debug($"[SpikeFloor {spikeIndex}] 地刺系统暂停中,跳过强制攻击"); } else if ((Object)(object)_controlFsm != (Object)null && !_isAttacking) { _controlFsm.SendEvent("ATTACK"); Log.Debug($"[SpikeFloor {spikeIndex}] 强制触发攻击"); } } public bool IsIdle() { return !_isAttacking && (Object)(object)_controlFsm != (Object)null && _controlFsm.ActiveStateName == "Idle"; } public static void InitializeAllSpikeFloors(GameObject spikeFloorsParent) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown if ((Object)(object)spikeFloorsParent == (Object)null) { Log.Error("Spike Floors 父物体为空"); return; } int num = 0; foreach (Transform item in spikeFloorsParent.transform) { Transform val = item; MemorySpikeFloorBehavior component = ((Component)val).GetComponent(); if ((Object)(object)component == (Object)null) { component = ((Component)val).gameObject.AddComponent(); num++; } } Log.Info($"初始化了 {num} 个地刺行为组件"); } public static void TriggerSpikeAttacks(GameObject spikeFloorsParent, int count) { if ((Object)(object)spikeFloorsParent == (Object)null) { return; } MemorySpikeFloorBehavior[] componentsInChildren = spikeFloorsParent.GetComponentsInChildren(); int num = 0; MemorySpikeFloorBehavior[] array = componentsInChildren; foreach (MemorySpikeFloorBehavior memorySpikeFloorBehavior in array) { if (num >= count) { break; } if (memorySpikeFloorBehavior.IsIdle()) { memorySpikeFloorBehavior.ForceAttack(); num++; } } Log.Info($"触发了 {num}/{count} 个地刺攻击"); } public static void SetAllSpikesPhase(GameObject spikeFloorsParent, int phase) { if (!((Object)(object)spikeFloorsParent == (Object)null)) { MemorySpikeFloorBehavior[] componentsInChildren = spikeFloorsParent.GetComponentsInChildren(); MemorySpikeFloorBehavior[] array = componentsInChildren; foreach (MemorySpikeFloorBehavior memorySpikeFloorBehavior in array) { memorySpikeFloorBehavior.SetPhase(phase); } Log.Info($"设置所有地刺阶段为 P{phase}"); } } public static void PauseSpikeSystem(int currentPhase = 1) { _isSpikeSystemPaused = true; _pausedPhase = currentPhase; Log.Info($"[SpikeFloor] 地刺系统已暂停(当前阶段 P{currentPhase})"); } public static void ResumeSpikeSystem(GameObject? spikeFloorsParent) { _isSpikeSystemPaused = false; Log.Info($"[SpikeFloor] 地刺系统已恢复(阶段 P{_pausedPhase})"); if ((Object)(object)spikeFloorsParent != (Object)null) { TriggerSpikeAttacks(spikeFloorsParent, _pausedPhase); } } } internal class MemoryStunControlBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__4 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryStunControlBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__4(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SetupStunControl()); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__5 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryStunControlBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__5(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.GetComponents(); <>4__this.ModifyStunBehavior(); Log.Info("晕眩控制器行为初始化完成"); <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private PlayMakerFSM _stunControl = null; private void Awake() { } private void Start() { ((MonoBehaviour)this).StartCoroutine(DelayedSetup()); } private void Update() { } [IteratorStateMachine(typeof(d__4))] private IEnumerator DelayedSetup() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__4(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__5))] private IEnumerator SetupStunControl() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__5(0) { <>4__this = this }; } private void GetComponents() { _stunControl = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Stun Control"); if ((Object)(object)_stunControl == (Object)null) { Log.Error("未找到Stun Control FSM"); } else { Log.Info("成功获取Stun Control FSM"); } } private void ModifyStunBehavior() { if (!((Object)(object)_stunControl == (Object)null)) { _stunControl.FsmVariables.GetFsmInt("Stun Combo").Value = 6666; _stunControl.FsmVariables.GetFsmInt("Stun Hit Max").Value = 8888; } } } internal class MemoryPhaseControlBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__34 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryPhaseControlBehavior <>4__this; private float 5__1; private float 5__2; private float 5__3; private float 5__4; private Vector3 5__5; private Vector3 5__6; private Vector3 5__7; private Vector3 5__8; private Vector3 5__9; private float 5__10; private Vector3 5__11; private Vector3 5__12; private Vector3 5__13; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__34(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 1f; 5__2 = 60f; 5__3 = 1.8f; Log.Info($"开始BOSS Transform渐变 - 从Z={<>4__this._originalBossZ:F4}到{5__2:F4}, Scale从{<>4__this._originalBossScale}到{<>4__this._originalBossScale * 5__3}"); 5__4 = 0f; 5__5 = Extensions.Abs(<>4__this._originalBossScale); ((Component)<>4__this).transform.localScale = 5__5; 5__6 = Extensions.Abs(<>4__this._originalBossScale) * 5__3; 5__7 = <>4__this._originalHairScale; 5__8 = <>4__this._originalHairScale * 5__3; if ((Object)(object)<>4__this._hairTransform != (Object)null) { Log.Info($"开始Hair Transform渐变 - 从Z={<>4__this._originalHairZ:F4}到{5__2:F4}, Scale从{<>4__this._originalHairScale}到{5__8}"); } break; case 1: <>1__state = -1; break; } if (5__4 < 5__1) { 5__4 += Time.deltaTime; 5__10 = 5__4 / 5__1; 5__11 = ((Component)<>4__this).transform.position; 5__11.z = Mathf.Lerp(<>4__this._originalBossZ, 5__2, 5__10); ((Component)<>4__this).transform.position = 5__11; ((Component)<>4__this).transform.localScale = Vector3.Lerp(5__5, 5__6, 5__10); if ((Object)(object)<>4__this._hairTransform != (Object)null) { 5__12 = <>4__this._hairTransform.position; 5__12.z = Mathf.Lerp(<>4__this._originalHairZ, 5__2, 5__10); <>4__this._hairTransform.position = 5__12; <>4__this._hairTransform.localScale = Vector3.Lerp(5__7, 5__8, 5__10); } <>2__current = null; <>1__state = 1; return true; } 5__9 = ((Component)<>4__this).transform.position; 5__9.z = 5__2; ((Component)<>4__this).transform.position = 5__9; ((Component)<>4__this).transform.localScale = 5__6; if ((Object)(object)<>4__this._hairTransform != (Object)null) { 5__13 = <>4__this._hairTransform.position; 5__13.z = 5__2; <>4__this._hairTransform.position = 5__13; <>4__this._hairTransform.localScale = 5__8; Log.Info($"Hair Transform渐变完成 - Z={<>4__this._hairTransform.position.z:F4}, Scale={<>4__this._hairTransform.localScale}"); } Log.Info($"BOSS Transform渐变完成 - Z={((Component)<>4__this).transform.position.z:F4}, Scale={((Component)<>4__this).transform.localScale}"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__181 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public List pins; public float duration; private Vector3[] 5__1; private float 5__2; private int 5__3; private GameObject 5__4; private Vector3

5__5; private int 5__6; private GameObject 5__7; private float 5__8; private int 5__9; private GameObject 5__10; private Vector3 5__11; private float 5__12; private int 5__13; private GameObject 5__14; private Vector3

5__15; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__181(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__4 = null; 5__7 = null; 5__10 = null; 5__14 = null; <>1__state = -2; } private bool MoveNext() { //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (pins == null || pins.Count == 0) { return false; } if (duration <= 0f) { 5__3 = 0; while (5__3 < pins.Count) { 5__4 = pins[5__3]; if (!((Object)(object)5__4 == (Object)null)) {

5__5 = 5__4.transform.position; 5__4.transform.position = new Vector3(

5__5.x,

5__5.y, 0f); 5__4 = null; } 5__3++; } return false; } 5__1 = (Vector3[])(object)new Vector3[pins.Count]; 5__6 = 0; while (5__6 < pins.Count) { 5__7 = pins[5__6]; 5__1[5__6] = (((Object)(object)5__7 != (Object)null) ? 5__7.transform.position : Vector3.zero); 5__7 = null; 5__6++; } 5__2 = 0f; break; case 1: <>1__state = -1; break; } if (5__2 < duration) { 5__2 += Time.deltaTime; 5__8 = Mathf.SmoothStep(0f, 1f, 5__2 / duration); 5__9 = 0; while (5__9 < pins.Count) { 5__10 = pins[5__9]; if (!((Object)(object)5__10 == (Object)null)) { 5__11 = 5__1[5__9]; 5__12 = Mathf.Lerp(5__11.z, 0f, 5__8); 5__10.transform.position = new Vector3(5__11.x, 5__11.y, 5__12); 5__10 = null; } 5__9++; } <>2__current = null; <>1__state = 1; return true; } 5__13 = 0; while (5__13 < pins.Count) { 5__14 = pins[5__13]; if (!((Object)(object)5__14 == (Object)null)) {

5__15 = 5__14.transform.position; 5__14.transform.position = new Vector3(

5__15.x,

5__15.y, 0f); 5__14 = null; } 5__13++; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__61 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject heroObj; public MemoryPhaseControlBehavior <>4__this; private float 5__1; private float 5__2; private float 5__3; private float 5__4; private float 5__5; private float 5__6; private float 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__61(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)heroObj == (Object)null) { return false; } 5__1 = heroObj.transform.position.y; 5__2 = 133.57f; 5__3 = 0.3f; 5__4 = 0f; break; case 1: <>1__state = -1; break; } if (5__4 < 5__3) { 5__4 += Time.deltaTime; 5__5 = Mathf.Clamp01(5__4 / 5__3); 5__6 = 1f - Mathf.Pow(1f - 5__5, 3f); 5__7 = Mathf.Lerp(5__1, 5__2, 5__6); heroObj.transform.position = new Vector3(heroObj.transform.position.x, 5__7, heroObj.transform.position.z); <>2__current = null; <>1__state = 1; return true; } heroObj.transform.position = new Vector3(heroObj.transform.position.x, 5__2, heroObj.transform.position.z); Log.Info($"玩家平滑移动到地面完成,最终Y={heroObj.transform.position.y:F2}"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__66 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryPhaseControlBehavior <>4__this; private GameObject 5__1; private HeroController 5__2; private tk2dSpriteAnimator 5__3; private Rigidbody2D 5__4; private int 5__5; private Vector3 5__6; private float 5__7; private float 5__8; private float 5__9; private float 5__10; private float 5__11; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__66(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; 5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Expected O, but got Unknown //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Expected O, but got Unknown PlayerData instance2; switch (<>1__state) { default: return false; case 0: { <>1__state = -1; 5__1 = <>4__this.GetHeroGameObject(); 5__2 = HeroController.instance; if ((Object)(object)5__1 == (Object)null || (Object)(object)5__2 == (Object)null) { Log.Error("ClimbPhasePlayerAnimationCoroutine: 无法获取玩家对象"); return false; } 5__3 = 5__1.GetComponent(); 5__4 = 5__1.GetComponent(); Log.Info("开始穿墙下落序列"); 5__5 = 5__1.layer; 5__6 = 5__1.transform.position; 5__1.layer = LayerMask.NameToLayer("Ignore Raycast"); PlayerData instance = PlayerData.instance; if (instance != null) { instance.SetBool("isInvincible", true); } if ((Object)(object)5__4 != (Object)null) { 5__7 = 40f; 5__8 = 5__6.x; 5__9 = 2.15f; 5__10 = 5__7 - 5__8; 5__11 = 5__10 / 5__9; 5__4.linearVelocity = new Vector2(5__11, 5__4.linearVelocity.y); Log.Info($"玩家下落计算 - 当前位置:({5__8:F2}, {5__6.y:F2}), 目标X:{5__7}, X轴速度:{5__11:F2}"); } <>4__this.TryPlayAnimation(5__3, "Weak Fall"); goto IL_0226; } case 1: <>1__state = -1; goto IL_0226; case 2: <>1__state = -1; goto IL_02e7; case 3: <>1__state = -1; goto IL_03e2; case 4: <>1__state = -1; goto IL_041e; case 5: { <>1__state = -1; break; } IL_0226: if ((Object)(object)5__1 != (Object)null && 5__1.transform.position.y >= 57f) { <>2__current = null; <>1__state = 1; return true; } if ((Object)(object)5__1 == (Object)null) { return false; } 5__1.layer = 5__5; instance2 = PlayerData.instance; if (instance2 != null) { instance2.SetBool("isInvincible", false); } Log.Info($"玩家 Y < 57,恢复原始图层: {5__5},当前位置: {5__1.transform.position.y}"); goto IL_02e7; IL_041e: if (<>4__this.TryPlayAnimation(5__3, "GetUpToIdle")) { <>2__current = (object)new WaitForSeconds(0.3f); <>1__state = 5; return true; } break; IL_02e7: if ((Object)(object)5__1 != (Object)null && 5__1.transform.position.y > 53.8f) { <>2__current = null; <>1__state = 2; return true; } if ((Object)(object)5__1 == (Object)null) { return false; } Log.Info($"玩家落地,最终位置: {5__1.transform.position.y}"); if ((Object)(object)5__4 != (Object)null) { 5__4.linearVelocity = new Vector2(0f, 5__4.linearVelocity.y); } if (!((Object)(object)5__3 != (Object)null)) { break; } if (<>4__this.TryPlayAnimation(5__3, "FallToProstrate")) { <>2__current = (object)new WaitForSeconds(1f); <>1__state = 3; return true; } goto IL_03e2; IL_03e2: if (<>4__this.TryPlayAnimation(5__3, "ProstrateRiseToKneel")) { <>2__current = (object)new WaitForSeconds(1f); <>1__state = 4; return true; } goto IL_041e; } GameManager instance3 = GameManager._instance; if (instance3 != null) { InputHandler inputHandler = instance3.inputHandler; if (inputHandler != null) { inputHandler.StartAcceptingInput(); } } 5__2.RegainControl(); 5__2.StartAnimationControl(); if ((Object)(object)<>4__this._attackControl != (Object)null && !<>4__this._climbAttackEventSent) { <>4__this._attackControl.SendEvent("CLIMB PHASE ATTACK"); <>4__this._climbAttackEventSent = true; Log.Info("玩家恢复可移动,已发送 CLIMB PHASE ATTACK 事件到 Attack Control FSM"); } Log.Info("玩家动画控制完成,恢复控制权和输入"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__13 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FsmState roarState; public MemoryPhaseControlBehavior <>4__this; private int 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)<>4__this._attackControlBehavior == (Object)null) { <>4__this._attackControlBehavior = ((Component)<>4__this).gameObject.GetComponent(); } 5__1 = 0; break; case 2: <>1__state = -1; <>4__this._attackControlBehavior = ((Component)<>4__this).gameObject.GetComponent(); 5__1++; break; } if ((Object)(object)<>4__this._attackControlBehavior == (Object)null && 5__1 < 10) { <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 2; return true; } if ((Object)(object)<>4__this._attackControlBehavior == (Object)null) { Log.Error("延迟1秒后仍无法获取 AttackControlBehavior,Big Silk Ball Roar 状态可能缺少音效动作"); return false; } Log.Info("延迟添加 Big Silk Ball Roar 状态的动作"); <>4__this.AddBigSilkBallRoarActions(roarState); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__53 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FsmState catchEffectState; public MemoryPhaseControlBehavior <>4__this; private List 5__1; private PlayRandomAudioClipTable 5__2; private PlayAudioEvent 5__3; private PlayAudioEvent 5__4; private PlayAudioEvent 5__5; private PlayAudioEvent 5__6; private List 5__7; private int 5__8; private int 5__9; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__53(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; 5__4 = null; 5__5 = null; 5__6 = null; 5__7 = null; <>1__state = -2; } private bool MoveNext() { int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; 5__8++; } else { <>1__state = -1; if ((Object)(object)<>4__this._attackControlBehavior == (Object)null) { <>4__this._attackControlBehavior = ((Component)<>4__this).gameObject.GetComponent(); } if (!((Object)(object)<>4__this._attackControlBehavior != (Object)null)) { goto IL_00c0; } 5__8 = 0; } if (!<>4__this._attackControlBehavior.IsAttackControlFsmReady && 5__8 < 50) { <>2__current = null; <>1__state = 1; return true; } goto IL_00c0; IL_00c0: if ((Object)(object)<>4__this._attackControlBehavior == (Object)null || !<>4__this._attackControlBehavior.IsAttackControlFsmReady) { Log.Warn("无法获取 AttackControlBehavior 或其未初始化,Climb Catch Effect 音频动作未添加"); return false; } 5__1 = new List(); 5__2 = <>4__this._attackControlBehavior.CloneActionFromAttackControlFSM("Catch", 0, (Func?)null); 5__3 = <>4__this._attackControlBehavior.CloneActionFromAttackControlFSM("Catch", 0, (Func?)null); 5__4 = <>4__this._attackControlBehavior.CloneActionFromAttackControlFSM("Catch", 1, (Func?)null); 5__5 = <>4__this._attackControlBehavior.CloneActionFromAttackControlFSM("Catch", 2, (Func?)null); 5__6 = <>4__this._attackControlBehavior.CloneActionFromAttackControlFSM("Catch", 3, (Func?)null); if (5__2 != null) { 5__1.Add((FsmStateAction)(object)5__2); } if (5__3 != null) { 5__1.Add((FsmStateAction)(object)5__3); } if (5__4 != null) { 5__1.Add((FsmStateAction)(object)5__4); } if (5__5 != null) { 5__1.Add((FsmStateAction)(object)5__5); } if (5__6 != null) { 5__1.Add((FsmStateAction)(object)5__6); } 5__7 = new List(); 5__9 = 0; while (5__9 < catchEffectState.Actions.Length - 1) { 5__7.Add(catchEffectState.Actions[5__9]); 5__9++; } 5__7.AddRange(5__1); 5__7.Add(catchEffectState.Actions[catchEffectState.Actions.Length - 1]); catchEffectState.Actions = 5__7.ToArray(); catchEffectState.SaveActions(); catchEffectState.LoadActions(); Log.Info($"爬升阶段:Catch 音频动作已延迟添加({5__1.Count}个)"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__120 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryPhaseControlBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__120(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SetupPhaseControl()); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__28 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryPhaseControlBehavior <>4__this; private MemoryBigSilkBallBehavior 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__28(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)<>4__this._currentBigSilkBall != (Object)null) { 5__1 = <>4__this._currentBigSilkBall.GetComponent(); if ((Object)(object)5__1 != (Object)null) { 5__1.StartCharge(); Log.Info("大丝球开始蓄力"); } 5__1 = null; } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__178 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Vector3 center; public MemoryPhaseControlBehavior <>4__this; private float 5__1; private int 5__2; private float[] 5__3; private int 5__4; private float 5__5; private float 5__6; private float 5__7; private float 5__8; private float 5__9; private int 5__10; private float 5__11; private float 5__12; private float 5__13; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__178(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 0f; 5__2 = <>4__this._pinArrayAllPins.Count; if (5__2 == 0) { return false; } 5__3 = new float[5__2]; 5__4 = 0; while (5__4 < 5__2) { 5__3[5__4] = MathF.PI * 2f / (float)5__2 * (float)5__4; EnablePinRenderers(<>4__this._pinArrayAllPins[5__4]); 5__4++; } goto IL_0270; case 1: <>1__state = -1; goto IL_0270; case 2: { <>1__state = -1; Log.Info("[PinArray] 展开动画完成"); return false; } IL_0270: if (5__1 < 2.5f) { 5__1 += Time.deltaTime; 5__5 = Mathf.SmoothStep(0f, 1f, 5__1 / 2.5f); 5__6 = 180f * 5__1; 5__7 = 5__6 * (MathF.PI / 180f); 5__8 = Mathf.Lerp(2f, 18f, 5__5); 5__9 = Mathf.Lerp(2f, 6.2999997f, 5__5); 5__10 = 0; while (5__10 < 5__2) { if (!((Object)(object)<>4__this._pinArrayAllPins[5__10] == (Object)null)) { 5__11 = 5__3[5__10] + 5__7; 5__12 = Mathf.Cos(5__11) * 5__8; 5__13 = Mathf.Sin(5__11) * 5__9; <>4__this._pinArrayAllPins[5__10].transform.position = center + new Vector3(5__12, 0f, 5__13); } 5__10++; } <>2__current = null; <>1__state = 1; return true; } <>2__current = AnimatePinsZToZero(<>4__this._pinArrayAllPins, 0.3f); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__184 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryPhaseControlBehavior <>4__this; private List 5__1; private int 5__2; private float 5__3; private int 5__4; private int 5__5; private int 5__6; private GameObject 5__7; private int 5__8; private GameObject 5__9; private PlayMakerFSM 5__10; private bool 5__11; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__184(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__7 = null; 5__9 = null; 5__10 = null; <>1__state = -2; } private bool MoveNext() { //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Expected O, but got Unknown int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; 5__4++; if (5__4 % 2 == 0 && 5__3 > 0.05f) { 5__3 = Mathf.Max(0.05f, 5__3 - 0.05f); } 5__9 = null; 5__10 = null; goto IL_029e; } <>1__state = -1; 5__1 = new List(<>4__this._pinArrayAllPins); 5__5 = 5__1.Count - 1; while (5__5 > 0) { 5__6 = Random.Range(0, 5__5 + 1); 5__7 = 5__1[5__5]; 5__1[5__5] = 5__1[5__6]; 5__1[5__6] = 5__7; 5__7 = null; 5__5--; } 5__2 = 5__1.Count; 5__1.RemoveAll((GameObject pin) => (Object)(object)pin == (Object)null); if (5__1.Count != 5__2) { Log.Warn($"[PinArray] FireAllPinsSequentially: 跳过 {5__2 - 5__1.Count} 把无效针"); } 5__3 = 0.5f; 5__4 = 0; 5__8 = 0; goto IL_02ae; IL_02ae: if (5__8 < 5__1.Count) { 5__9 = 5__1[5__8]; if (!((Object)(object)5__9 == (Object)null)) { 5__10 = FSMUtility.LocateMyFSM(5__9, "Control"); if ((Object)(object)5__10 != (Object)null) { 5__10.SendEvent("ATTACK"); } else { Log.Warn("[PinArray] FireAllPinsSequentially: Pin 缺少 Control FSM"); } 5__11 = 5__8 < 5__1.Count - 1; if (5__11) { <>2__current = (object)new WaitForSeconds(5__3); <>1__state = 1; return true; } } goto IL_029e; } Log.Info($"[PinArray] 所有 {5__1.Count} 把针发射完成"); return false; IL_029e: 5__8++; goto IL_02ae; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__182 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryPhaseControlBehavior <>4__this; private List.Enumerator <>s__1; private GameObject 5__2; private PlayMakerFSM 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__182(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = default(List.Enumerator); 5__2 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>s__1 = <>4__this._pinArrayWaveAPins.GetEnumerator(); try { while (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; if (!((Object)(object)5__2 == (Object)null)) { 5__2.transform.rotation = Quaternion.Euler(0f, 0f, -90f); 5__3 = FSMUtility.LocateMyFSM(5__2, "Control"); if ((Object)(object)5__3 != (Object)null) { 5__3.SendEvent("PINARRAY_SLAM"); } 5__3 = null; 5__2 = null; } } } finally { ((IDisposable)<>s__1).Dispose(); } <>s__1 = default(List.Enumerator); Log.Info($"[PinArray] WaveA {<>4__this._pinArrayWaveAPins.Count} 把针开始砸地"); <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__73 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryPhaseControlBehavior <>4__this; private GameObject 5__1; private float 5__2; private Animator 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__73(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = <>4__this.GetHeroGameObject(); if ((Object)(object)5__1 == (Object)null || (Object)(object)<>4__this._collapseGate == (Object)null) { Log.Warn("无法监控玩家X坐标或collapse_gate为null"); return false; } Log.Info("开始监控玩家X坐标以恢复collapse_gate"); break; case 1: <>1__state = -1; break; } if ((Object)(object)5__1 != (Object)null && (Object)(object)<>4__this._collapseGate != (Object)null) { 5__2 = 5__1.transform.position.x; if (5__2 > 20f && !<>4__this._collapseGate.activeSelf) { <>4__this._collapseGate.SetActive(true); 5__3 = <>4__this._collapseGate.GetComponent(); if ((Object)(object)5__3 != (Object)null) { ((Behaviour)5__3).enabled = false; } Log.Info($"玩家X坐标 > 20 ({5__2:F2}),已恢复collapse_gate GameObject,Animator保持禁用"); return false; } <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__72 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryPhaseControlBehavior <>4__this; private Vector3 5__1; private Vector3 5__2; private float 5__3; private float 5__4; private MemoryBossBehavior 5__5; private float 5__6; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__72(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("开始快速移动Boss回到战斗场地"); 5__1 = ((Component)<>4__this).transform.position; 5__2 = new Vector3(5__1.x, 136f, 5__1.z); 5__3 = 1.5f; 5__4 = 0f; break; case 1: <>1__state = -1; break; } if (5__4 < 5__3) { 5__4 += Time.deltaTime; 5__6 = Mathf.SmoothStep(0f, 1f, 5__4 / 5__3); ((Component)<>4__this).transform.position = Vector3.Lerp(5__1, 5__2, 5__6); <>2__current = null; <>1__state = 1; return true; } ((Component)<>4__this).transform.position = 5__2; Log.Info($"Boss已回到战斗场地: {((Component)<>4__this).transform.position}"); 5__5 = ((Component)<>4__this).GetComponent(); if ((Object)(object)5__5 != (Object)null) { 5__5.EnableBossCollider(); } if ((Object)(object)<>4__this._attackControl != (Object)null) { <>4__this._attackControl.SendEvent("CLIMB PHASE END"); Log.Info("Boss完全恢复,已发送 CLIMB PHASE END 到 Attack Control 恢复攻击"); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__186 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryPhaseControlBehavior <>4__this; private float 5__1; private float 5__2; private int 5__3; private GameObject 5__4; private PlayMakerFSM 5__5; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__186(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__4 = null; 5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = CalculateSequentialFireDuration(<>4__this._pinArrayAllPins.Count); 5__2 = 5__1 / 6f; 5__3 = 0; goto IL_012b; case 2: { <>1__state = -1; 5__4 = null; 5__5 = null; goto IL_011b; } IL_012b: if (5__3 < <>4__this._allFingerBlades.Length) { 5__4 = <>4__this._allFingerBlades[5__3]; if ((Object)(object)5__4 == (Object)null) { goto IL_011b; } 5__5 = FSMUtility.LocateMyFSM(5__4, "Control"); if ((Object)(object)5__5 != (Object)null) { 5__5.SendEvent("PINARRAY_ATTACK"); } <>2__current = (object)new WaitForSeconds(5__2); <>1__state = 2; return true; } return false; IL_011b: 5__3++; goto IL_012b; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__176 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryPhaseControlBehavior <>4__this; private Vector3 5__1; private Vector3
5__2; private GameObject 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__176(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = ARENA_CENTER;
5__2 = new Vector3(5__1.x, 5__1.y + 8f, 5__1.z); <>2__current = <>4__this.SpawnAllPins(
5__2); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = <>4__this.ExpandPinArray(
5__2); <>1__state = 2; return true; case 2: <>1__state = -1; <>2__current = <>4__this.FireWaveASlam(); <>1__state = 3; return true; case 3: <>1__state = -1; <>2__current = (object)new WaitForSeconds(1.2f); <>1__state = 4; return true; case 4: <>1__state = -1; <>4__this.SendEventToWaveB("PINARRAY_LIFT"); <>2__current = (object)new WaitForSeconds(0.8f); <>1__state = 5; return true; case 5: <>1__state = -1; if (<>4__this._pinArrayBladeAttackCoroutine != null) { ((MonoBehaviour)<>4__this).StopCoroutine(<>4__this._pinArrayBladeAttackCoroutine); } <>4__this._pinArrayBladeAttackCoroutine = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.PinArrayFingerBladeAttackCoroutine()); <>2__current = <>4__this.FireAllPinsSequentially(); <>1__state = 6; return true; case 6: <>1__state = -1; <>2__current = (object)new WaitForSeconds(2f); <>1__state = 7; return true; case 7: { <>1__state = -1; GameObject? bossScene = <>4__this._bossScene; object obj; if (bossScene == null) { obj = null; } else { Transform obj2 = bossScene.transform.Find("Spike Floors"); obj = ((obj2 != null) ? ((Component)obj2).gameObject : null); } 5__3 = (GameObject)obj; MemorySpikeFloorBehavior.ResumeSpikeSystem(5__3); Log.Info("[PinArray] 大招主流程完成"); if ((Object)(object)<>4__this._phaseControl != (Object)null) { <>4__this._phaseControl.SendEvent("PIN_ARRAY_START_DONE"); } return false; } } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__38 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryPhaseControlBehavior <>4__this; private float 5__1; private Vector3 5__2; private Vector3 5__3; private float 5__4; private Vector3 5__5; private Vector3 5__6; private float 5__7; private float 5__8; private Vector3 5__9; private float 5__10; private Vector3 5__11; private Vector3 5__12; private Vector3 5__13; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__38(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 2f; 5__2 = ((Component)<>4__this).transform.position; 5__3 = ((Component)<>4__this).transform.localScale; 5__4 = 5__2.z; Log.Info($"开始恢复BOSS Transform - 从Z={5__2.z:F4}到{<>4__this._originalBossZ:F4}, Scale从{5__3}到(1,1,1)"); 5__5 = Vector3.zero; 5__6 = Vector3.one; 5__7 = 0f; if ((Object)(object)<>4__this._hairTransform != (Object)null) { 5__5 = <>4__this._hairTransform.position; 5__6 = <>4__this._hairTransform.localScale; 5__7 = 5__5.z; Log.Info($"开始恢复Hair Transform - 从Z={5__5.z:F4}到{<>4__this._originalHairZ:F4}, Scale从{5__6}到(1,1,1)"); } 5__8 = 0f; break; case 1: <>1__state = -1; break; } if (5__8 < 5__1) { 5__8 += Time.deltaTime; 5__10 = 5__8 / 5__1; 5__11 = ((Component)<>4__this).transform.position; 5__11.z = Mathf.Lerp(5__4, <>4__this._originalBossZ, 5__10); ((Component)<>4__this).transform.position = 5__11; ((Component)<>4__this).transform.localScale = Vector3.Lerp(5__3, Vector3.one, 5__10); if ((Object)(object)<>4__this._hairTransform != (Object)null) { 5__12 = <>4__this._hairTransform.position; 5__12.z = Mathf.Lerp(5__7, <>4__this._originalHairZ, 5__10); <>4__this._hairTransform.position = 5__12; <>4__this._hairTransform.localScale = Vector3.Lerp(5__6, Vector3.one, 5__10); } <>2__current = null; <>1__state = 1; return true; } 5__9 = ((Component)<>4__this).transform.position; 5__9.z = <>4__this._originalBossZ; ((Component)<>4__this).transform.position = 5__9; ((Component)<>4__this).transform.localScale = Vector3.one; if ((Object)(object)<>4__this._hairTransform != (Object)null) { 5__13 = <>4__this._hairTransform.position; 5__13.z = <>4__this._originalHairZ; <>4__this._hairTransform.position = 5__13; <>4__this._hairTransform.localScale = Vector3.one; Log.Info($"Hair Transform恢复完成 - Z={<>4__this._hairTransform.position.z:F4}, Scale={<>4__this._hairTransform.localScale}"); } Log.Info($"BOSS Transform恢复完成 - Z={((Component)<>4__this).transform.position.z:F4}, Scale={((Component)<>4__this).transform.localScale}"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__23 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryPhaseControlBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__23(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(3.5f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.SendBladesReturnToAllFingerBlades(); Log.Info("第一次发送 BLADES RETURN(针对Stagger Finish状态)"); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.SendBladesReturnToAllFingerBlades(); Log.Info("第二次发送 BLADES RETURN(针对Rise状态)"); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__121 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryPhaseControlBehavior <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__121(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.GetComponents(); <>4__this.GetBigSilkBallManager(); <>4__this.GetBossControlFSM(); <>4__this.ModifyPhaseBehavior(); <>4__this.AddBigSilkBallStates(); <>4__this.AddClimbPhaseStates(); <>4__this.AddPinArraySpecialStates(); Log.Info("阶段控制器行为初始化完成"); <>4__this._phaseControl.Fsm.InitData(); <>4__this._phaseControl.FsmVariables.Init(); <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__177 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Vector3 center; public MemoryPhaseControlBehavior <>4__this; private int 5__1; private float 5__2; private float 5__3; private Vector2 5__4; private Vector3 5__5; private GameObject 5__6; private PlayMakerFSM 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__177(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__6 = null; 5__7 = null; <>1__state = -2; } private bool MoveNext() { //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this._pinArrayAllPins.Clear(); <>4__this._pinArrayWaveAPins.Clear(); <>4__this._pinArrayWaveBPins.Clear(); if ((Object)(object)<>4__this._pinManager == (Object)null || !<>4__this._pinManager.IsInitialized) { Log.Warn("[PinArray] FWPinManager 未就绪"); return false; } 5__1 = 0; while (5__1 < 40) { 5__2 = 9f * (float)5__1; 5__3 = 5__2 * (MathF.PI / 180f); 5__4 = new Vector2(Mathf.Cos(5__3), Mathf.Sin(5__3)); 5__5 = center + new Vector3(5__4.x, 0f, 5__4.y) * 2f; 5__6 = <>4__this._pinManager.SpawnPinProjectile(5__5); if ((Object)(object)5__6 != (Object)null) { 5__7 = FSMUtility.LocateMyFSM(5__6, "Control"); if ((Object)(object)5__7 == (Object)null) { Log.Warn($"[PinArray] 生成 Pin 但未找到 Control FSM: id={((Object)5__6).GetInstanceID()}"); } 5__6.transform.rotation = Quaternion.Euler(0f, 0f, -90f); EnablePinRenderers(5__6); DisablePinThreadRenderers(5__6); <>4__this._pinArrayAllPins.Add(5__6); if (5__1 % 2 == 0) { <>4__this._pinArrayWaveAPins.Add(5__6); } else { <>4__this._pinArrayWaveBPins.Add(5__6); } 5__7 = null; } 5__6 = null; 5__1++; } Log.Info($"[PinArray] 生成 {<>4__this._pinArrayAllPins.Count} 把针(WaveA: {<>4__this._pinArrayWaveAPins.Count}, WaveB: {<>4__this._pinArrayWaveBPins.Count})"); <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__76 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float duration; public MemoryPhaseControlBehavior <>4__this; private GameObject 5__1; private float 5__2; private float 5__3; private float[] 5__4; private Vector3 5__5; private Vector3[] 5__6; private int 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__76(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__4 = null; 5__6 = null; <>1__state = -2; } private bool MoveNext() { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = <>4__this.GetHeroGameObject(); if ((Object)(object)5__1 == (Object)null) { Log.Warn("无法获取玩家对象,无法更新丝线位置"); return false; } 5__2 = 0f; 5__3 = 10f; 5__4 = new float[5] { 180f, -45f, -135f, 45f, 135f }; break; case 1: <>1__state = -1; break; } if (5__2 < duration) { if ((Object)(object)5__1 != (Object)null) { 5__5 = 5__1.transform.position; 5__6 = (Vector3[])(object)new Vector3[5] { 5__5 + new Vector3(0f, 5__3, 0f), 5__5 + new Vector3(0f - 5__3, 5__3, 0f), 5__5 + new Vector3(5__3, 5__3, 0f), 5__5 + new Vector3(0f - 5__3, 0f - 5__3, 0f), 5__5 + new Vector3(5__3, 0f - 5__3, 0f) }; 5__7 = 0; while (5__7 < 5) { if ((Object)(object)<>4__this._silkYankClones[5__7] != (Object)null && <>4__this._silkYankClones[5__7].activeSelf) { <>4__this._silkYankClones[5__7].transform.position = 5__6[5__7]; <>4__this._silkYankClones[5__7].transform.rotation = Quaternion.Euler(0f, 0f, 5__4[5__7]); } 5__7++; } 5__6 = null; } 5__2 += Time.deltaTime; <>2__current = null; <>1__state = 1; return true; } Log.Info($"丝线跟随完成,持续时间: {duration}秒"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__31 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public MemoryPhaseControlBehavior <>4__this; private float 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__31(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; Log.Info("开始等待大丝球完成..."); <>4__this._chargeComplete = false; <>4__this._burstComplete = false; 5__1 = 0f; goto IL_00ab; case 1: <>1__state = -1; goto IL_00ab; case 2: { <>1__state = -1; break; } IL_00ab: if (!<>4__this._chargeComplete) { 5__1 += Time.deltaTime; if (!(5__1 > 5f)) { <>2__current = null; <>1__state = 1; return true; } Log.Warn("等待蓄力完成超时(5秒),强制继续"); } Log.Info($"确认蓄力完成(等待时间: {5__1:F2}s),等待爆炸..."); 5__1 = 0f; break; } if (!<>4__this._burstComplete) { 5__1 += Time.deltaTime; if (!(5__1 > 15f)) { <>2__current = null; <>1__state = 2; return true; } Log.Warn("等待爆炸完成超时(15秒),强制继续"); } Log.Info($"确认爆炸完成(等待时间: {5__1:F2}s),大招结束"); if ((Object)(object)<>4__this._phaseControl != (Object)null) { <>4__this._phaseControl.SendEvent("BIG SILK BALL COMPLETE"); Log.Info("已发送 BIG SILK BALL COMPLETE 事件到 Phase Control FSM"); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private GameObject? _collapseGate; private bool _collapseGateDisabled = false; private bool _climbPhaseCompleted = false; private PlayMakerFSM _phaseControl = null; private FsmInt _currentPhase = FsmInt.op_Implicit(1); private bool[] _phaseFlags = new bool[9]; private bool _hpModified = false; private BigSilkBallManager? _bigSilkBallManager; private GameObject? _currentBigSilkBall; private bool _bigSilkBallTriggered = false; private int _originalLayer = 11; private bool _chargeComplete = false; private bool _burstComplete = false; private float _originalBossZ = 0f; private Vector3 _originalBossScale; private GameObject? _bossHaze; private GameObject? _bossHaze2; private Transform? _hairTransform; private float _originalHairZ = 0f; private Vector3 _originalHairScale; private GameObject? _handLObj; private GameObject? _handRObj; private GameObject[] _allFingerBlades = (GameObject[])(object)new GameObject[6]; private PlayMakerFSM? _attackControl; private MemoryAttackControlBehavior? _attackControlBehavior; private bool _climbCompleteEventSent = false; private bool _climbAttackEventSent = false; private PlayMakerFSM? _bossControl; private GameObject? _bossScene; private GameObject? _webStrandCatchEffect; private FsmGameObject? _fsmWebStrandCatchEffect; private GameObject? _silkYankPrefab; private GameObject[] _silkYankClones = (GameObject[])(object)new GameObject[5]; private bool _silkYankInitialized = false; private FsmGameObject[] _fsmSilkYankClones = (FsmGameObject[])(object)new FsmGameObject[5]; private FsmGameObject? _fsmHero; private FsmFloat? _fsmHeroX; private FsmFloat? _fsmHeroY; private GameObject? _globalHero; private FsmBool? _pinArraySpecialAvailableVar; private FsmEvent? _pinArrayCheckHpEvent; private FsmEvent? _pinArraySkipEvent; private FsmEvent? _startPinArraySpecialEvent; private FsmEvent? _pinArrayRoarDoneEvent; private FsmEvent? _pinArrayStartDoneEvent; private FsmState? _pinArrayHpCheckEntryState; private FsmState? _pinArrayHpCheck400State; private FsmState? _pinArrayRoarState; private FsmState? _pinArrayRoarWaitState; private FsmState? _pinArrayPrepareState; private FsmState? _pinArrayStartState; private FsmState? _pinArrayEndState; private Coroutine? _pinArrayBladeAttackCoroutine; private Coroutine? _pinArrayMainCoroutine; private List _pinArrayAllPins = new List(); private List _pinArrayWaveAPins = new List(); private List _pinArrayWaveBPins = new List(); private FWPinManager? _pinManager; private const int PIN_ARRAY_COUNT = 40; private const float PIN_ARRAY_INITIAL_RADIUS = 2f; private const float PIN_ARRAY_FINAL_RADIUS = 18f; private const float PIN_ARRAY_EXPAND_DURATION = 2.5f; private const float PIN_ARRAY_EXPAND_ROTATION_SPEED = 180f; private const float PIN_ARRAY_Z_SCALE = 0.35f; private static readonly Vector3 ARENA_CENTER = new Vector3(40f, 139f, 0f); private const float PIN_ARRAY_CENTER_Y_OFFSET = 8f; private const float PIN_FIRE_INTERVAL_START = 0.5f; private const float PIN_FIRE_INTERVAL_MIN = 0.05f; private const float PIN_FIRE_INTERVAL_STEP = 0.05f; private const int PIN_FIRE_INTERVAL_BATCH = 2; private void GetBigSilkBallManager() { GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { _bigSilkBallManager = val.GetComponent(); if ((Object)(object)_bigSilkBallManager != (Object)null) { Log.Info("PhaseControl: 成功获取 BigSilkBallManager"); } else { Log.Warn("PhaseControl: 未找到 BigSilkBallManager 组件"); } } } private void AddBigSilkBallStates() { if ((Object)(object)_phaseControl == (Object)null) { Log.Error("Phase Control FSM 未初始化,无法添加大招状态"); return; } Log.Info("=== 开始添加大丝球大招状态序列 ==="); FsmState val = FsmStateBuilder.FindState(_phaseControl, "Set P3 Web Strand"); FsmState val2 = FsmStateBuilder.FindState(_phaseControl, "P3"); if (val == null) { Log.Error("未找到 Set P3 Web Strand 状态"); return; } if (val2 == null) { Log.Error("未找到 P3 状态"); return; } RegisterBigSilkBallEvents(); FsmState[] array = FsmStateBuilder.CreateStates(_phaseControl.Fsm, ("P2.5", "P2.5阶段:监听TOOK DAMAGE触发血量检查"), ("HP Check 2.5", "检查血量:<=200触发大招,>200回到P2.5"), ("Big Silk Ball Roar", "大招前怒吼"), ("Big Silk Ball Roar End", "大招怒吼结束"), ("Big Silk Ball Prepare", "大招准备:停止攻击、设置无敌"), ("Big Silk Ball Move To Center", "Boss移动到中间高处"), ("Big Silk Ball Spawn", "生成大丝球并开始蓄力"), ("Big Silk Ball Wait", "等待大丝球爆炸和小丝球生成"), ("Big Silk Ball End", "大招结束:清理和恢复Layer"), ("Big Silk Ball Return", "BOSS从背景返回前景")); FsmState val3 = array[0]; FsmState hpCheck25State = array[1]; FsmState val4 = array[2]; FsmState roarEndState = array[3]; FsmState prepareState = array[4]; FsmState moveToCenterState = array[5]; FsmState spawnState = array[6]; FsmState waitState = array[7]; FsmState endState = array[8]; FsmState returnState = array[9]; FsmStateBuilder.AddStatesToFsm(_phaseControl, array); FsmStateBuilder.SetFinishedTransition(val, val3); Log.Info("已修改 Set P3 Web Strand -> P2.5"); AddP25Actions(val3); AddHPCheck25Actions(hpCheck25State); AddBigSilkBallRoarEndActions(roarEndState); AddBigSilkBallPrepareActions(prepareState); AddBigSilkBallMoveToCenterActions(moveToCenterState); AddBigSilkBallSpawnActions(spawnState); AddBigSilkBallWaitActions(waitState); AddBigSilkBallEndActions(endState); AddBigSilkBallReturnActions(returnState); AddP25Transitions(val3, hpCheck25State); AddHPCheck25Transitions(hpCheck25State, val3, val4); AddBigSilkBallTransitions(prepareState, moveToCenterState, spawnState, waitState, endState, returnState, val2, val4, roarEndState); ((MonoBehaviour)this).StartCoroutine(DelayedAddBigSilkBallRoarActions(val4)); Log.Info("=== 大丝球大招状态序列添加完成 ==="); } private void AddP25Actions(FsmState p25State) { p25State.Actions = (FsmStateAction[])(object)new FsmStateAction[0]; } private void AddHPCheck25Actions(FsmState hpCheck25State) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown List list = new List(); FsmGameObject val = new FsmGameObject("Self"); val.Value = ((Component)this).gameObject; CompareHP item = new CompareHP { enemy = val, integer2 = new FsmInt(FsmInt.op_Implicit(200)), lessThan = FsmEvent.GetFsmEvent("START BIG SILK BALL"), equal = FsmEvent.GetFsmEvent("START BIG SILK BALL"), greaterThan = FsmEvent.Finished, everyFrame = false }; list.Add((FsmStateAction)(object)item); hpCheck25State.Actions = list.ToArray(); } private void AddP25Transitions(FsmState p25State, FsmState hpCheck25State) { p25State.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("TOOK DAMAGE"), hpCheck25State) }; } private void AddHPCheck25Transitions(FsmState hpCheck25State, FsmState p25State, FsmState bigSilkBallRoarState) { hpCheck25State.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateFinishedTransition(p25State), FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("START BIG SILK BALL"), bigSilkBallRoarState) }; } private void AddBigSilkBallPrepareActions(FsmState prepareState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected O, but got Unknown //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Expected O, but got Unknown //IL_01a0: Expected O, but got Unknown //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Expected O, but got Unknown //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Expected O, but got Unknown //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Expected O, but got Unknown //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Expected O, but got Unknown //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Expected O, but got Unknown //IL_0236: Expected O, but got Unknown //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Expected O, but got Unknown //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Expected O, but got Unknown //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Expected O, but got Unknown //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Expected O, but got Unknown //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Expected O, but got Unknown //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Expected O, but got Unknown //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Expected O, but got Unknown //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Expected O, but got Unknown //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Expected O, but got Unknown //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SaveOriginalLayer") { Value = "SaveOriginalLayer" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("DisableBossHaze") { Value = "DisableBossHaze" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("AddBossHealth") { Value = "AddBossHealth" }; val.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar(typeof(int)) { intValue = 200 } }; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SpawnBigSilkBall") { Value = "SpawnBigSilkBall" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" } }, sendEvent = new FsmString("ATTACK STOP") { Value = "ATTACK STOP" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" } }, sendEvent = new FsmString("BIG SILK BALL LOCK") { Value = "BIG SILK BALL LOCK" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SetLayer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, layer = 2 }); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.5f)), finishEvent = FsmEvent.Finished }); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SendSilkStunnedToAllFingerBlades") { Value = "SendSilkStunnedToAllFingerBlades" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Insert(0, (FsmStateAction)(object)val); prepareState.Actions = list.ToArray(); } private void AddBigSilkBallMoveToCenterActions(FsmState moveToCenterState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Expected O, but got Unknown //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Expected O, but got Unknown //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Expected O, but got Unknown //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Expected O, but got Unknown //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Expected O, but got Unknown //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Expected O, but got Unknown //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Expected O, but got Unknown //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Expected O, but got Unknown //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Expected O, but got Unknown //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Expected O, but got Unknown //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Expected O, but got Unknown //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Expected O, but got Unknown //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Expected O, but got Unknown //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SaveBossOriginalState") { Value = "SaveBossOriginalState" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = FsmVector2.op_Implicit(new Vector2(0f, 0f)), x = new FsmFloat { UseVariable = false }, y = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new Tk2dPlayAnimationWithEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Drift F") { Value = "Drift F" }, animationCompleteEvent = null, animationTriggerEvent = null }); list.Add((FsmStateAction)new AnimateXPositionTo { GameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, ToValue = new FsmFloat(FsmFloat.op_Implicit(39.5f)), localSpace = false, time = new FsmFloat(FsmFloat.op_Implicit(1f)), speed = new FsmFloat(FsmFloat.op_Implicit(8f)), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), easeType = (EaseType)21, reverse = new FsmBool(FsmBool.op_Implicit(false)), realTime = false }); list.Add((FsmStateAction)new AnimateYPositionTo { GameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, ToValue = new FsmFloat(FsmFloat.op_Implicit(147.5f)), localSpace = false, time = new FsmFloat(FsmFloat.op_Implicit(1f)), speed = new FsmFloat(FsmFloat.op_Implicit(5f)), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), easeType = (EaseType)21, reverse = new FsmBool(FsmBool.op_Implicit(false)), realTime = false }); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartBossTransformAnimation") { Value = "StartBossTransformAnimation" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(1.2f)), finishEvent = FsmEvent.Finished }); moveToCenterState.Actions = list.ToArray(); } private void AddBigSilkBallSpawnActions(FsmState spawnState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartBigSilkBallCharge") { Value = "StartBigSilkBallCharge" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("WaitForBigSilkBallComplete") { Value = "WaitForBigSilkBallComplete" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.5f)), finishEvent = FsmEvent.Finished }); spawnState.Actions = list.ToArray(); } private void AddBigSilkBallWaitActions(FsmState waitState) { waitState.Actions = (FsmStateAction[])(object)new FsmStateAction[0]; } private void AddBigSilkBallEndActions(FsmState endState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("RestoreBossTransform") { Value = "RestoreBossTransform" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); int count = list.Count; val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SendBladesReturnToAllFingerBlades") { Value = "SendBladesReturnToAllFingerBlades" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Insert(count, (FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(2f)), finishEvent = FsmEvent.Finished }); endState.Actions = list.ToArray(); } private void AddBigSilkBallReturnActions(FsmState returnState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Expected O, but got Unknown //IL_0153: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Expected O, but got Unknown //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Expected O, but got Unknown //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Expected O, but got Unknown //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Expected O, but got Unknown //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown //IL_01e9: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Expected O, but got Unknown //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SetLayer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, layer = LayerMask.NameToLayer("Enemies") }); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("EnableBossHaze") { Value = "EnableBossHaze" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(1f)), finishEvent = FsmEvent.Finished }); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("EndBigSilkBallPhaseEffects") { Value = "EndBigSilkBallPhaseEffects" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" } }, sendEvent = new FsmString("BIG SILK BALL UNLOCK") { Value = "BIG SILK BALL UNLOCK" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" } }, sendEvent = new FsmString("ATTACK START") { Value = "ATTACK START" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); returnState.Actions = list.ToArray(); } private void AddBigSilkBallRoarActions(FsmState roarState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Expected O, but got Unknown //IL_0131: Expected O, but got Unknown //IL_0136: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Expected O, but got Unknown //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("BeginBigSilkBallPhaseEffects") { Value = "BeginBigSilkBallPhaseEffects" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Tk2dPlayAnimationWithEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, clipName = new FsmString("Roar") { Value = "Roar" }, animationTriggerEvent = FsmEvent.Finished }); PlayAudioEventRandom val2 = _attackControlBehavior?.CloneActionFromAttackControlFSM("Roar", 0, (Func?)null); if (val2 != null) { list.Add((FsmStateAction)(object)val2); } else { Log.Warn("无法克隆PlayAudioEventRandom动作,使用默认配置"); } if ((Object)(object)_hairTransform != (Object)null) { list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)1, gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = new FsmGameObject { Value = ((Component)_hairTransform).gameObject } } }, sendEvent = new FsmString("ROAR") { Value = "ROAR" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); } roarState.Actions = list.ToArray(); } [IteratorStateMachine(typeof(d__13))] private IEnumerator DelayedAddBigSilkBallRoarActions(FsmState roarState) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__13(0) { <>4__this = this, roarState = roarState }; } private void AddBigSilkBallRoarEndActions(FsmState roarEndState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_0096: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_00d3: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = FsmVector2.op_Implicit(new Vector2(0f, 0f)), x = new FsmFloat { UseVariable = false }, y = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SendEventToRegister { eventName = new FsmString("ATTACK CLEAR") { Value = "ATTACK CLEAR" } }); list.Add((FsmStateAction)new SendEventToRegisterDelay { delay = new FsmFloat(FsmFloat.op_Implicit(0.6f)), EventName = new FsmString("ATTACK CLEAR") { Value = "ATTACK CLEAR" } }); list.Add((FsmStateAction)new Tk2dWatchAnimationEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, animationCompleteEvent = FsmEvent.Finished, animationTriggerEvent = FsmEvent.Finished }); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.5f)), finishEvent = FsmEvent.Finished }); roarEndState.Actions = list.ToArray(); } private void AddBigSilkBallTransitions(FsmState prepareState, FsmState moveToCenterState, FsmState spawnState, FsmState waitState, FsmState endState, FsmState returnState, FsmState p3State, FsmState roarState, FsmState roarEndState) { FsmStateBuilder.SetFinishedTransition(roarState, roarEndState); FsmStateBuilder.SetFinishedTransition(roarEndState, prepareState); FsmStateBuilder.SetFinishedTransition(prepareState, moveToCenterState); FsmStateBuilder.SetFinishedTransition(moveToCenterState, spawnState); FsmStateBuilder.SetFinishedTransition(spawnState, waitState); waitState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("BIG SILK BALL COMPLETE"), endState) }; FsmStateBuilder.SetFinishedTransition(endState, returnState); FsmStateBuilder.SetFinishedTransition(returnState, p3State); Log.Info("已设置大招状态转换: Roar -> Roar End -> Prepare -> Move To Center -> Spawn -> Wait -> End -> Return -> P3"); } public void BeginBigSilkBallPhaseEffects() { if ((Object)(object)_bigSilkBallManager == (Object)null) { GetBigSilkBallManager(); } _bigSilkBallManager?.BeginBigSilkBallPhase("memory roar"); PlayMakerFSM? attackControl = _attackControl; if (attackControl != null) { Fsm fsm = attackControl.Fsm; if (fsm != null) { fsm.KillDelayedEvents(); } } PlayMakerFSM? attackControl2 = _attackControl; if (attackControl2 != null) { attackControl2.SendEvent("ATTACK STOP"); } EventRegister.SendEvent("ATTACK CLEAR", (GameObject)null); if ((Object)(object)_attackControlBehavior == (Object)null) { _attackControlBehavior = ((Component)this).gameObject.GetComponent(); } _attackControlBehavior?.SuppressWebStrandAttacksForBigSilkBall(); } public void EndBigSilkBallPhaseEffects() { _bigSilkBallManager?.EndBigSilkBallPhase("memory return"); } private void RegisterBigSilkBallEvents() { FsmStateBuilder.RegisterEvents(_phaseControl, "START BIG SILK BALL", "BIG SILK BALL COMPLETE", "BIG SILK BALL LOCK", "BIG SILK BALL UNLOCK"); Log.Info("大招事件注册完成(START, COMPLETE, LOCK, UNLOCK)"); } public void SendEventToAllFingerBlades(object eventNameObj) { string text = eventNameObj?.ToString() ?? ""; Log.Info($"接收到参数: {eventNameObj}, 转换为字符串: {text}"); GameObject[] allFingerBlades = _allFingerBlades; foreach (GameObject val in allFingerBlades) { if ((Object)(object)val != (Object)null) { PlayMakerFSM component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.SendEvent(text); Log.Info("向" + ((Object)val).name + "发送:" + text); } } } } public void SendSilkStunnedToAllFingerBlades() { SendEventToAllFingerBlades("SILK STUNNED"); } public void SendBladesReturnToAllFingerBlades() { SendEventToAllFingerBlades("BLADES RETURN"); } public void SendBladesReturnDelay() { ((MonoBehaviour)this).StartCoroutine(SendBladesReturnDelayCoroutine()); } [IteratorStateMachine(typeof(d__23))] private IEnumerator SendBladesReturnDelayCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__23(0) { <>4__this = this }; } public void SaveOriginalLayer() { _originalLayer = ((Component)this).gameObject.layer; Log.Info($"保存Boss原始图层: {_originalLayer}"); } public void RestoreOriginalLayer() { ((Component)this).gameObject.layer = _originalLayer; Log.Info($"恢复Boss图层: {_originalLayer}"); } public void SpawnBigSilkBall() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_bigSilkBallManager == (Object)null) { Log.Error("BigSilkBallManager 未初始化,无法生成大丝球"); return; } if (_bigSilkBallTriggered) { Log.Warn("大丝球已经触发过,跳过生成"); return; } _bigSilkBallTriggered = true; Vector3 position = ((Component)this).gameObject.transform.position; _currentBigSilkBall = _bigSilkBallManager.SpawnMemoryBigSilkBall(position, ((Component)this).gameObject); if ((Object)(object)_currentBigSilkBall != (Object)null) { Log.Info($"大丝球生成成功,位置: {position}"); } else { Log.Error("大丝球生成失败"); } } public void StartBigSilkBallCharge() { if ((Object)(object)_currentBigSilkBall == (Object)null) { Log.Error("大丝球不存在,无法启动蓄力"); return; } MemoryBigSilkBallBehavior component = _currentBigSilkBall.GetComponent(); if ((Object)(object)component != (Object)null) { Log.Info("启动大丝球蓄力"); component.StartCharge(); } else { Log.Error("大丝球缺少 MemoryBigSilkBallBehavior 组件"); } } [IteratorStateMachine(typeof(d__28))] private IEnumerator DelayedStartCharge() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__28(0) { <>4__this = this }; } public void OnBigSilkBallEvent(string eventName) { Log.Info("收到大丝球事件: " + eventName); if (!(eventName == "ChargeComplete")) { if (eventName == "BurstComplete") { _burstComplete = true; Log.Info("大丝球爆炸完成"); } else { Log.Warn("未知的大丝球事件: " + eventName); } } else { _chargeComplete = true; Log.Info("大丝球蓄力完成"); } } public void WaitForBigSilkBallComplete() { ((MonoBehaviour)this).StartCoroutine(WaitForBigSilkBallCompleteCoroutine()); } [IteratorStateMachine(typeof(d__31))] private IEnumerator WaitForBigSilkBallCompleteCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__31(0) { <>4__this = this }; } public void SaveBossOriginalState() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) _originalBossZ = ((Component)this).transform.position.z; _originalBossScale = ((Component)this).transform.localScale; Log.Info($"保存BOSS原始状态 - Z轴: {_originalBossZ:F4}, Scale: {_originalBossScale}"); if ((Object)(object)_hairTransform == (Object)null && (Object)(object)((Component)this).transform.parent != (Object)null) { _hairTransform = ((Component)this).transform.parent.Find("Silk_Hair"); if ((Object)(object)_hairTransform == (Object)null) { Log.Warn("未找到 Silk_Hair 物体(可能名称不同或不存在)"); } } if ((Object)(object)_hairTransform != (Object)null) { _originalHairZ = _hairTransform.position.z; _originalHairScale = _hairTransform.localScale; Log.Info($"保存Hair原始状态 - Z轴: {_originalHairZ:F4}, Scale: {_originalHairScale}"); } } public void StartBossTransformAnimation() { ((MonoBehaviour)this).StartCoroutine(AnimateBossTransform()); } [IteratorStateMachine(typeof(d__34))] private IEnumerator AnimateBossTransform() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__34(0) { <>4__this = this }; } public void RestoreBossTransform() { ((MonoBehaviour)this).StartCoroutine(RestoreBossTransformCoroutine()); } public void DisableBossHaze() { if ((Object)(object)_bossHaze != (Object)null) { _bossHaze.SetActive(false); Log.Info("已禁用 haze2 (7)"); } else { Log.Warn("_bossHaze 为 null,无法禁用"); } if ((Object)(object)_bossHaze2 != (Object)null) { _bossHaze2.SetActive(false); Log.Info("已禁用 haze2 (8)"); } else { Log.Warn("_bossHaze2 为 null,无法禁用"); } } public void EnableBossHaze() { if ((Object)(object)_bossHaze != (Object)null) { _bossHaze.SetActive(true); Log.Info("已恢复 haze2 (7)"); } else { Log.Warn("_bossHaze 为 null,无法恢复"); } if ((Object)(object)_bossHaze2 != (Object)null) { _bossHaze2.SetActive(true); Log.Info("已恢复 haze2 (8)"); } else { Log.Warn("_bossHaze2 为 null,无法恢复"); } } [IteratorStateMachine(typeof(d__38))] private IEnumerator RestoreBossTransformCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__38(0) { <>4__this = this }; } private void GetBossControlFSM() { _bossControl = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Control"); if ((Object)(object)_bossControl == (Object)null) { Log.Error("未找到 Boss Control FSM"); } else { Log.Info("成功获取 Boss Control FSM"); } } private void AddClimbPhaseStates() { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown if ((Object)(object)_phaseControl == (Object)null) { Log.Error("Phase Control FSM 未初始化,无法添加爬升阶段"); return; } Log.Info("=== 开始添加爬升阶段状态序列 ==="); FsmState val = FsmStateBuilder.FindState(_phaseControl, "Stagger Pause"); FsmState val2 = FsmStateBuilder.FindState(_phaseControl, "Set P4"); FsmState val3 = FsmStateBuilder.FindState(_phaseControl, "Stagger Hit"); if (val == null) { Log.Error("未找到 Stagger Pause 状态"); return; } if (val2 == null) { Log.Error("未找到 Set P4 状态"); return; } if (val3 == null) { Log.Error("未找到 Stagger Hit 状态"); return; } List list = val3.Actions.ToList(); CallMethod val4 = new CallMethod(); val4.behaviour = new FsmObject { Value = (Object)(object)this }; val4.methodName = new FsmString("PauseSpike") { Value = "PauseSpike" }; val4.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar(typeof(int)) { intValue = _currentPhase.Value } }; list.Insert(0, (FsmStateAction)(object)val4); val3.Actions = list.ToArray(); RegisterClimbPhaseEvents(); CreateClimbPhaseVariables(); FsmState[] array = FsmStateBuilder.CreateStates(_phaseControl.Fsm, ("Climb Init Catch", "硬控玩家并移动到地面"), ("Climb Wait Roar", "等待Boss吼叫完成"), ("Climb Silk Activate", "激活丝线缠绕"), ("Climb Catch Effect", "播放音频、隐藏玩家、激活替身"), ("Climb Player Prepare", "恢复玩家重力和显示"), ("Climb Phase Player Control", "玩家动画控制"), ("Climb Phase Boss Active", "Boss漫游+玩家进度监控"), ("Climb Phase Complete", "爬升阶段完成")); FsmState val5 = array[0]; FsmState val6 = array[1]; FsmState val7 = array[2]; FsmState catchEffectState = array[3]; FsmState val8 = array[4]; FsmState playerControlState = array[5]; FsmState bossActiveState = array[6]; FsmState completeState = array[7]; FsmStateBuilder.AddStatesToFsm(_phaseControl, array); ModifyStaggerPauseTransition(val, val5); AddClimbInitCatchActions(val5); AddClimbWaitRoarActions(val6); AddClimbSilkActivateActions(val7); AddClimbCatchEffectActions(catchEffectState); AddClimbPlayerPrepareActions(val8); AddClimbPhasePlayerControlActions(playerControlState); AddClimbPhaseBossActiveActions(bossActiveState); AddClimbPhaseCompleteActions(completeState); AddClimbPhaseTransitionsNew(val5, val6, val7, catchEffectState, val8, playerControlState, bossActiveState, completeState, val2); Log.Info("=== 爬升阶段状态序列添加完成 ==="); } private void RegisterClimbPhaseEvents() { FsmStateBuilder.RegisterEvents(_phaseControl, "CLIMB PHASE START", "CLIMB PHASE END", "CLIMB PHASE ATTACK", "CLIMB COMPLETE", "CLIMB ROAR START", "CLIMB ROAR DONE"); Log.Info("爬升阶段事件注册完成(含Roar协同事件)"); } private void CreateClimbPhaseVariables() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown List list = _phaseControl.FsmVariables.BoolVariables.ToList(); if (!list.Any((FsmBool v) => ((NamedVariable)v).Name == "Climb Phase Active")) { FsmBool item = new FsmBool("Climb Phase Active") { Value = false }; list.Add(item); _phaseControl.FsmVariables.BoolVariables = list.ToArray(); Log.Info("创建 Climb Phase Active 变量"); } if (!list.Any((FsmBool v) => ((NamedVariable)v).Name == "Special Attack")) { FsmBool item2 = new FsmBool("Special Attack") { Value = false }; list.Add(item2); _phaseControl.FsmVariables.BoolVariables = list.ToArray(); Log.Info("创建 Special Attack 变量(用于Phase2特殊攻击)"); } } private void ModifyStaggerPauseTransition(FsmState staggerPauseState, FsmState climbInitState) { FsmTransition[] transitions = staggerPauseState.Transitions; foreach (FsmTransition val in transitions) { if (val.toState == "BG Break Sequence") { val.toState = "Climb Init Catch"; val.toFsmState = climbInitState; Log.Info("已修改 Stagger Pause -> Climb Init Catch"); } } } private void AddClimbInitCatchActions(FsmState initState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_005f: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_00f5: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Expected O, but got Unknown //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Expected O, but got Unknown //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Expected O, but got Unknown //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Expected O, but got Unknown //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Expected O, but got Unknown //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" } }, sendEvent = new FsmString("ATTACK STOP") { Value = "ATTACK STOP" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" } }, sendEvent = new FsmString("CLIMB ROAR START") { Value = "CLIMB ROAR START" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SetLayer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, layer = 2 }); list.Add((FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Phase Control") { Value = "Phase Control" }, variableName = new FsmString("Climb Phase Active") { Value = "Climb Phase Active" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished }); initState.Actions = list.ToArray(); } private void AddClimbWaitRoarActions(FsmState waitState) { waitState.Actions = (FsmStateAction[])(object)new FsmStateAction[0]; } private bool HasAnimationClip(tk2dSpriteAnimator animator, string clipName) { string clipName2 = clipName; if ((Object)(object)animator == (Object)null || (Object)(object)animator.Library == (Object)null) { return false; } return animator.Library.clips.Any((tk2dSpriteAnimationClip c) => c.name == clipName2); } private bool TryPlayAnimation(tk2dSpriteAnimator animator, string clipName) { if ((Object)(object)animator == (Object)null) { return false; } if (!HasAnimationClip(animator, clipName)) { Log.Warn("动画 '" + clipName + "' 不存在,跳过播放(小骑士MOD兼容)"); return false; } animator.Play(clipName); return true; } private void AddClimbSilkActivateActions(FsmState silkState) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Expected O, but got Unknown //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Expected O, but got Unknown //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Expected O, but got Unknown //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Expected O, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Expected O, but got Unknown //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Expected O, but got Unknown //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Expected O, but got Unknown //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Expected O, but got Unknown //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Expected O, but got Unknown //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Expected O, but got Unknown //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Expected O, but got Unknown //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Expected O, but got Unknown //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Expected O, but got Unknown //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Expected O, but got Unknown //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Expected O, but got Unknown //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Expected O, but got Unknown //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Expected O, but got Unknown //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Expected O, but got Unknown //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Expected O, but got Unknown //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Expected O, but got Unknown //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Expected O, but got Unknown List list = new List(); if (_fsmHero == null || _fsmHeroX == null || _fsmHeroY == null) { Log.Error("FSM变量未初始化,无法添加丝线激活动作"); silkState.Actions = (FsmStateAction[])(object)new FsmStateAction[0]; return; } CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("DisablePlayerInputAfterRoar") { Value = "DisablePlayerInputAfterRoar" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; list.Add((FsmStateAction)(object)val); float num = 12.5f; float[] array = new float[5] { 0f, 0f - num, num, 0f - num, num }; float[] array2 = new float[5] { num, num, num, 0f - num, 0f - num }; float[] array3 = new float[5] { 180f, 45f, -45f, 135f, -135f }; list.Add((FsmStateAction)new GetPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _fsmHero }, vector = new FsmVector3(), x = _fsmHeroX, y = _fsmHeroY, z = new FsmFloat(), space = (Space)0, everyFrame = false }); for (int i = 0; i < 5; i++) { if (_fsmSilkYankClones[i] != null) { FsmFloat val2 = new FsmFloat($"SilkYank_PosX_{i}"); FsmFloat val3 = new FsmFloat($"SilkYank_PosY_{i}"); list.Add((FsmStateAction)new FloatOperator { float1 = _fsmHeroX, float2 = new FsmFloat(FsmFloat.op_Implicit(array[i])), operation = (Operation)0, storeResult = val2, everyFrame = false }); list.Add((FsmStateAction)new FloatOperator { float1 = _fsmHeroY, float2 = new FsmFloat(FsmFloat.op_Implicit(array2[i])), operation = (Operation)0, storeResult = val3, everyFrame = false }); list.Add((FsmStateAction)new SetPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _fsmSilkYankClones[i] }, vector = new FsmVector3(), x = val2, y = val3, z = new FsmFloat(FsmFloat.op_Implicit(0f)), space = (Space)0, everyFrame = false }); list.Add((FsmStateAction)new SetRotation { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _fsmSilkYankClones[i] }, quaternion = new FsmQuaternion(), vector = new FsmVector3(), xAngle = new FsmFloat(FsmFloat.op_Implicit(0f)), yAngle = new FsmFloat(FsmFloat.op_Implicit(0f)), zAngle = new FsmFloat(FsmFloat.op_Implicit(array3[i])), space = (Space)0, everyFrame = false }); list.Add((FsmStateAction)new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _fsmSilkYankClones[i] }, activate = new FsmBool(FsmBool.op_Implicit(true)), recursive = new FsmBool(FsmBool.op_Implicit(false)), resetOnExit = false, everyFrame = false }); } } list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.3f)), finishEvent = FsmEvent.Finished }); silkState.Actions = list.ToArray(); Log.Info("丝线激活动作已添加(使用FSM原生Action)"); } private void AddClimbCatchEffectActions(FsmState catchEffectState) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Expected O, but got Unknown //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Expected O, but got Unknown //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) List list = new List(); if (_fsmHero != null && _fsmWebStrandCatchEffect != null) { list.Add((FsmStateAction)new SetPosition { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _fsmWebStrandCatchEffect, gameObject = FsmGameObject.op_Implicit(_webStrandCatchEffect) }, vector = new FsmVector3(), x = (FsmFloat)(((object)_fsmHeroX) ?? ((object)new FsmFloat { UseVariable = false, Value = 0f })), y = (FsmFloat)(((object)_fsmHeroY) ?? ((object)new FsmFloat { UseVariable = false, Value = 0f })), z = new FsmFloat { UseVariable = false, Value = 0.006f }, space = (Space)0, everyFrame = false }); list.Add((FsmStateAction)new SetMeshRenderer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _fsmHero }, active = FsmBool.op_Implicit(false) }); list.Add((FsmStateAction)new MatchScaleSign { Target = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = _fsmWebStrandCatchEffect }, MatchTo = _fsmHero, active = false }); list.Add((FsmStateAction)new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, gameObject = _fsmWebStrandCatchEffect, GameObject = FsmGameObject.op_Implicit(_webStrandCatchEffect) }, activate = new FsmBool(FsmBool.op_Implicit(true)) { Value = true }, recursive = new FsmBool(FsmBool.op_Implicit(false)) { Value = false }, resetOnExit = false, everyFrame = false }); } else { Log.Warn("Climb Catch Effect: _fsmHero 或 _fsmWebStrandCatchEffect 为 null,跳过视觉效果设置"); } list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(1.5f)), finishEvent = FsmEvent.Finished }); catchEffectState.Actions = list.ToArray(); ((MonoBehaviour)this).StartCoroutine(DelayedAddClimbCatchAudioActions(catchEffectState)); } [IteratorStateMachine(typeof(d__53))] private IEnumerator DelayedAddClimbCatchAudioActions(FsmState catchEffectState) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__53(0) { <>4__this = this, catchEffectState = catchEffectState }; } private void AddClimbPlayerPrepareActions(FsmState prepareState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("PreparePlayerForFall") { Value = "PreparePlayerForFall" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = false; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.2f)), finishEvent = FsmEvent.Finished }); prepareState.Actions = list.ToArray(); } private void AddClimbPhasePlayerControlActions(FsmState playerControlState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartClimbPhasePlayerAnimation") { Value = "StartClimbPhasePlayerAnimation" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(1.5f)), finishEvent = FsmEvent.Finished }); playerControlState.Actions = list.ToArray(); } private void AddClimbPhaseBossActiveActions(FsmState bossActiveState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_005f: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" } }, sendEvent = new FsmString("CLIMB PHASE START") { Value = "CLIMB PHASE START" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("SendBladesReturnDelay") { Value = "SendBladesReturnDelay" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("MonitorPlayerClimbProgress") { Value = "MonitorPlayerClimbProgress" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; val.everyFrame = true; list.Add((FsmStateAction)(object)val); bossActiveState.Actions = list.ToArray(); } private void AddClimbPhaseCompleteActions(FsmState completeState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected O, but got Unknown //IL_013e: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Expected O, but got Unknown //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Expected O, but got Unknown //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Expected O, but got Unknown //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Expected O, but got Unknown //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Expected O, but got Unknown //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Expected O, but got Unknown //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Expected O, but got Unknown //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Expected O, but got Unknown //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SetLayer { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, layer = 11 }); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("RestoreBossZPosition") { Value = "RestoreBossZPosition" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Phase Control") { Value = "Phase Control" }, variableName = new FsmString("Climb Phase Active") { Value = "Climb Phase Active" }, setValue = new FsmBool(FsmBool.op_Implicit(false)), everyFrame = false }); list.Add((FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" } }, sendEvent = new FsmString("CLIMB PHASE END") { Value = "CLIMB PHASE END" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }); list.Add((FsmStateAction)new SendEventToRegister { eventName = FsmString.op_Implicit("BLADES RETURN") }); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("MoveBossBackToArena") { Value = "MoveBossBackToArena" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("ResetClimbPhaseFlags") { Value = "ResetClimbPhaseFlags" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(2.5f)), finishEvent = FsmEvent.Finished }); completeState.Actions = list.ToArray(); } private void AddClimbPhaseTransitionsNew(FsmState initCatchState, FsmState waitRoarState, FsmState silkActivateState, FsmState catchEffectState, FsmState playerPrepareState, FsmState playerControlState, FsmState bossActiveState, FsmState completeState, FsmState setP4State) { FsmStateBuilder.SetFinishedTransition(initCatchState, waitRoarState); waitRoarState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB ROAR DONE"), silkActivateState) }; FsmStateBuilder.SetFinishedTransition(silkActivateState, catchEffectState); FsmStateBuilder.SetFinishedTransition(catchEffectState, playerPrepareState); FsmStateBuilder.SetFinishedTransition(playerPrepareState, playerControlState); FsmStateBuilder.SetFinishedTransition(playerControlState, bossActiveState); bossActiveState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(FsmEvent.GetFsmEvent("CLIMB COMPLETE"), completeState) }; FsmStateBuilder.SetFinishedTransition(completeState, setP4State); Log.Info("爬升阶段转换设置完成(新流程)"); } private GameObject? GetHeroGameObject() { FsmGameObject fsmGameObject = FsmVariables.GlobalVariables.GetFsmGameObject("Hero"); if (fsmGameObject != null && (Object)(object)fsmGameObject.Value != (Object)null) { return fsmGameObject.Value; } HeroController instance = HeroController.instance; return (instance != null) ? ((Component)instance).gameObject : null; } public void DisablePlayerInputAfterRoar() { GameObject heroGameObject = GetHeroGameObject(); if ((Object)(object)heroGameObject == (Object)null) { Log.Error("DisablePlayerInputAfterRoar: 无法获取玩家对象"); return; } HeroController instance = HeroController.instance; if ((Object)(object)instance == (Object)null) { Log.Error("DisablePlayerInputAfterRoar: HeroController.instance 为空"); return; } GameManager instance2 = GameManager._instance; if (instance2 != null) { InputHandler inputHandler = instance2.inputHandler; if (inputHandler != null) { inputHandler.StopAcceptingInput(); } } instance.RelinquishControl(); instance.StopAnimationControl(); instance.AffectedByGravity(false); Log.Info("Roar结束后禁用玩家输入完成,开始平滑移动到地面"); ((MonoBehaviour)this).StartCoroutine(AnimatePlayerToGround(heroGameObject)); } [IteratorStateMachine(typeof(d__61))] private IEnumerator AnimatePlayerToGround(GameObject heroObj) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__61(0) { <>4__this = this, heroObj = heroObj }; } public void ActivateSilkYankForClimb() { ActivateSilkYankAnimation(); Log.Info("激活丝线缠绕动画(爬升阶段)"); } public void PreparePlayerForFall() { GameObject heroGameObject = GetHeroGameObject(); HeroController instance = HeroController.instance; if ((Object)(object)heroGameObject == (Object)null || (Object)(object)instance == (Object)null) { Log.Error("PreparePlayerForFall: 无法获取玩家对象"); return; } instance.AffectedByGravity(true); MeshRenderer component = heroGameObject.GetComponent(); if ((Object)(object)component != (Object)null) { ((Renderer)component).enabled = true; Log.Info("英雄MeshRenderer已恢复显示"); } DeactivateCatchEffect(); DeactivateSilkYankAnimation(); Log.Info("玩家准备下落:重力已恢复,替身已禁用,丝线已禁用"); } private void DeactivateCatchEffect() { GameObject val = GameObject.Find("Boss Scene"); if ((Object)(object)val != (Object)null) { Transform val2 = val.transform.Find("Web Strand Catch Effect"); if ((Object)(object)val2 != (Object)null) { ((Component)val2).gameObject.SetActive(false); Log.Info("Web Strand Catch Effect已禁用"); } } } public void StartClimbPhasePlayerAnimation() { ((MonoBehaviour)this).StartCoroutine(ClimbPhasePlayerAnimationCoroutine()); } [IteratorStateMachine(typeof(d__66))] private IEnumerator ClimbPhasePlayerAnimationCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__66(0) { <>4__this = this }; } public void MonitorPlayerClimbProgress() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) if (_climbCompleteEventSent) { return; } GameObject heroGameObject = GetHeroGameObject(); if ((Object)(object)heroGameObject == (Object)null) { return; } Vector3 position = heroGameObject.transform.position; if (position.x < 2f) { heroGameObject.transform.position = new Vector3(2f, position.y, position.z); Rigidbody2D component = heroGameObject.GetComponent(); if ((Object)(object)component != (Object)null && component.linearVelocity.x < 0f) { component.linearVelocity = new Vector2(0f, component.linearVelocity.y); } } else if (position.x > 78f) { heroGameObject.transform.position = new Vector3(78f, position.y, position.z); Rigidbody2D component2 = heroGameObject.GetComponent(); if ((Object)(object)component2 != (Object)null && component2.linearVelocity.x > 0f) { component2.linearVelocity = new Vector2(0f, component2.linearVelocity.y); } } HandleCollapseGateDuringClimb(position.x); if (position.y >= 133.5f && !_climbCompleteEventSent) { _climbCompleteEventSent = true; _climbPhaseCompleted = true; if ((Object)(object)_attackControl != (Object)null && !_climbAttackEventSent) { _attackControl.SendEvent("CLIMB PHASE ATTACK"); _climbAttackEventSent = true; Log.Info("玩家提前爬到顶,补发 CLIMB PHASE ATTACK 事件"); } _phaseControl.SendEvent("CLIMB COMPLETE"); Log.Info("玩家到达目标高度,爬升阶段完成,发送 CLIMB COMPLETE 事件"); ((MonoBehaviour)this).StartCoroutine(MonitorPlayerXForCollapseGate()); } } private void HandleCollapseGateDuringClimb(float playerX) { if ((Object)(object)_collapseGate == (Object)null) { GameObject val = GameObject.Find("Boss Scene"); if ((Object)(object)val != (Object)null) { Transform val2 = val.transform.Find("Battle Gate"); if ((Object)(object)val2 != (Object)null) { Transform obj = val2.Find("boss_scene_collapse_gate"); _collapseGate = ((obj != null) ? ((Component)obj).gameObject : null); Log.Info("找到collapse_gate: " + (((Object)(object)_collapseGate != (Object)null) ? "成功" : "失败")); } } } if ((Object)(object)_collapseGate == (Object)null) { return; } if (!_collapseGateDisabled) { _collapseGate.SetActive(false); Animator component = _collapseGate.GetComponent(); if ((Object)(object)component != (Object)null) { ((Behaviour)component).enabled = false; } _collapseGateDisabled = true; Log.Info("已禁用collapse_gate和其Animator"); } if (_climbPhaseCompleted && playerX > 20f && !_collapseGate.activeSelf) { _collapseGate.SetActive(true); Animator component2 = _collapseGate.GetComponent(); if ((Object)(object)component2 != (Object)null) { ((Behaviour)component2).enabled = false; } Log.Info($"玩家X > 20,恢复collapse_gate GameObject(X={playerX:F2}),但Animator仍禁用"); } } public void ResetClimbPhaseFlags() { _climbCompleteEventSent = false; _climbAttackEventSent = false; _climbPhaseCompleted = false; _collapseGateDisabled = false; GameObject? bossScene = _bossScene; object obj; if (bossScene == null) { obj = null; } else { Transform obj2 = bossScene.transform.Find("Spike Floors"); obj = ((obj2 != null) ? ((Component)obj2).gameObject : null); } GameObject spikeFloorsParent = (GameObject)obj; MemorySpikeFloorBehavior.ResumeSpikeSystem(spikeFloorsParent); Log.Info("爬升阶段标志已重置"); } public void RestoreBossZPosition() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)this).transform.position; position.z = 0.01f; ((Component)this).transform.position = position; Log.Info($"恢复Boss Z轴到0.01,当前位置: {((Component)this).transform.position}"); } public void MoveBossBackToArena() { ((MonoBehaviour)this).StartCoroutine(MoveBossBackToArenaCoroutine()); } [IteratorStateMachine(typeof(d__72))] private IEnumerator MoveBossBackToArenaCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__72(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__73))] private IEnumerator MonitorPlayerXForCollapseGate() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__73(0) { <>4__this = this }; } private void ActivateSilkYankAnimation() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) if (!_silkYankInitialized || (Object)(object)_silkYankClones[0] == (Object)null) { Log.Error("丝线缠绕未初始化,无法启用动画"); return; } GameObject heroGameObject = GetHeroGameObject(); if ((Object)(object)heroGameObject == (Object)null) { Log.Error("无法获取玩家对象,无法启用丝线缠绕"); return; } Vector3 position = heroGameObject.transform.position; float num = 10f; Vector3[] array = (Vector3[])(object)new Vector3[5] { position + new Vector3(0f, num, 0f), position + new Vector3(0f - num, num, 0f), position + new Vector3(num, num, 0f), position + new Vector3(0f - num, 0f - num, 0f), position + new Vector3(num, 0f - num, 0f) }; float[] array2 = new float[5] { 180f, -45f, -135f, 45f, 135f }; for (int i = 0; i < 5; i++) { if ((Object)(object)_silkYankClones[i] != (Object)null) { _silkYankClones[i].transform.position = array[i]; _silkYankClones[i].transform.rotation = Quaternion.Euler(0f, 0f, array2[i]); _silkYankClones[i].SetActive(true); Log.Info($"启用丝线缠绕 {i}: 位置={array[i]}, 旋转={array2[i]}°"); } } Log.Info("丝线缠绕动画启用完成(5个位置)"); } private void DeactivateSilkYankAnimation() { for (int i = 0; i < 5; i++) { if ((Object)(object)_silkYankClones[i] != (Object)null) { _silkYankClones[i].SetActive(false); } } Log.Info("丝线缠绕动画已禁用"); } [IteratorStateMachine(typeof(d__76))] private IEnumerator UpdateSilkYankPositions(float duration) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__76(0) { <>4__this = this, duration = duration }; } private void Awake() { } private void Start() { ((MonoBehaviour)this).StartCoroutine(DelayedSetup()); TryGetGlobalHero(); } private void OnDisable() { (_bigSilkBallManager ?? BigSilkBallManager.Instance)?.ResetBigSilkBallPhaseEffects("memory phase control disabled"); } private void OnDestroy() { (_bigSilkBallManager ?? BigSilkBallManager.Instance)?.ResetBigSilkBallPhaseEffects("memory phase control destroyed"); } private void Update() { if (Input.GetKeyDown((KeyCode)116)) { PrintGlobalHeroInfo(); } } private void TryGetGlobalHero() { try { FsmGameObject fsmGameObject = FsmVariables.GlobalVariables.GetFsmGameObject("Hero"); if (fsmGameObject != null && (Object)(object)fsmGameObject.Value != (Object)null) { _globalHero = fsmGameObject.Value; Log.Info("[PhaseControl] 获取到全局 Hero: " + ((Object)_globalHero).name); } else { Log.Warn("[PhaseControl] 全局 Hero 变量为空"); } } catch (Exception ex) { Log.Error("[PhaseControl] 获取全局 Hero 失败: " + ex.Message); } } private void PrintGlobalHeroInfo() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) TryGetGlobalHero(); if ((Object)(object)_globalHero == (Object)null) { Log.Info("[PhaseControl] 全局 Hero 为空"); return; } Log.Info("========== 全局 Hero 信息 =========="); Log.Info("名称: " + ((Object)_globalHero).name); Log.Info($"位置: {_globalHero.transform.position}"); Log.Info($"Layer: {_globalHero.layer} ({LayerMask.LayerToName(_globalHero.layer)})"); Log.Info($"激活状态: {_globalHero.activeSelf}"); Component[] components = _globalHero.GetComponents(); Log.Info($"组件数量: {components.Length}"); Log.Info("组件列表:"); Component[] array = components; foreach (Component val in array) { if ((Object)(object)val != (Object)null) { Log.Info(" - " + ((object)val).GetType().Name); } } Log.Info("====================================="); } [IteratorStateMachine(typeof(d__120))] private IEnumerator DelayedSetup() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__120(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__121))] private IEnumerator SetupPhaseControl() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__121(0) { <>4__this = this }; } private void GetComponents() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Expected O, but got Unknown //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) _phaseControl = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Phase Control"); if ((Object)(object)_phaseControl == (Object)null) { Log.Error("未找到Phase Control FSM"); return; } Log.Info("成功获取Phase Control FSM"); _currentPhase = _phaseControl.FsmVariables.GetFsmInt("CurrentPhase"); if (_currentPhase == null) { _currentPhase = new FsmInt("CurrentPhase"); _currentPhase.Value = 0; List list = _phaseControl.FsmVariables.IntVariables.ToList(); list.Add(_currentPhase); _phaseControl.FsmVariables.IntVariables = list.ToArray(); Log.Info("创建了新的FSM变量: CurrentPhase"); } Transform val = ((Component)this).gameObject.transform.Find("haze2 (7)"); if ((Object)(object)val != (Object)null) { _bossHaze = ((Component)val).gameObject; } else { Log.Warn("未找到子物品 haze2 (7)"); } Transform val2 = ((Component)this).gameObject.transform.Find("haze2 (8)"); if ((Object)(object)val2 != (Object)null) { _bossHaze2 = ((Component)val2).gameObject; } else { Log.Warn("未找到子物品 haze2 (8)"); } _handLObj = GameObject.Find("Hand L"); _handRObj = GameObject.Find("Hand R"); if ((Object)(object)_handLObj != (Object)null) { int num = 0; string[] array = new string[3] { "Finger Blade L", "Finger Blade M", "Finger Blade R" }; foreach (string text in array) { Transform val3 = _handLObj.transform.Find(text); if ((Object)(object)val3 != (Object)null && num < 3) { _allFingerBlades[num++] = ((Component)val3).gameObject; } } } if ((Object)(object)_handRObj != (Object)null) { int num2 = 3; string[] array2 = new string[3] { "Finger Blade L", "Finger Blade M", "Finger Blade R" }; foreach (string text2 in array2) { Transform val4 = _handRObj.transform.Find(text2); if ((Object)(object)val4 != (Object)null && num2 < 6) { _allFingerBlades[num2++] = ((Component)val4).gameObject; } } } Log.Info($"PhaseControlBehavior已收集FingerBlades: {_allFingerBlades.Count((GameObject o) => (Object)(object)o != (Object)null)}"); _attackControl = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Attack Control"); if ((Object)(object)_attackControl == (Object)null) { Log.Error("未找到 AttackControl FSM"); } else { Log.Info("成功获取 AttackControl FSM"); } _bossScene = GameObject.Find("Boss Scene"); if ((Object)(object)_bossScene == (Object)null) { Log.Error("未找到 Boss Scene"); } else { Log.Info("成功获取 Boss Scene"); Transform val5 = _bossScene.transform.Find("Boss Title"); if ((Object)(object)val5 != (Object)null) { Transform val6 = ((Component)val5).transform.Find("Title Text"); if ((Object)(object)val6 != (Object)null) { Transform val7 = ((Component)val6).transform.Find("Silk_Title_Image"); Transform val8 = ((Component)val6).transform.Find("Silk_Title_Text"); if ((Object)(object)val7 != (Object)null && (Object)(object)val8 != (Object)null) { ((Component)val7).gameObject.SetActive(false); ((Component)val8).gameObject.SetActive(true); Transform val9 = val8.Find("Title Small Super"); if ((Object)(object)val9 != (Object)null) { TextMeshPro component = ((Component)val9).GetComponent(); if ((Object)(object)component != (Object)null) { ((Graphic)component).color = new Color(0.45f, 0.45f, 1f, 1f); } } Transform val10 = val8.Find("Title Small Main"); if ((Object)(object)val10 != (Object)null) { TextMeshPro component2 = ((Component)val10).GetComponent(); if ((Object)(object)component2 != (Object)null) { ((Graphic)component2).color = new Color(1f, 0.94f, 0.7f, 1f); } } } } } else { Log.Warn("未找到 Boss Title"); } Transform val11 = _bossScene.transform.Find("Web Strand Catch Effect"); if ((Object)(object)val11 != (Object)null) { _webStrandCatchEffect = ((Component)val11).gameObject; _fsmWebStrandCatchEffect = new FsmGameObject("WebStrandCatchEffect") { Value = _webStrandCatchEffect }; Log.Info("成功获取 Web Strand Catch Effect"); } else { Log.Warn("未找到 Web Strand Catch Effect"); } } InitializeSilkYankInGetComponents(); } private void InitializeSilkYankInGetComponents() { //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_bossScene == (Object)null) { Log.Error("Boss Scene未获取,无法初始化丝线缠绕"); return; } try { Transform val = _bossScene.transform.Find("Spike Floors"); if ((Object)(object)val == (Object)null) { Log.Error("未找到 Spike Floors"); return; } Transform val2 = val.Find("Spike Floor 1"); if ((Object)(object)val2 == (Object)null) { Log.Error("未找到 Spike Floor 1"); return; } Transform val3 = val2.Find("Silk_yank"); if ((Object)(object)val3 == (Object)null) { Log.Error("未找到 Silk_yank"); return; } _silkYankPrefab = ((Component)val3).gameObject; Log.Info("成功找到 Silk_yank: " + ((Object)_silkYankPrefab).name); for (int i = 0; i < 5; i++) { GameObject val4 = Object.Instantiate(_silkYankPrefab); ((Object)val4).name = $"Silk_yank_Clone_{i}"; val4.transform.SetParent((Transform)null); List list = new List(); for (int j = 0; j < val4.transform.childCount; j++) { Transform child = val4.transform.GetChild(j); if (!((Object)child).name.Equals("thread")) { list.Add(((Component)child).gameObject); } else { ((Component)child).transform.localPosition = new Vector3(0f, 0f, ((Component)child).transform.localPosition.z); } } foreach (GameObject item in list) { Object.Destroy((Object)(object)item); } val4.SetActive(false); _silkYankClones[i] = val4; Log.Info($"创建丝线克隆体 {i}: {((Object)val4).name}"); } _silkYankInitialized = true; Log.Info("丝线缠绕动画初始化完成(5个克隆体)"); RegisterSilkYankFsmVariables(); } catch (Exception ex) { Log.Error("初始化丝线缠绕失败: " + ex.Message); } } private void RegisterSilkYankFsmVariables() { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown if (!((Object)(object)_phaseControl == (Object)null)) { List list = _phaseControl.FsmVariables.GameObjectVariables.ToList(); List list2 = _phaseControl.FsmVariables.FloatVariables.ToList(); string[] array = new string[5] { "SilkYank_Top", "SilkYank_TopLeft", "SilkYank_TopRight", "SilkYank_BottomLeft", "SilkYank_BottomRight" }; for (int i = 0; i < 5; i++) { _fsmSilkYankClones[i] = new FsmGameObject(array[i]); _fsmSilkYankClones[i].Value = _silkYankClones[i]; list.Add(_fsmSilkYankClones[i]); } _fsmHero = new FsmGameObject("SilkYank_Hero"); FsmGameObject? fsmHero = _fsmHero; HeroController instance = HeroController.instance; fsmHero.Value = ((instance != null) ? ((Component)instance).gameObject : null); list.Add(_fsmHero); _fsmHeroX = new FsmFloat("SilkYank_HeroX"); _fsmHeroY = new FsmFloat("SilkYank_HeroY"); list2.Add(_fsmHeroX); list2.Add(_fsmHeroY); _phaseControl.FsmVariables.GameObjectVariables = list.ToArray(); _phaseControl.FsmVariables.FloatVariables = list2.ToArray(); Log.Info("丝线缠绕FSM变量注册完成"); } } private void ModifyPhaseBehavior() { if (!((Object)(object)_phaseControl == (Object)null)) { ModifyPhaseHP(); ModifySetP4State(); ModifySetP6State(); ModifyAllSetPStatesForSpike(); Log.Info("阶段行为修改完成"); } } private void ModifyAllSetPStatesForSpike() { //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Expected O, but got Unknown //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Expected O, but got Unknown //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Expected O, but got Unknown //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Expected O, but got Unknown //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Expected O, but got Unknown //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Expected O, but got Unknown //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown if ((Object)(object)_phaseControl == (Object)null) { return; } for (int i = 1; i <= 6; i++) { string stateName = $"Set P{i}"; FsmState val = ((IEnumerable)_phaseControl.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == stateName)); if (val == null) { Log.Warn("未找到 " + stateName + " 状态,跳过地刺触发设置"); continue; } List list = RemoveOriginalSpikeActions(val.Actions.ToList()); list.Add((FsmStateAction)new SetFsmInt { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" }, variableName = new FsmString("CurrentPhase") { Value = "CurrentPhase" }, setValue = new FsmInt(FsmInt.op_Implicit(i)), everyFrame = false }); list.Add((FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" }, variableName = new FsmString("SpikeAttackPending") { Value = "SpikeAttackPending" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); list.Add((FsmStateAction)new SetFsmInt { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Phase Control") { Value = "Phase Control" }, variableName = new FsmString("CurrentPhase") { Value = "CurrentPhase" }, setValue = new FsmInt(FsmInt.op_Implicit(i)), everyFrame = false }); val.Actions = list.ToArray(); Log.Info(stateName + " 状态已添加地刺触发逻辑(SetFsmBool)"); } } private List RemoveOriginalSpikeActions(List actions) { List list = new List(); int num = 0; foreach (FsmStateAction action in actions) { bool flag = false; SetFsmBool val = (SetFsmBool)(object)((action is SetFsmBool) ? action : null); if (val != null) { FsmString variableName = val.variableName; if (((variableName != null) ? variableName.Value : null) == "Can Spike Pull") { flag = true; Log.Debug("[PhaseControl] 移除 SetFsmBool (Can Spike Pull)"); } else { FsmString variableName2 = val.variableName; if (((variableName2 != null) ? variableName2.Value : null) == "Can Rubble Attack") { flag = true; Log.Debug("[PhaseControl] 移除 SetFsmBool (Can Rubble Attack)"); } } } if (flag) { num++; } else { list.Add(action); } } if (num > 0) { Log.Info($"[PhaseControl] 移除了 {num} 个原版 Actions"); } return list; } private void ModifySetP4State() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Expected O, but got Unknown //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown FsmState val = ((IEnumerable)_phaseControl.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Set P4")); if (val == null) { Log.Warn("未找到Set P4状态,跳过Special Attack设置"); return; } List list = val.Actions.ToList(); list.Insert(0, (FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Phase Control") { Value = "Phase Control" }, variableName = new FsmString("Special Attack") { Value = "Special Attack" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); list.Insert(1, (FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" }, variableName = new FsmString("Special Attack") { Value = "Special Attack" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); list.Insert(2, (FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" }, variableName = new FsmString("Special Attack") { Value = "Special Attack" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); val.Actions = list.ToArray(); Log.Info("Set P4状态已修改:添加Special Attack设置(Phase Control、Attack Control、Control FSM)"); } private void ModifySetP6State() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown FsmState val = ((IEnumerable)_phaseControl.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Set P6")); if (val == null) { Log.Warn("未找到Set P6状态,跳过P6 Web Attack设置"); return; } List list = val.Actions.ToList(); list.Add((FsmStateAction)new SetFsmBool { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" }, variableName = new FsmString("Do P6 Web Attack") { Value = "Do P6 Web Attack" }, setValue = new FsmBool(FsmBool.op_Implicit(true)), everyFrame = false }); val.Actions = list.ToArray(); Log.Info("Set P6状态已修改:添加P6 Web Attack触发标记(Attack Control FSM)"); } private void ModifyPhaseHP() { if ((Object)(object)_phaseControl == (Object)null || _hpModified) { return; } Log.Info("开始修改各阶段血量..."); AddBossHealth(180); for (int i = 1; i <= 6; i++) { string text = $"P{i} HP"; FsmInt fsmInt = _phaseControl.FsmVariables.GetFsmInt(text); switch (i) { case 1: fsmInt.Value = 280; break; case 2: fsmInt.Value = 430; break; case 3: fsmInt.Value = 500; break; case 4: fsmInt.Value = 640; break; case 5: fsmInt.Value = 520; break; case 6: fsmInt.Value = 630; break; } } _hpModified = true; Log.Info("所有阶段血量修改完成!"); } public void AddBossHealth(int healAmount = 200) { HealthManager component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { Log.Error("未找到 HealthManager 组件,无法回血"); return; } component.AddHP(healAmount, 1000); Log.Info($"Boss回血:{healAmount}"); } public void PauseSpike(int phase) { MemorySpikeFloorBehavior.PauseSpikeSystem(phase); } private void AddPinArraySpecialStates() { if ((Object)(object)_phaseControl == (Object)null) { return; } FsmState val = FsmStateBuilder.FindState(_phaseControl, "P4"); FsmState val2 = FsmStateBuilder.FindState(_phaseControl, "HP Check 4"); FsmState val3 = FsmStateBuilder.FindState(_phaseControl, "Set P5"); if (val != null && val2 != null && val3 != null) { EnsurePinArraySpecialVariables(); RegisterPinArraySpecialEvents(); _pinArrayHpCheckEntryState = FsmStateBuilder.CreateState(_phaseControl.Fsm, "HP Check 4 (Entry)", "PinArray gate"); _pinArrayHpCheck400State = FsmStateBuilder.CreateState(_phaseControl.Fsm, "HP Check 4 CompareHP400", "PinArray HP<=400"); _pinArrayRoarState = FsmStateBuilder.CreateState(_phaseControl.Fsm, "PinArray Roar", "PinArray roar"); _pinArrayRoarWaitState = FsmStateBuilder.CreateState(_phaseControl.Fsm, "PinArray Roar Wait", "PinArray roar wait"); _pinArrayPrepareState = FsmStateBuilder.CreateState(_phaseControl.Fsm, "PinArray Prepare", "PinArray prepare"); _pinArrayStartState = FsmStateBuilder.CreateState(_phaseControl.Fsm, "PinArray Start", "PinArray start"); _pinArrayEndState = FsmStateBuilder.CreateState(_phaseControl.Fsm, "PinArray End", "PinArray end"); FsmStateBuilder.AddStatesToFsm(_phaseControl, _pinArrayHpCheckEntryState, _pinArrayHpCheck400State, _pinArrayRoarState, _pinArrayRoarWaitState, _pinArrayPrepareState, _pinArrayStartState, _pinArrayEndState); PatchP4Transition(val, val2, _pinArrayHpCheckEntryState); AddPinArrayHpCheckEntryActions(_pinArrayHpCheckEntryState); AddPinArrayHpCheck400Actions(_pinArrayHpCheck400State); AddPinArrayRoarActions(_pinArrayRoarState); AddPinArrayRoarWaitActions(_pinArrayRoarWaitState); AddPinArrayPrepareActions(_pinArrayPrepareState); AddPinArrayStartActions(_pinArrayStartState); AddPinArrayEndActions(_pinArrayEndState); _pinArrayHpCheckEntryState.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(_pinArrayCheckHpEvent, _pinArrayHpCheck400State), FsmStateBuilder.CreateTransition(_pinArraySkipEvent, val2) }; _pinArrayHpCheck400State.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(_startPinArraySpecialEvent, _pinArrayRoarState), FsmStateBuilder.CreateTransition(_pinArraySkipEvent, val2) }; FsmStateBuilder.SetFinishedTransition(_pinArrayRoarState, _pinArrayRoarWaitState); FsmStateBuilder.SetFinishedTransition(_pinArrayPrepareState, _pinArrayStartState); FsmStateBuilder.SetFinishedTransition(_pinArrayEndState, val); if (_pinArrayStartDoneEvent != null) { _pinArrayStartState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(_pinArrayStartDoneEvent, _pinArrayEndState) }; } if (_pinArrayRoarDoneEvent != null) { _pinArrayRoarWaitState.Transitions = (FsmTransition[])(object)new FsmTransition[1] { FsmStateBuilder.CreateTransition(_pinArrayRoarDoneEvent, _pinArrayPrepareState) }; } } } private void EnsurePinArraySpecialVariables() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown if (!((Object)(object)_phaseControl == (Object)null)) { List list = _phaseControl.FsmVariables.BoolVariables.ToList(); _pinArraySpecialAvailableVar = ((IEnumerable)list).FirstOrDefault((Func)((FsmBool v) => ((NamedVariable)v).Name == "PinArraySpecialAvailable")); if (_pinArraySpecialAvailableVar == null) { _pinArraySpecialAvailableVar = new FsmBool("PinArraySpecialAvailable") { Value = true }; list.Add(_pinArraySpecialAvailableVar); _phaseControl.FsmVariables.BoolVariables = list.ToArray(); _phaseControl.FsmVariables.Init(); } } } private void RegisterPinArraySpecialEvents() { if (!((Object)(object)_phaseControl == (Object)null)) { _pinArrayCheckHpEvent = FsmStateBuilder.GetOrCreateEvent(_phaseControl, "PIN_ARRAY_CHECK_HP"); _pinArraySkipEvent = FsmStateBuilder.GetOrCreateEvent(_phaseControl, "PIN_ARRAY_SKIP"); _startPinArraySpecialEvent = FsmStateBuilder.GetOrCreateEvent(_phaseControl, "START PIN ARRAY SPECIAL"); _pinArrayRoarDoneEvent = FsmStateBuilder.GetOrCreateEvent(_phaseControl, "PIN ARRAY ROAR DONE"); _pinArrayStartDoneEvent = FsmStateBuilder.GetOrCreateEvent(_phaseControl, "PIN_ARRAY_START_DONE"); } } private void PatchP4Transition(FsmState p4State, FsmState hpCheck4State, FsmState entryState) { FsmEvent fsmEvent = FsmEvent.GetFsmEvent("TOOK DAMAGE"); List list = p4State.Transitions.ToList(); for (int i = 0; i < list.Count; i++) { FsmTransition val = list[i]; if (val != null && val.FsmEvent == fsmEvent && (val.toState == hpCheck4State.Name || val.toFsmState == hpCheck4State)) { val.toState = entryState.Name; val.toFsmState = entryState; list[i] = val; p4State.Transitions = list.ToArray(); return; } } list.Add(FsmStateBuilder.CreateTransition(fsmEvent, entryState)); p4State.Transitions = list.ToArray(); } private void AddPinArrayHpCheckEntryActions(FsmState state) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown state.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)new BoolTest { boolVariable = _pinArraySpecialAvailableVar, isTrue = _pinArrayCheckHpEvent, isFalse = _pinArraySkipEvent, everyFrame = false } }; } private void AddPinArrayHpCheck400Actions(FsmState state) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown FsmGameObject enemy = new FsmGameObject("Self") { Value = ((Component)this).gameObject }; state.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)new CompareHP { enemy = enemy, integer2 = new FsmInt(FsmInt.op_Implicit(400)), lessThan = _startPinArraySpecialEvent, equal = _startPinArraySpecialEvent, greaterThan = _pinArraySkipEvent, everyFrame = false } }; } private void AddPinArrayRoarActions(FsmState state) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_004e: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007a: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Expected O, but got Unknown //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown //IL_013b: Expected O, but got Unknown //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Expected O, but got Unknown //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Expected O, but got Unknown //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown //IL_0198: Expected O, but got Unknown //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Expected O, but got Unknown //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Expected O, but got Unknown //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Expected O, but got Unknown //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Expected O, but got Unknown //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Expected O, but got Unknown FsmEventTarget eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Control") { Value = "Control" } }; FsmStateAction[] obj = new FsmStateAction[6] { (FsmStateAction)new SetBoolValue { boolVariable = _pinArraySpecialAvailableVar, boolValue = new FsmBool(FsmBool.op_Implicit(false)) }, default(FsmStateAction), default(FsmStateAction), default(FsmStateAction), default(FsmStateAction), default(FsmStateAction) }; CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("PauseSpike") { Value = "PauseSpike" }; val.parameters = (FsmVar[])(object)new FsmVar[1] { new FsmVar(typeof(int)) { intValue = _currentPhase.Value } }; obj[1] = (FsmStateAction)val; obj[2] = (FsmStateAction)new SendEventByName { eventTarget = new FsmEventTarget { target = (EventTarget)2, excludeSelf = new FsmBool(FsmBool.op_Implicit(false)), gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, fsmName = new FsmString("Attack Control") { Value = "Attack Control" } }, sendEvent = new FsmString("ATTACK STOP") { Value = "ATTACK STOP" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }; obj[3] = (FsmStateAction)new SendEventToRegister { eventName = new FsmString("ATTACK CLEAR") { Value = "ATTACK CLEAR" } }; obj[4] = (FsmStateAction)new SendEventByName { eventTarget = eventTarget, sendEvent = new FsmString("PIN ARRAY ROAR START") { Value = "PIN ARRAY ROAR START" }, delay = new FsmFloat(FsmFloat.op_Implicit(0f)), everyFrame = false }; obj[5] = (FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.1f)), finishEvent = FsmEvent.Finished }; state.Actions = (FsmStateAction[])(object)obj; } private void AddPinArrayRoarWaitActions(FsmState? state) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown if (state != null) { state.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(999f)), finishEvent = null } }; } } private void AddPinArrayPrepareActions(FsmState state) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown FsmStateAction[] array = new FsmStateAction[2]; CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("PinArraySpecialPrepare") { Value = "PinArraySpecialPrepare" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; array[0] = (FsmStateAction)val; array[1] = (FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.2f)), finishEvent = FsmEvent.Finished }; state.Actions = (FsmStateAction[])(object)array; } public void PinArraySpecialPrepare() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_phaseControl == (Object)null)) { GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { _pinManager = val.GetComponent(); } Vector3 aRENA_CENTER = ARENA_CENTER; SetFingerBladePinArraySlotsAndEnter(aRENA_CENTER); } } private void AddPinArrayStartActions(FsmState state) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown FsmStateAction[] array = new FsmStateAction[1]; CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartPinArraySpecialAttack") { Value = "StartPinArraySpecialAttack" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; array[0] = (FsmStateAction)val; state.Actions = (FsmStateAction[])(object)array; } public void StartPinArraySpecialAttack() { if (_pinArrayMainCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(_pinArrayMainCoroutine); } _pinArrayMainCoroutine = ((MonoBehaviour)this).StartCoroutine(PinArrayMainCoroutine()); } [IteratorStateMachine(typeof(d__176))] private IEnumerator PinArrayMainCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__176(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__177))] private IEnumerator SpawnAllPins(Vector3 center) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__177(0) { <>4__this = this, center = center }; } [IteratorStateMachine(typeof(d__178))] private IEnumerator ExpandPinArray(Vector3 center) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__178(0) { <>4__this = this, center = center }; } private static void EnablePinRenderers(GameObject pin) { if ((Object)(object)pin == (Object)null) { return; } Transform val = pin.transform.Find("Thread"); Renderer[] componentsInChildren = pin.GetComponentsInChildren(true); for (int i = 0; i < componentsInChildren.Length; i++) { if ((Object)(object)componentsInChildren[i] != (Object)null && (!((Object)(object)val != (Object)null) || !((Component)componentsInChildren[i]).transform.IsChildOf(val))) { componentsInChildren[i].enabled = true; } } } private static void DisablePinThreadRenderers(GameObject pin) { if ((Object)(object)pin == (Object)null) { return; } Transform val = pin.transform.Find("Thread"); if ((Object)(object)val == (Object)null) { return; } Renderer[] componentsInChildren = ((Component)val).GetComponentsInChildren(true); for (int i = 0; i < componentsInChildren.Length; i++) { if ((Object)(object)componentsInChildren[i] != (Object)null) { componentsInChildren[i].enabled = false; } } } [IteratorStateMachine(typeof(d__181))] private static IEnumerator AnimatePinsZToZero(List pins, float duration) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__181(0) { pins = pins, duration = duration }; } [IteratorStateMachine(typeof(d__182))] private IEnumerator FireWaveASlam() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__182(0) { <>4__this = this }; } private void SendEventToWaveB(string eventName) { foreach (GameObject pinArrayWaveBPin in _pinArrayWaveBPins) { if (!((Object)(object)pinArrayWaveBPin == (Object)null)) { PlayMakerFSM val = FSMUtility.LocateMyFSM(pinArrayWaveBPin, "Control"); if ((Object)(object)val != (Object)null) { string activeStateName = val.ActiveStateName; val.SendEvent(eventName); } } } } [IteratorStateMachine(typeof(d__184))] private IEnumerator FireAllPinsSequentially() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__184(0) { <>4__this = this }; } private static float CalculateSequentialFireDuration(int pinCount) { if (pinCount <= 1) { return 0f; } float num = 0f; float num2 = 0.5f; int num3 = 0; int num4 = pinCount - 1; for (int i = 0; i < num4; i++) { num += num2; num3++; if (num3 == 2) { num2 = Mathf.Max(0.05f, num2 - 0.05f); num3 = 0; } } return num; } [IteratorStateMachine(typeof(d__186))] private IEnumerator PinArrayFingerBladeAttackCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__186(0) { <>4__this = this }; } private void AddPinArrayEndActions(FsmState state) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown FsmStateAction[] array = new FsmStateAction[2]; CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("EndPinArraySpecial") { Value = "EndPinArraySpecial" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; array[0] = (FsmStateAction)val; array[1] = (FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.2f)), finishEvent = FsmEvent.Finished }; state.Actions = (FsmStateAction[])(object)array; } public void EndPinArraySpecial() { if (_pinArrayBladeAttackCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(_pinArrayBladeAttackCoroutine); _pinArrayBladeAttackCoroutine = null; } if (_pinArrayMainCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(_pinArrayMainCoroutine); _pinArrayMainCoroutine = null; } if ((Object)(object)_attackControl != (Object)null) { _attackControl.SendEvent("ATTACK START"); } _pinArrayAllPins.Clear(); _pinArrayWaveAPins.Clear(); _pinArrayWaveBPins.Clear(); GameObject? bossScene = _bossScene; object obj; if (bossScene == null) { obj = null; } else { Transform obj2 = bossScene.transform.Find("Spike Floors"); obj = ((obj2 != null) ? ((Component)obj2).gameObject : null); } GameObject spikeFloorsParent = (GameObject)obj; MemorySpikeFloorBehavior.ResumeSpikeSystem(spikeFloorsParent); Log.Info("[PinArray] 大招结束,已清理"); } private void SetFingerBladePinArraySlotsAndEnter(Vector3 center) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Expected O, but got Unknown float num = 6f; float num2 = 9f; Vector3[] array = (Vector3[])(object)new Vector3[6] { center + new Vector3(0f - num, num2, 0f), center + new Vector3(-2f * num, num2, 0f), center + new Vector3(-3f * num, num2, 0f), center + new Vector3(num, num2, 0f), center + new Vector3(2f * num, num2, 0f), center + new Vector3(3f * num, num2, 0f) }; for (int i = 0; i < _allFingerBlades.Length && i < array.Length; i++) { GameObject val = _allFingerBlades[i]; if ((Object)(object)val == (Object)null) { continue; } PlayMakerFSM val2 = FSMUtility.LocateMyFSM(val, "Control"); if (!((Object)(object)val2 == (Object)null)) { FsmVariables fsmVariables = val2.FsmVariables; FsmVector3 fsmVector = fsmVariables.GetFsmVector3("PinArray Slot Target"); if (fsmVector == null) { List list = fsmVariables.Vector3Variables.ToList(); fsmVector = new FsmVector3("PinArray Slot Target") { Value = array[i] }; list.Add(fsmVector); fsmVariables.Vector3Variables = list.ToArray(); fsmVariables.Init(); } else { fsmVector.Value = array[i]; } val2.SendEvent("PINARRAY_ENTER"); } } } } } namespace AnySilkBoss.Source.Behaviours.Common { internal class SilkBallBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__95 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float delay; public float acceleration; public float duration; public SilkBallBehavior <>4__this; private Vector2 5__1; private float 5__2; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__95(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) Vector2 val; switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: <>1__state = -1; if (!<>4__this.isActive || (Object)(object)<>4__this.rb2d == (Object)null) { return false; } 5__1 = Vector2.zero; if ((Object)(object)<>4__this.playerTransform != (Object)null) { val = Vector2.op_Implicit(<>4__this.playerTransform.position) - Vector2.op_Implicit(((Component)<>4__this).transform.position); 5__1 = ((Vector2)(ref val)).normalized; } if (5__1 == Vector2.zero) { return false; } goto IL_013b; case 2: <>1__state = -1; goto IL_013b; case 3: { <>1__state = -1; break; } IL_013b: val = <>4__this.rb2d.linearVelocity; if (((Vector2)(ref val)).magnitude > 1f) { Rigidbody2D? rb2d = <>4__this.rb2d; rb2d.linearVelocity *= 0.9f; <>2__current = (object)new WaitForSeconds(0.018f); <>1__state = 2; return true; } <>4__this.rb2d.linearVelocity = 5__1 * 8f; 5__2 = 0f; break; } if (5__2 < duration && <>4__this.isActive && (Object)(object)<>4__this.rb2d != (Object)null) { Rigidbody2D? rb2d2 = <>4__this.rb2d; rb2d2.linearVelocity += 5__1 * acceleration * Time.deltaTime; val = <>4__this.rb2d.linearVelocity; if (((Vector2)(ref val)).magnitude > 30f) { Rigidbody2D? rb2d3 = <>4__this.rb2d; val = <>4__this.rb2d.linearVelocity; rb2d3.linearVelocity = ((Vector2)(ref val)).normalized * 30f; } 5__2 += Time.deltaTime; <>2__current = null; <>1__state = 3; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__91 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SilkBallBehavior <>4__this; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__91(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.isChasing = false; <>4__this.canBeAbsorbed = false; if ((Object)(object)<>4__this.damageHero != (Object)null) { ((Behaviour)<>4__this.damageHero).enabled = false; } if ((Object)(object)<>4__this.mainCollider != (Object)null) { ((Behaviour)<>4__this.mainCollider).enabled = false; } <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.RecycleToPool(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [Header("物理参数")] public float acceleration = 30f; public float maxSpeed = 20f; public float chaseTime = 6f; public float scale = 1f; [Header("自转参数")] public bool enableRotation = true; public float rotationSpeed = 360f; [Header("反向加速度参数")] public Vector3 reverseAccelCenter = Vector3.zero; public float reverseAccelValue = 20f; public float initialOutwardSpeed = 15f; public float maxInwardSpeed = 25f; public float reverseAccelDuration = 10f; private bool isInReverseAccelMode = false; private bool hasReversedDirection = false; [Header("公转参数(最终爆炸阶段)")] private bool isInOrbitalMode = false; private Vector3 orbitalCenter; private float orbitalAngularSpeed = 0f; private float orbitalOutwardSpeed = 0f; [Header("状态标记")] public bool isActive = false; public bool isChasing = false; public bool isPrepared = false; public bool ignoreWallCollision = false; private bool isProtected = false; private float _protectionTimer = 0f; public bool canBeAbsorbed = false; private bool _delayDamageActivation = true; public bool triggerBlastOnDestroy = false; public bool canBeClearedByAttack = true; private bool _isAvailable = true; private Transform? _poolContainer; private PlayMakerFSM? controlFSM; private Rigidbody2D? rb2d; private Transform? playerTransform; internal Transform? customTarget; private DamageHero? damageHero; private SilkBallManager? silkBallManager; private DamageHero? originalDamageHero; private FWBlastManager? _blastManager; private Transform? spriteSilk; private Transform? Glow; private CircleCollider2D? mainCollider; private float _originalColliderRadius; private ParticleSystem? ptCollect; private ParticleSystem? ptDisappear; private FsmBool? readyVar; private FsmFloat? accelerationVar; private FsmFloat? maxSpeedVar; private FsmGameObject? targetGameObjectVar; private FsmGameObject? heroGameObjectVar; private FsmGameObject? spriteSilkObjVar; private FsmGameObject? glowObjVar; private FsmObject? damageHeroComponentVar; private FsmEvent? prepareEvent; private FsmEvent? releaseEvent; private FsmEvent? hitWallEvent; private FsmEvent? hitHeroEvent; private FsmEvent? reverseAccelEvent; private FsmEvent? hasGravityEvent; public bool IsAvailable => _isAvailable && !isActive; public bool IsInReverseAccelMode => isInReverseAccelMode; public bool HasReversedDirection => hasReversedDirection; private void Awake() { GetComponentReferences(); } private void Update() { if (_protectionTimer > 0f) { _protectionTimer -= Time.deltaTime; if (_protectionTimer <= 0f) { isProtected = false; if (!ignoreWallCollision) { UpdateRenderOrder(ignoreWall: false); } } } if (isActive && enableRotation) { ((Component)this).transform.Rotate(0f, 0f, rotationSpeed * Time.deltaTime); } if (isActive && isInOrbitalMode && (Object)(object)rb2d != (Object)null) { UpdateOrbitalMotion(); } } private void GetComponentReferences() { //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Expected O, but got Unknown if ((Object)(object)silkBallManager == (Object)null || (Object)(object)_blastManager == (Object)null) { GameObject cachedManagerObject = SilkBallManager.CachedManagerObject; if ((Object)(object)cachedManagerObject != (Object)null) { if ((Object)(object)silkBallManager == (Object)null) { silkBallManager = cachedManagerObject.GetComponent(); if ((Object)(object)silkBallManager == (Object)null) { Log.Warn("AnySilkBossManager 上未找到 SilkBallManager 组件"); } } if ((Object)(object)_blastManager == (Object)null) { _blastManager = cachedManagerObject.GetComponent(); } } else { Log.Warn("SilkBallManager.CachedManagerObject 为 null,无法获取管理器引用"); } } if ((Object)(object)originalDamageHero == (Object)null) { originalDamageHero = SilkBallManager.CachedOriginalDamageHero; } if ((Object)(object)playerTransform == (Object)null) { playerTransform = SilkBallManager.CachedHeroTransform; if ((Object)(object)playerTransform == (Object)null) { Log.Warn("SilkBallManager.CachedHeroTransform 为 null"); } } if ((Object)(object)rb2d == (Object)null) { rb2d = ((Component)this).GetComponent(); if ((Object)(object)rb2d == (Object)null) { rb2d = ((Component)this).gameObject.AddComponent(); } rb2d.gravityScale = 0f; rb2d.linearDamping = 0.5f; rb2d.bodyType = (RigidbodyType2D)0; rb2d.collisionDetectionMode = (CollisionDetectionMode2D)1; } if ((Object)(object)spriteSilk == (Object)null) { spriteSilk = ((Component)this).transform.Find("Sprite Silk"); if ((Object)(object)spriteSilk != (Object)null) { mainCollider = ((Component)spriteSilk).GetComponent(); if ((Object)(object)mainCollider != (Object)null) { ((Collider2D)mainCollider).isTrigger = true; ((Behaviour)mainCollider).enabled = true; CircleCollider2D? obj = mainCollider; obj.radius *= 0.5f; _originalColliderRadius = mainCollider.radius; } } } if ((Object)(object)Glow == (Object)null) { Glow = ((Component)this).transform.Find("Glow"); } if ((Object)(object)ptCollect == (Object)null) { Transform val = ((Component)this).transform.Find("Pt Collect"); if ((Object)(object)val != (Object)null) { ptCollect = ((Component)val).GetComponent(); if ((Object)(object)ptCollect != (Object)null) { val.localScale = Vector3.one * 2f; } } } if ((Object)(object)ptDisappear == (Object)null) { Transform val2 = ((Component)this).transform.Find("Pt Disappear"); if ((Object)(object)val2 != (Object)null) { ptDisappear = ((Component)val2).GetComponent(); if ((Object)(object)ptDisappear != (Object)null) { val2.localScale = Vector3.one * 2f; } } } if (!((Object)(object)damageHero == (Object)null) || !((Object)(object)spriteSilk != (Object)null)) { return; } damageHero = ((Component)spriteSilk).GetComponent(); if ((Object)(object)damageHero == (Object)null) { damageHero = ((Component)spriteSilk).gameObject.AddComponent(); } damageHero.damageDealt = 1; damageHero.hazardType = (HazardType)1; damageHero.overrideCollisionSide = true; damageHero.collisionSide = (CollisionSide)0; damageHero.canClashTink = false; damageHero.noClashFreeze = true; damageHero.noTerrainThunk = true; damageHero.noTerrainRecoil = true; damageHero.hasNonBouncer = false; damageHero.overrideCollisionSide = false; if ((Object)(object)originalDamageHero != (Object)null) { if (originalDamageHero.OnDamagedHero != null) { damageHero.OnDamagedHero = originalDamageHero.OnDamagedHero; } } else if (damageHero.OnDamagedHero == null) { damageHero.OnDamagedHero = new UnityEvent(); } ((Behaviour)damageHero).enabled = false; } public void InitializeOnce(Transform poolContainer, SilkBallManager? manager = null) { _poolContainer = poolContainer; ((Component)this).gameObject.SetActive(true); if ((Object)(object)manager != (Object)null) { silkBallManager = manager; } if ((Object)(object)silkBallManager == (Object)null) { GetComponentReferences(); } if ((Object)(object)silkBallManager == (Object)null) { Log.Error("无法获取 SilkBallManager 引用,InitializeOnce 失败"); return; } ((Component)this).gameObject.layer = LayerMask.NameToLayer("Enemy Attack"); if ((Object)(object)spriteSilk != (Object)null) { ((Component)spriteSilk).gameObject.layer = LayerMask.NameToLayer("Enemy Attack"); } if ((Object)(object)controlFSM == (Object)null) { CreateControlFSM(); } InitializeFsmVariableValues(); SetupCollisionForwarder(); SetupEventRegisters(); isActive = false; _isAvailable = true; } private void InitializeFsmVariableValues() { if (heroGameObjectVar != null && (Object)(object)playerTransform != (Object)null) { heroGameObjectVar.Value = ((Component)playerTransform).gameObject; } if (spriteSilkObjVar != null && (Object)(object)spriteSilk != (Object)null) { spriteSilkObjVar.Value = ((Component)spriteSilk).gameObject; } if (glowObjVar != null && (Object)(object)Glow != (Object)null) { glowObjVar.Value = ((Component)Glow).gameObject; } if (damageHeroComponentVar != null && (Object)(object)damageHero != (Object)null) { damageHeroComponentVar.Value = (Object)(object)damageHero; } } private void SetupCollisionForwarder() { if (!((Object)(object)spriteSilk == (Object)null)) { SilkBallCollisionForwarder silkBallCollisionForwarder = ((Component)spriteSilk).GetComponent(); if ((Object)(object)silkBallCollisionForwarder == (Object)null) { silkBallCollisionForwarder = ((Component)spriteSilk).gameObject.AddComponent(); } silkBallCollisionForwarder.parent = this; ((Behaviour)silkBallCollisionForwarder).enabled = true; } } private void SetupEventRegisters() { EventRegister[] components = ((Component)this).gameObject.GetComponents(); EventRegister val = null; EventRegister[] array = components; foreach (EventRegister val2 in array) { if (val2.SubscribedEvent == "SILK BALL RELEASE") { val = val2; break; } } if ((Object)(object)val == (Object)null) { val = ((Component)this).gameObject.AddComponent(); } SetEventRegisterFields(val, "SILK BALL RELEASE", controlFSM); } private void SetEventRegisterFields(EventRegister register, string eventName, PlayMakerFSM? targetFsm) { Type type = ((object)register).GetType(); FieldInfo field = type.GetField("subscribedEvent", BindingFlags.Instance | BindingFlags.NonPublic); FieldInfo field2 = type.GetField("targetFsm", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { field.SetValue(register, eventName); } if (field2 != null) { field2.SetValue(register, targetFsm); } register.SubscribedEvent = eventName; } public void PrepareForUse(Vector3 spawnPosition, float acceleration = 30f, float maxSpeed = 20f, float chaseTime = 6f, float scale = 1f, bool enableRotation = true, Transform? customTarget = null, bool ignoreWall = false, bool delayDamageActivation = true, bool canBeClearedByAttack = true) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)this).transform.parent == (Object)(object)_poolContainer) { ((Component)this).transform.SetParent((Transform)null); } ((Component)this).transform.position = spawnPosition; this.acceleration = acceleration; this.maxSpeed = maxSpeed; this.chaseTime = chaseTime; this.scale = scale; this.enableRotation = enableRotation; this.customTarget = customTarget; ignoreWallCollision = ignoreWall; _delayDamageActivation = delayDamageActivation; ApplyScale(); ResetState(); this.canBeClearedByAttack = canBeClearedByAttack; _isAvailable = false; isActive = true; UpdateRenderOrder(ignoreWall); if (!_delayDamageActivation && (Object)(object)damageHero != (Object)null) { ((Behaviour)damageHero).enabled = true; } if ((Object)(object)controlFSM != (Object)null) { if (controlFSM.Fsm.ActiveStateName == "Init") { controlFSM.Fsm.SetState("Idle"); } controlFSM.SendEvent("PREPARE"); } } private void UpdateRenderOrder(bool ignoreWall) { if ((Object)(object)spriteSilk == (Object)null) { return; } MeshRenderer component = ((Component)spriteSilk).GetComponent(); if ((Object)(object)component != (Object)null) { if (ignoreWall) { ((Renderer)component).sortingOrder = 10; } else { ((Renderer)component).sortingOrder = 0; } } } public void SetPhysics(Vector2 velocity, float gravityScale = 0f) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)rb2d != (Object)null) { rb2d.gravityScale = gravityScale; rb2d.bodyType = (RigidbodyType2D)0; rb2d.linearVelocity = velocity; } } public void SendFsmEvent(string eventName) { if ((Object)(object)controlFSM != (Object)null) { controlFSM.SendEvent(eventName); } } private void ResetState() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) isChasing = false; isPrepared = false; isProtected = false; canBeAbsorbed = false; triggerBlastOnDestroy = false; canBeClearedByAttack = true; if ((Object)(object)rb2d != (Object)null) { rb2d.linearVelocity = Vector2.zero; rb2d.gravityScale = 0f; } if ((Object)(object)damageHero != (Object)null) { ((Behaviour)damageHero).enabled = false; } if ((Object)(object)mainCollider != (Object)null) { ((Behaviour)mainCollider).enabled = true; } if ((Object)(object)spriteSilk != (Object)null) { ((Component)spriteSilk).gameObject.SetActive(true); } if ((Object)(object)Glow != (Object)null) { ((Component)Glow).gameObject.SetActive(true); } if (readyVar != null) { readyVar.Value = false; } if (accelerationVar != null) { accelerationVar.Value = acceleration; } if (maxSpeedVar != null) { maxSpeedVar.Value = maxSpeed; } } private void ApplyScale() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.localScale = Vector3.one * scale; if ((Object)(object)mainCollider != (Object)null && _originalColliderRadius > 0f) { mainCollider.radius = _originalColliderRadius; } } private void CreateControlFSM() { if ((Object)(object)controlFSM != (Object)null) { Log.Warn("Control FSM 已存在"); return; } controlFSM = ((Component)this).gameObject.AddComponent(); controlFSM.FsmName = "Control"; FsmState[] array = FsmStateBuilder.CreateStates(controlFSM.Fsm, ("Init", "初始化状态"), ("Idle", "静默状态,等待 PREPARE 事件"), ("Prepare", "准备状态,等待释放"), ("Chase Hero", "追逐玩家"), ("Disperse", "快速消散(碰到墙壁)"), ("Hit Hero Disperse", "碰到玩家消散(保持伤害启用)"), ("Disappear", "缓慢消失"), ("Recycle", "回收到对象池"), ("Has Gravity", "有重力状态"), ("Reverse Acceleration", "反向加速度状态 - 初始向外,受到指向圆心的恒定加速度")); FsmState val = array[0]; FsmState val2 = array[1]; FsmState val3 = array[2]; FsmState val4 = array[3]; FsmState val5 = array[4]; FsmState val6 = array[5]; FsmState val7 = array[6]; FsmState val8 = array[7]; FsmState val9 = array[8]; FsmState val10 = array[9]; controlFSM.Fsm.States = array; FsmEvent[] array2 = FsmStateBuilder.RegisterEvents(controlFSM, "PREPARE", "SILK BALL RELEASE", "HIT WALL", "HIT HERO", "REVERSE_ACCEL", "HAS_GRAVITY"); prepareEvent = array2[0]; releaseEvent = array2[1]; hitWallEvent = array2[2]; hitHeroEvent = array2[3]; reverseAccelEvent = array2[4]; hasGravityEvent = array2[5]; CreateFSMVariables(); AddInitActions(val); AddIdleActions(val2); AddPrepareActions(val3); AddChaseHeroActions(val4); AddDisperseActions(val5); AddHitHeroDisperseActions(val6); AddDisappearActions(val7); AddRecycleActions(val8); AddHasGravityActions(val9); AddReverseAccelerationActions(val10); FsmStateBuilder.SetFinishedTransition(val, val2); val2.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(prepareEvent, val3), FsmStateBuilder.CreateTransition(reverseAccelEvent, val10) }; val3.Transitions = (FsmTransition[])(object)new FsmTransition[3] { FsmStateBuilder.CreateTransition(releaseEvent, val4), FsmStateBuilder.CreateTransition(hasGravityEvent, val9), FsmStateBuilder.CreateTransition(reverseAccelEvent, val10) }; val4.Transitions = (FsmTransition[])(object)new FsmTransition[3] { FsmStateBuilder.CreateFinishedTransition(val7), FsmStateBuilder.CreateTransition(hitWallEvent, val5), FsmStateBuilder.CreateTransition(hitHeroEvent, val6) }; FsmStateBuilder.SetFinishedTransition(val5, val8); FsmStateBuilder.SetFinishedTransition(val6, val8); FsmStateBuilder.SetFinishedTransition(val7, val8); val9.Transitions = (FsmTransition[])(object)new FsmTransition[2] { FsmStateBuilder.CreateTransition(hitWallEvent, val5), FsmStateBuilder.CreateTransition(hitHeroEvent, val6) }; val10.Transitions = (FsmTransition[])(object)new FsmTransition[3] { FsmStateBuilder.CreateFinishedTransition(val5), FsmStateBuilder.CreateTransition(hitWallEvent, val5), FsmStateBuilder.CreateTransition(hitHeroEvent, val6) }; controlFSM.Fsm.InitData(); controlFSM.Fsm.HandleFixedUpdate = true; controlFSM.AddEventHandlerComponents(); Type type = ((object)controlFSM.Fsm).GetType(); FieldInfo field = type.GetField("started", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { field.SetValue(controlFSM.Fsm, true); } controlFSM.Fsm.SetState(val.Name); } private void CreateFSMVariables() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Expected O, but got Unknown readyVar = new FsmBool("Ready") { Value = false }; controlFSM.FsmVariables.BoolVariables = (FsmBool[])(object)new FsmBool[1] { readyVar }; accelerationVar = new FsmFloat("Acceleration") { Value = acceleration }; maxSpeedVar = new FsmFloat("MaxSpeed") { Value = maxSpeed }; controlFSM.FsmVariables.FloatVariables = (FsmFloat[])(object)new FsmFloat[2] { accelerationVar, maxSpeedVar }; targetGameObjectVar = new FsmGameObject("Target") { Value = null }; heroGameObjectVar = new FsmGameObject("HeroGameObject") { Value = null }; spriteSilkObjVar = new FsmGameObject("SpriteSilkObj") { Value = null }; glowObjVar = new FsmGameObject("GlowObj") { Value = null }; controlFSM.FsmVariables.GameObjectVariables = (FsmGameObject[])(object)new FsmGameObject[4] { targetGameObjectVar, heroGameObjectVar, spriteSilkObjVar, glowObjVar }; damageHeroComponentVar = new FsmObject("DamageHeroComponent") { Value = null }; controlFSM.FsmVariables.ObjectVariables = (FsmObject[])(object)new FsmObject[1] { damageHeroComponentVar }; controlFSM.FsmVariables.Init(); } private void AddInitActions(FsmState initState) { initState.Actions = (FsmStateAction[])(object)new FsmStateAction[0]; } private void AddIdleActions(FsmState idleState) { idleState.Actions = (FsmStateAction[])(object)new FsmStateAction[0]; } private void AddPrepareActions(FsmState prepareState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_002f: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Expected O, but got Unknown //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Expected O, but got Unknown //IL_01c3: Expected O, but got Unknown //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Expected O, but got Unknown //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Expected O, but got Unknown //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_0138: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Expected O, but got Unknown //IL_0154: Expected O, but got Unknown //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Expected O, but got Unknown //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Expected O, but got Unknown //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)new SetBoolValue { boolVariable = readyVar, boolValue = new FsmBool(FsmBool.op_Implicit(false)) }); list.Add((FsmStateAction)new SetVelocity2d { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, vector = new FsmVector2 { Value = Vector2.zero, UseVariable = false }, x = new FsmFloat { Value = 0f, UseVariable = false }, y = new FsmFloat { Value = 0f, UseVariable = false }, everyFrame = false }); if (silkBallManager?.InitAudioTable != null && silkBallManager?.InitAudioPlayerPrefab != null) { list.Add((FsmStateAction)new PlayRandomAudioClipTable { Table = silkBallManager.InitAudioTable, AudioPlayerPrefab = silkBallManager.InitAudioPlayerPrefab, SpawnPoint = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0, GameObject = new FsmGameObject { Value = ((Component)this).gameObject } }, SpawnPosition = new FsmVector3 { Value = Vector3.zero } }); } list.Add((FsmStateAction)(object)new EnableBehaviourDelay { behaviour = damageHeroComponentVar, enable = new FsmBool(FsmBool.op_Implicit(true)), delay = new FsmFloat(FsmFloat.op_Implicit(0.15f)), resetOnExit = false }); list.Add((FsmStateAction)new SetBoolValue { boolVariable = readyVar, boolValue = new FsmBool(FsmBool.op_Implicit(true)) }); list.Add((FsmStateAction)new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = spriteSilkObjVar }, activate = new FsmBool(FsmBool.op_Implicit(true)), recursive = FsmBool.op_Implicit(false), resetOnExit = false, everyFrame = false }); if (glowObjVar != null) { list.Add((FsmStateAction)new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = glowObjVar }, activate = new FsmBool(FsmBool.op_Implicit(true)), recursive = FsmBool.op_Implicit(false), resetOnExit = false, everyFrame = false }); } prepareState.Actions = list.ToArray(); } private void AddChaseHeroActions(FsmState chaseState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Expected O, but got Unknown //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StartChase") { Value = "StartChase" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; EnableBehaviourDelay enableBehaviourDelay = new EnableBehaviourDelay { behaviour = damageHeroComponentVar, enable = new FsmBool(FsmBool.op_Implicit(true)), delay = new FsmFloat(FsmFloat.op_Implicit(0.15f)), resetOnExit = false }; ChaseTargetAction chaseTargetAction = new ChaseTargetAction { targetGameObject = targetGameObjectVar, acceleration = (FsmFloat)(((object)accelerationVar) ?? ((object)new FsmFloat { Value = acceleration })), maxSpeed = (FsmFloat)(((object)maxSpeedVar) ?? ((object)new FsmFloat { Value = maxSpeed })), useRigidbody = new FsmBool { Value = true }, chaseTime = new FsmFloat { Value = 0f }, reachDistance = new FsmFloat { Value = 0.1f } }; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(chaseTime)), finishEvent = FsmEvent.Finished }; chaseState.Actions = (FsmStateAction[])(object)new FsmStateAction[4] { (FsmStateAction)val2, enableBehaviourDelay, chaseTargetAction, (FsmStateAction)val3 }; } private void AddDisperseActions(FsmState disperseState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Expected O, but got Unknown //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Expected O, but got Unknown //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Expected O, but got Unknown //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Expected O, but got Unknown //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Expected O, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Expected O, but got Unknown //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Expected O, but got Unknown //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Expected O, but got Unknown //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Expected O, but got Unknown //IL_02a7: Expected O, but got Unknown //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Expected O, but got Unknown //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("TriggerBlastIfNeeded") { Value = "TriggerBlastIfNeeded" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)(object)new EnableBehaviourDelay { behaviour = damageHeroComponentVar, enable = new FsmBool(FsmBool.op_Implicit(false)), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), resetOnExit = false }); list.Add((FsmStateAction)new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = spriteSilkObjVar }, activate = new FsmBool(FsmBool.op_Implicit(false)), recursive = FsmBool.op_Implicit(false), resetOnExit = false, everyFrame = false }); if (glowObjVar != null) { list.Add((FsmStateAction)new ActivateGameObject { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = glowObjVar }, activate = new FsmBool(FsmBool.op_Implicit(false)), recursive = FsmBool.op_Implicit(false), resetOnExit = false, everyFrame = false }); } val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StopChase") { Value = "StopChase" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new DecelerateV2 { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, deceleration = new FsmFloat(FsmFloat.op_Implicit(0.8f)), brakeOnExit = true }); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("PlayCollectParticle") { Value = "PlayCollectParticle" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); if (silkBallManager?.GetSilkAudioTable != null && silkBallManager?.GetSilkAudioPlayerPrefab != null) { PlayRandomAudioClipTable val2 = new PlayRandomAudioClipTable { Table = silkBallManager.GetSilkAudioTable, AudioPlayerPrefab = silkBallManager.GetSilkAudioPlayerPrefab, SpawnPoint = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0, GameObject = new FsmGameObject { Value = ((Component)this).gameObject } }, SpawnPosition = new FsmVector3 { Value = Vector3.zero }, fsmState = disperseState, fsmComponent = controlFSM }; PlayMakerFSM? obj = controlFSM; ((FsmStateAction)val2).fsm = ((obj != null) ? obj.Fsm : null); PlayMakerFSM? obj2 = controlFSM; ((FsmStateAction)val2).owner = ((obj2 != null) ? ((Component)obj2).gameObject : null); list.Add((FsmStateAction)val2); } list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.6f)), finishEvent = FsmEvent.Finished }); disperseState.Actions = list.ToArray(); } private void AddHitHeroDisperseActions(FsmState hitHeroDisperseState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Expected O, but got Unknown //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Expected O, but got Unknown //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Expected O, but got Unknown //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Expected O, but got Unknown //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Expected O, but got Unknown //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Expected O, but got Unknown //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Expected O, but got Unknown //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Expected O, but got Unknown //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Expected O, but got Unknown //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Expected O, but got Unknown //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Expected O, but got Unknown //IL_02ab: Expected O, but got Unknown //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Expected O, but got Unknown //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Expected O, but got Unknown List list = new List(); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("TriggerBlastIfNeeded") { Value = "TriggerBlastIfNeeded" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)(object)new EnableBehaviourDelay { behaviour = damageHeroComponentVar, enable = new FsmBool(FsmBool.op_Implicit(false)), delay = new FsmFloat(FsmFloat.op_Implicit(0.03f)), resetOnExit = false }); list.Add((FsmStateAction)new ActivateGameObjectDelay { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = spriteSilkObjVar }, activate = new FsmBool(FsmBool.op_Implicit(false)), delay = new FsmFloat(FsmFloat.op_Implicit(0.03f)), resetOnExit = false }); if (glowObjVar != null) { list.Add((FsmStateAction)new ActivateGameObjectDelay { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = glowObjVar }, activate = new FsmBool(FsmBool.op_Implicit(false)), delay = new FsmFloat(FsmFloat.op_Implicit(0.03f)), resetOnExit = false }); } val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StopChase") { Value = "StopChase" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new DecelerateV2 { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, deceleration = new FsmFloat(FsmFloat.op_Implicit(0.8f)), brakeOnExit = true }); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("PlayCollectParticle") { Value = "PlayCollectParticle" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); if (silkBallManager?.GetSilkAudioTable != null && silkBallManager?.GetSilkAudioPlayerPrefab != null) { PlayRandomAudioClipTable val2 = new PlayRandomAudioClipTable { Table = silkBallManager.GetSilkAudioTable, AudioPlayerPrefab = silkBallManager.GetSilkAudioPlayerPrefab, SpawnPoint = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0, GameObject = new FsmGameObject { Value = ((Component)this).gameObject } }, SpawnPosition = new FsmVector3 { Value = Vector3.zero }, fsmState = hitHeroDisperseState, fsmComponent = controlFSM }; PlayMakerFSM? obj = controlFSM; ((FsmStateAction)val2).fsm = ((obj != null) ? obj.Fsm : null); PlayMakerFSM? obj2 = controlFSM; ((FsmStateAction)val2).owner = ((obj2 != null) ? ((Component)obj2).gameObject : null); list.Add((FsmStateAction)val2); } list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.6f)), finishEvent = FsmEvent.Finished }); hitHeroDisperseState.Actions = list.ToArray(); } private void AddDisappearActions(FsmState disappearState) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Expected O, but got Unknown //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Expected O, but got Unknown //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Expected O, but got Unknown //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Expected O, but got Unknown List list = new List(); list.Add((FsmStateAction)(object)new EnableBehaviourDelay { behaviour = damageHeroComponentVar, enable = new FsmBool(FsmBool.op_Implicit(false)), delay = new FsmFloat(FsmFloat.op_Implicit(0f)), resetOnExit = false }); CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StopChase") { Value = "StopChase" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); list.Add((FsmStateAction)new DecelerateV2 { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, deceleration = new FsmFloat(FsmFloat.op_Implicit(0.8f)), brakeOnExit = true }); val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("PlayCollectParticle") { Value = "PlayCollectParticle" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; list.Add((FsmStateAction)(object)val); if (spriteSilkObjVar != null) { list.Add((FsmStateAction)new Tk2dPlayAnimationWithEvents { gameObject = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)1, GameObject = spriteSilkObjVar }, clipName = new FsmString("Bundle Disappear") { Value = "Bundle Disappear" }, animationTriggerEvent = null, animationCompleteEvent = null }); } list.Add((FsmStateAction)new Wait { time = new FsmFloat(FsmFloat.op_Implicit(0.9f)), finishEvent = FsmEvent.Finished }); disappearState.Actions = list.ToArray(); } private void AddRecycleActions(FsmState recycleState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("RecycleToPool") { Value = "RecycleToPool" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; recycleState.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)val2 }; } private void AddHasGravityActions(FsmState hasGravityState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("StopChase") { Value = "StopChase" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(10f)), finishEvent = FsmEvent.Finished }; hasGravityState.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)val2, (FsmStateAction)val3 }; } private void AddReverseAccelerationActions(FsmState reverseAccelState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Expected O, but got Unknown //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown CallMethod val = new CallMethod(); val.behaviour = new FsmObject { Value = (Object)(object)this }; val.methodName = new FsmString("InitReverseAcceleration") { Value = "InitReverseAcceleration" }; val.parameters = (FsmVar[])(object)new FsmVar[0]; CallMethod val2 = val; ReverseAccelerationAction reverseAccelerationAction = new ReverseAccelerationAction { centerPoint = new FsmVector3 { Value = reverseAccelCenter }, initialOutwardSpeed = new FsmFloat { Value = initialOutwardSpeed }, reverseAcceleration = new FsmFloat { Value = reverseAccelValue }, maxInwardSpeed = new FsmFloat { Value = maxInwardSpeed }, returnThreshold = new FsmFloat { Value = 0.5f }, maxDuration = new FsmFloat { Value = reverseAccelDuration }, finishOnWallHit = new FsmBool { Value = true } }; Wait val3 = new Wait { time = new FsmFloat(FsmFloat.op_Implicit(reverseAccelDuration)), finishEvent = FsmEvent.Finished }; reverseAccelState.Actions = (FsmStateAction[])(object)new FsmStateAction[3] { (FsmStateAction)val2, reverseAccelerationAction, (FsmStateAction)val3 }; } public void TriggerBlastIfNeeded() { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) if (!triggerBlastOnDestroy) { return; } if ((Object)(object)_blastManager == (Object)null) { GameObject cachedManagerObject = SilkBallManager.CachedManagerObject; if ((Object)(object)cachedManagerObject != (Object)null) { _blastManager = cachedManagerObject.GetComponent(); } } Log.Debug("[SilkBall] 触发 Blast 攻击"); if ((Object)(object)_blastManager != (Object)null && _blastManager.IsInitialized) { _blastManager.SpawnBombBlast(((Component)this).transform.position); Log.Debug($"[SilkBall] 触发 Blast at {((Component)this).transform.position}"); } else { Log.Warn("[SilkBall] FWBlastManager 未就绪,无法触发 Blast"); } } public void StartChase() { isChasing = true; GameObject val = null; if ((Object)(object)customTarget != (Object)null && Object.op_Implicit((Object)(object)customTarget)) { val = ((Component)customTarget).gameObject; } else if (heroGameObjectVar != null && (Object)(object)heroGameObjectVar.Value != (Object)null && Object.op_Implicit((Object)(object)heroGameObjectVar.Value)) { val = heroGameObjectVar.Value; } else if ((Object)(object)playerTransform != (Object)null && Object.op_Implicit((Object)(object)playerTransform)) { val = ((Component)playerTransform).gameObject; } else { Log.Warn("[SilkBallBehavior] StartChase: 玩家引用为空,无法追踪"); } if (targetGameObjectVar != null && (Object)(object)val != (Object)null) { targetGameObjectVar.Value = val; } } public void StopChase() { isChasing = false; } public void PlayCollectParticle() { if ((Object)(object)ptCollect != (Object)null) { ptCollect.Play(); } } public void RecycleToPool() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)this).StopAllCoroutines(); isActive = false; _isAvailable = true; isChasing = false; isPrepared = false; isProtected = false; canBeAbsorbed = false; triggerBlastOnDestroy = false; isInReverseAccelMode = false; hasReversedDirection = false; isInOrbitalMode = false; orbitalAngularSpeed = 0f; orbitalOutwardSpeed = 0f; canBeClearedByAttack = true; if ((Object)(object)rb2d != (Object)null) { rb2d.linearVelocity = Vector2.zero; rb2d.gravityScale = 0f; } if ((Object)(object)damageHero != (Object)null) { ((Behaviour)damageHero).enabled = false; } customTarget = null; if ((Object)(object)spriteSilk != (Object)null) { ((Component)spriteSilk).gameObject.SetActive(false); } if ((Object)(object)Glow != (Object)null) { ((Component)Glow).gameObject.SetActive(false); } if (readyVar != null) { readyVar.Value = false; } if ((Object)(object)_poolContainer != (Object)null) { ((Component)this).transform.SetParent(_poolContainer); } if ((Object)(object)controlFSM != (Object)null) { controlFSM.Fsm.SetState("Idle"); } } public void RecycleToPoolWithZTransition() { ((MonoBehaviour)this).StartCoroutine(RecycleToPoolWithZTransitionCoroutine()); } [IteratorStateMachine(typeof(d__91))] private IEnumerator RecycleToPoolWithZTransitionCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__91(0) { <>4__this = this }; } public void SetInitialVelocity(Vector2 velocity) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)rb2d != (Object)null) { rb2d.linearVelocity = velocity; } } public void SetGravityScale(float gravityScale) { if ((Object)(object)rb2d != (Object)null) { rb2d.gravityScale = gravityScale; } } public void ApplyDelayedBoostTowardsHero(float delay, float acceleration, float duration = 2f) { ((MonoBehaviour)this).StartCoroutine(DelayedBoostCoroutine(delay, acceleration, duration)); } [IteratorStateMachine(typeof(d__95))] private IEnumerator DelayedBoostCoroutine(float delay, float acceleration, float duration) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__95(0) { <>4__this = this, delay = delay, acceleration = acceleration, duration = duration }; } public void SetRotation(bool enable) { enableRotation = enable; } public void StartOrbitalMotion(Vector3 center, float angularSpeed, float outwardSpeed) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) orbitalCenter = center; orbitalAngularSpeed = angularSpeed; orbitalOutwardSpeed = outwardSpeed; isInOrbitalMode = true; Log.Debug($"丝球启动公转模式 - 圆心: {center}, 角速度: {angularSpeed}°/s, 向外速度: {outwardSpeed}"); } public void StopOrbitalMotion() { isInOrbitalMode = false; orbitalAngularSpeed = 0f; orbitalOutwardSpeed = 0f; } private void UpdateOrbitalMotion() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)rb2d == (Object)null)) { Vector2 val = Vector2.op_Implicit(((Component)this).transform.position) - Vector2.op_Implicit(orbitalCenter); Vector2 normalized = ((Vector2)(ref val)).normalized; Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(0f - normalized.y, normalized.x); float num = Vector2.Distance(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(orbitalCenter)); float num2 = orbitalAngularSpeed * (MathF.PI / 180f) * num; Vector2 linearVelocity = normalized * orbitalOutwardSpeed + val2 * num2; rb2d.linearVelocity = linearVelocity; } } public void MarkAsPrepared() { isPrepared = true; if ((Object)(object)spriteSilk != (Object)null) { ((Component)spriteSilk).gameObject.SetActive(true); } if ((Object)(object)Glow != (Object)null) { ((Component)Glow).gameObject.SetActive(true); } } public void InitReverseAcceleration() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) isInReverseAccelMode = true; hasReversedDirection = false; Vector2 val = Vector2.op_Implicit(((Component)this).transform.position) - Vector2.op_Implicit(reverseAccelCenter); Vector2 normalized = ((Vector2)(ref val)).normalized; if ((Object)(object)rb2d != (Object)null) { rb2d.linearVelocity = normalized * initialOutwardSpeed; rb2d.gravityScale = 0f; } } public void ConfigureReverseAcceleration(Vector3 center, float accel = 20f, float outSpeed = 15f, float inSpeed = 25f, float duration = 10f) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) reverseAccelCenter = center; reverseAccelValue = accel; initialOutwardSpeed = outSpeed; maxInwardSpeed = inSpeed; reverseAccelDuration = duration; } public void StartReverseAccelerationMode() { if ((Object)(object)controlFSM != (Object)null) { controlFSM.SendEvent("REVERSE_ACCEL"); } } public void MarkDirectionReversed() { hasReversedDirection = true; } public void HandleCollision(GameObject otherObject) { if (!isActive || (Object)(object)controlFSM == (Object)null) { return; } MemoryBigSilkBallCollisionBox component = otherObject.GetComponent(); if ((Object)(object)component != (Object)null) { return; } int num = LayerMask.NameToLayer("Terrain"); int num2 = LayerMask.NameToLayer("Default"); if (otherObject.layer == num || otherObject.layer == num2) { if (!ignoreWallCollision && !isProtected) { controlFSM.SendEvent("HIT WALL"); } return; } int num3 = LayerMask.NameToLayer("Hero Box"); if (otherObject.layer == num3) { if (!isProtected) { controlFSM.SendEvent("HIT HERO"); } } else if ((isChasing || isInReverseAccelMode) && (otherObject.CompareTag("Nail Attack") || otherObject.layer == 17) && SilkBallManager.IsReaperCrestEquipped && canBeClearedByAttack) { controlFSM.SendEvent("HIT WALL"); } } public void StartProtectionTime(float duration) { isProtected = true; _protectionTimer = duration; UpdateRenderOrder(ignoreWall: true); } } internal class SilkBallCollisionForwarder : MonoBehaviour { public SilkBallBehavior? parent; private void OnTriggerEnter2D(Collider2D other) { if ((Object)(object)parent != (Object)null) { parent.HandleCollision(((Component)other).gameObject); } } private void OnCollisionEnter2D(Collision2D collision) { if ((Object)(object)parent != (Object)null) { parent.HandleCollision(collision.gameObject); } } } internal class SingleWebBehavior : MonoBehaviour { [CompilerGenerated] private sealed class d__37 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float appearDelay; public float burstDelay; public SingleWebBehavior <>4__this; object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object? IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__37(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Expected O, but got Unknown //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)<>4__this._controlFsm == (Object)null) { Log.Error("Control FSM 为 null,无法执行攻击: " + ((Object)((Component)<>4__this).gameObject).name); return false; } <>4__this._isAttacking = true; <>4__this._isAvailable = false; Log.Debug("--- 开始攻击: " + ((Object)((Component)<>4__this).gameObject).name + " ---"); if ((Object)(object)((Component)<>4__this).transform.parent == (Object)(object)<>4__this._poolContainer) { ((Component)<>4__this).transform.SetParent((Transform)null); } if (appearDelay > 0f) { <>2__current = (object)new WaitForSeconds(appearDelay); <>1__state = 1; return true; } goto IL_0124; case 1: <>1__state = -1; goto IL_0124; case 2: <>1__state = -1; <>4__this._controlFsm.SendEvent("BURST"); <>4__this.EnableDamageHero(); <>2__current = (object)new WaitForSeconds(1.75f); <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this.DisableDamageHero(); <>4__this.ResetToPoolContainer(); <>4__this._isAttacking = false; Log.Debug($"--- 攻击结束: {((Object)((Component)<>4__this).gameObject).name},开始 {6f}s 冷却 ---"); <>2__current = (object)new WaitForSeconds(6f); <>1__state = 4; return true; case 4: { <>1__state = -1; <>4__this._isAvailable = true; return false; } IL_0124: <>4__this._controlFsm.SendEvent("APPEAR"); <>2__current = (object)new WaitForSeconds(burstDelay); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private PlayMakerFSM? _controlFsm; private DamageHero? _damageHero; private Transform? _heroCatcher; private Transform? _poolContainer; private bool _isAvailable = true; private const float CooldownDuration = 6f; private bool _isAttacking = false; private Transform? _followTarget; private Vector3 _followOffset = Vector3.zero; private bool _enableFollowTarget = false; private bool _enableContinuousRotation = false; private float _continuousRotationSpeed = 0f; private AudioClip? _appearAudioClip; private AudioClip? _burstAudioClip; private GameObject? _audioPlayerPrefab; private bool _enableAudio = true; private FsmStateAction? _appearAudioAction; private FsmStateAction? _burstAudioAction; private bool _initialized = false; public bool IsAvailable => _isAvailable && !_isAttacking; public bool IsAttacking => _isAttacking; private void Awake() { ((Component)this).gameObject.SetActive(true); } private void OnEnable() { if (!_initialized) { InitializeBehavior(); } } private void OnDisable() { ((MonoBehaviour)this).StopAllCoroutines(); _isAttacking = false; ResetDynamicSettings(); } private void LateUpdate() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) if (_isAttacking) { if (_enableFollowTarget && (Object)(object)_followTarget != (Object)null) { ((Component)this).transform.position = _followTarget.position + _followOffset; } if (_enableContinuousRotation && Mathf.Abs(_continuousRotationSpeed) > 0.001f) { ((Component)this).transform.Rotate(0f, 0f, _continuousRotationSpeed * Time.deltaTime); } } } public void InitializeBehavior(Transform? poolContainer = null) { if (_initialized) { Log.Debug("SingleWebBehavior 已初始化: " + ((Object)((Component)this).gameObject).name); return; } _poolContainer = poolContainer; _controlFsm = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Control"); if ((Object)(object)_controlFsm == (Object)null) { Log.Error("未找到 Control FSM,初始化失败: " + ((Object)((Component)this).gameObject).name); return; } _heroCatcher = FindChildRecursive(((Component)this).transform, "hero_catcher"); if ((Object)(object)_heroCatcher == (Object)null) { Log.Error("未找到 hero_catcher,初始化失败: " + ((Object)((Component)this).gameObject).name); return; } _damageHero = ((Component)_heroCatcher).GetComponent(); if ((Object)(object)_damageHero == (Object)null) { Log.Warn(" hero_catcher 没有 DamageHero 组件,跳过"); } else { ((Behaviour)_damageHero).enabled = false; } CacheAudioResources(); ModifyControlFsm(); DisableHornetCatchFsm(); _initialized = true; } private void CacheAudioResources() { GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val == (Object)null) { Log.Warn("未找到 AnySilkBossManager,无法获取音频资源"); return; } SingleWebManager component = val.GetComponent(); if ((Object)(object)component == (Object)null) { Log.Warn("未找到 SingleWebManager 组件,无法获取音频资源"); return; } _appearAudioClip = component.AppearAudioClip; _burstAudioClip = component.BurstAudioClip; _audioPlayerPrefab = component.AudioPlayerPrefab; if ((Object)(object)_appearAudioClip != (Object)null && (Object)(object)_burstAudioClip != (Object)null) { Log.Debug("音频资源已缓存: appear=" + ((Object)_appearAudioClip).name + ", burst=" + ((Object)_burstAudioClip).name); } } private void ModifyControlFsm() { //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown if ((Object)(object)_controlFsm == (Object)null) { Log.Error("Control FSM 为 null,无法修改"); return; } AddAppearAudio(); AddBurstAudio(); FsmState val = ((IEnumerable)_controlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Catch Hero")); if (val == null) { Log.Warn("未找到 Catch Hero 状态,跳过修改"); return; } List list = val.Actions.ToList(); list.Clear(); val.Actions = list.ToArray(); FsmState val2 = ((IEnumerable)_controlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Catch Cancel")); if (val2 != null) { val.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("FINISHED"), ToFsmState = val2, ToState = "Catch Cancel" } }; } _controlFsm.Fsm.InitData(); } private void AddAppearAudio() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Expected O, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Expected O, but got Unknown //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown if (!((Object)(object)_controlFsm == (Object)null) && !((Object)(object)_appearAudioClip == (Object)null) && !((Object)(object)_audioPlayerPrefab == (Object)null)) { FsmState val = ((IEnumerable)_controlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Appear")); if (val == null) { Log.Warn("未找到 Appear 状态,无法添加出现音效"); return; } PlayAudioEvent item = (PlayAudioEvent)(object)(_appearAudioAction = (FsmStateAction?)new PlayAudioEvent { Fsm = _controlFsm.Fsm, audioClip = new FsmObject { Value = (Object)(object)_appearAudioClip }, audioPlayerPrefab = new FsmObject { Value = (Object)(object)_audioPlayerPrefab.GetComponent() }, pitchMin = new FsmFloat { Value = 1f }, pitchMax = new FsmFloat { Value = 1f }, volume = new FsmFloat { Value = 1f }, spawnPoint = new FsmOwnerDefault { OwnerOption = (OwnerDefaultOption)0 }, spawnPosition = new FsmVector3 { Value = Vector3.zero }, SpawnedPlayerRef = new FsmGameObject { Value = null }, Enabled = _enableAudio }); List list = val.Actions.ToList(); list.Insert(0, (FsmStateAction)(object)item); val.Actions = list.ToArray(); Log.Debug($"已在 Appear 状态添加出现音效: {((Object)_appearAudioClip).name}, Enabled={_enableAudio}"); } } private void AddBurstAudio() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Expected O, but got Unknown //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Expected O, but got Unknown //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Expected O, but got Unknown //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Expected O, but got Unknown if (!((Object)(object)_controlFsm == (Object)null) && !((Object)(object)_burstAudioClip == (Object)null) && !((Object)(object)_audioPlayerPrefab == (Object)null)) { FsmState val = ((IEnumerable)_controlFsm.FsmStates).FirstOrDefault((Func)((FsmState s) => s.Name == "Burst Start")); if (val == null) { Log.Warn("未找到 Burst Start 状态,无法添加爆发音效"); return; } AudioPlayerOneShotSingleV2 item = (AudioPlayerOneShotSingleV2)(object)(_burstAudioAction = (FsmStateAction?)new AudioPlayerOneShotSingleV2 { Fsm = _controlFsm.Fsm, audioPlayer = new FsmGameObject { Value = _audioPlayerPrefab }, spawnPoint = new FsmGameObject { Value = ((Component)this).gameObject }, audioClip = new FsmObject { Value = (Object)(object)_burstAudioClip }, pitchMin = new FsmFloat { Value = 1f }, pitchMax = new FsmFloat { Value = 1f }, volume = new FsmFloat { Value = 1f }, delay = new FsmFloat { Value = 0.5f }, playVibration = new FsmBool { Value = false }, vibrationDataAsset = new FsmObject { Value = null }, storePlayer = new FsmGameObject { Value = null }, Enabled = _enableAudio }); List list = val.Actions.ToList(); list.Insert(0, (FsmStateAction)(object)item); val.Actions = list.ToArray(); Log.Debug($"已在 Burst Start 状态添加爆发音效: {((Object)_burstAudioClip).name}, Enabled={_enableAudio}"); } } private void DisableHornetCatchFsm() { PlayMakerFSM val = FSMUtility.LocateMyFSM(((Component)this).gameObject, "Hornet Catch"); if ((Object)(object)val != (Object)null) { ((Behaviour)val).enabled = false; } } public void TriggerAttack(float appearDelay = 0f, float burstDelay = 0.75f) { if (!_isAvailable) { Log.Warn("丝线 " + ((Object)((Component)this).gameObject).name + " 正在冷却中,无法触发攻击"); } else if (_isAttacking) { Log.Warn("丝线 " + ((Object)((Component)this).gameObject).name + " 正在攻击中,无法重复触发"); } else { ((MonoBehaviour)this).StartCoroutine(AttackCoroutine(appearDelay, burstDelay)); } } public void ConfigureFollowTarget(Transform? target, Vector3? offset = null) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) _followTarget = target; _followOffset = (Vector3)(((??)offset) ?? Vector3.zero); _enableFollowTarget = (Object)(object)target != (Object)null; } public void ConfigureContinuousRotation(bool enable, float rotationSpeed) { _enableContinuousRotation = enable; _continuousRotationSpeed = (enable ? rotationSpeed : 0f); } public void SetAudioEnabled(bool enabled) { _enableAudio = enabled; if (_appearAudioAction != null) { _appearAudioAction.Enabled = enabled; } if (_burstAudioAction != null) { _burstAudioAction.Enabled = enabled; } } [IteratorStateMachine(typeof(d__37))] private IEnumerator AttackCoroutine(float appearDelay, float burstDelay) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__37(0) { <>4__this = this, appearDelay = appearDelay, burstDelay = burstDelay }; } public void StopAttack() { ((MonoBehaviour)this).StopAllCoroutines(); _isAttacking = false; DisableDamageHero(); ResetDynamicSettings(); ResetToPoolContainer(); } public void ResetCooldown() { _isAvailable = true; } private void ResetToPoolContainer() { ResetDynamicSettings(); if ((Object)(object)_controlFsm != (Object)null) { _controlFsm.SendEvent("ATTACK CLEAR"); } if ((Object)(object)_poolContainer != (Object)null) { ((Component)this).transform.SetParent(_poolContainer); } } private void ResetDynamicSettings() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) _followTarget = null; _followOffset = Vector3.zero; _enableFollowTarget = false; _enableContinuousRotation = false; _continuousRotationSpeed = 0f; SetAudioEnabled(enabled: true); } private void EnableDamageHero() { if ((Object)(object)_damageHero != (Object)null) { ((Behaviour)_damageHero).enabled = true; } } private void DisableDamageHero() { if ((Object)(object)_damageHero != (Object)null) { ((Behaviour)_damageHero).enabled = false; } } public void SetDamageHeroEvent(DamageHero originalDamageHero) { if ((Object)(object)_damageHero == (Object)null) { Log.Warn("DamageHero 组件为 null,无法设置事件: " + ((Object)((Component)this).gameObject).name); } else if ((Object)(object)originalDamageHero != (Object)null && originalDamageHero.OnDamagedHero != null) { _damageHero.OnDamagedHero = originalDamageHero.OnDamagedHero; } } public void SetPoolContainer(Transform poolContainer) { _poolContainer = poolContainer; } private Transform? FindChildRecursive(Transform parent, string childName) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown Transform val = parent.Find(childName); if ((Object)(object)val != (Object)null) { return val; } foreach (Transform item in parent) { Transform parent2 = item; val = FindChildRecursive(parent2, childName); if ((Object)(object)val != (Object)null) { return val; } } return null; } } } namespace AnySilkBoss.Source.Actions { public class ChaseTargetAction : FsmStateAction { [Tooltip("追踪目标的 Transform(可选,如果不设置则使用 targetGameObject)")] public FsmGameObject targetGameObject; [Tooltip("追踪目标的 Transform(直接引用,优先级高于 targetGameObject)")] public Transform? targetTransform; [Tooltip("加速度(单位/秒²)")] public FsmFloat acceleration; [Tooltip("最大速度(单位/秒)")] public FsmFloat maxSpeed; [Tooltip("是否使用刚体移动(true=通过 Rigidbody2D.velocity,false=直接移动 Transform)")] public FsmBool useRigidbody; [Tooltip("追踪时间(秒),<=0 表示无限追踪")] public FsmFloat chaseTime; [Tooltip("到达目标的距离阈值,到达后触发 onReachTarget 事件")] public FsmFloat reachDistance; [Tooltip("到达目标时触发的事件")] public FsmEvent? onReachTarget; [Tooltip("追踪超时时触发的事件")] public FsmEvent? onTimeout; private Rigidbody2D? rb2d; private Transform? selfTransform; private Transform? resolvedTarget; private float elapsedTime; public override void Reset() { targetGameObject = null; targetTransform = null; acceleration = FsmFloat.op_Implicit(30f); maxSpeed = FsmFloat.op_Implicit(20f); useRigidbody = FsmBool.op_Implicit(true); chaseTime = FsmFloat.op_Implicit(0f); reachDistance = FsmFloat.op_Implicit(0.5f); onReachTarget = null; onTimeout = null; } public override void OnEnter() { if ((Object)(object)((FsmStateAction)this).Owner == (Object)null) { ((FsmStateAction)this).Log("ChaseTargetAction: Owner 为 null"); ((FsmStateAction)this).Finish(); return; } selfTransform = ((FsmStateAction)this).Owner.transform; elapsedTime = 0f; resolvedTarget = ResolveTarget(); if ((Object)(object)resolvedTarget == (Object)null) { ((FsmStateAction)this).Log("ChaseTargetAction: 未找到追踪目标"); ((FsmStateAction)this).Finish(); } else if (useRigidbody.Value) { rb2d = ((FsmStateAction)this).Owner.GetComponent(); if ((Object)(object)rb2d == (Object)null) { ((FsmStateAction)this).Log("ChaseTargetAction: 需要使用刚体但未找到 Rigidbody2D"); ((FsmStateAction)this).Finish(); } } } public override void OnUpdate() { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) if (useRigidbody.Value) { return; } if ((Object)(object)selfTransform == (Object)null || (Object)(object)resolvedTarget == (Object)null) { ((FsmStateAction)this).Finish(); return; } float deltaTime = Time.deltaTime; elapsedTime += deltaTime; if (chaseTime.Value > 0f && elapsedTime >= chaseTime.Value) { if (onTimeout != null) { ((FsmStateAction)this).Fsm.Event(onTimeout); } ((FsmStateAction)this).Finish(); return; } Vector2 val = Vector2.op_Implicit(resolvedTarget.position) - Vector2.op_Implicit(selfTransform.position); Vector2 normalized = ((Vector2)(ref val)).normalized; float num = Vector2.Distance(Vector2.op_Implicit(selfTransform.position), Vector2.op_Implicit(resolvedTarget.position)); if (num <= reachDistance.Value) { if (onReachTarget != null) { ((FsmStateAction)this).Fsm.Event(onReachTarget); } ((FsmStateAction)this).Finish(); } else { float num2 = Mathf.Min(acceleration.Value * elapsedTime, maxSpeed.Value); Transform? obj = selfTransform; obj.position += Vector2.op_Implicit(normalized * num2 * deltaTime); } } public override void OnFixedUpdate() { //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) if (!useRigidbody.Value) { return; } if ((Object)(object)selfTransform == (Object)null || (Object)(object)resolvedTarget == (Object)null) { ((FsmStateAction)this).Finish(); return; } if ((Object)(object)rb2d == (Object)null) { ((FsmStateAction)this).Finish(); return; } float fixedDeltaTime = Time.fixedDeltaTime; elapsedTime += fixedDeltaTime; if (chaseTime.Value > 0f && elapsedTime >= chaseTime.Value) { if (onTimeout != null) { ((FsmStateAction)this).Fsm.Event(onTimeout); } ((FsmStateAction)this).Finish(); return; } Vector2 val = Vector2.op_Implicit(resolvedTarget.position) - Vector2.op_Implicit(selfTransform.position); Vector2 normalized = ((Vector2)(ref val)).normalized; float num = Vector2.Distance(Vector2.op_Implicit(selfTransform.position), Vector2.op_Implicit(resolvedTarget.position)); if (num <= reachDistance.Value) { if (onReachTarget != null) { ((FsmStateAction)this).Fsm.Event(onReachTarget); } ((FsmStateAction)this).Finish(); return; } Vector2 val2 = normalized * acceleration.Value; Rigidbody2D? obj = rb2d; obj.linearVelocity += val2 * fixedDeltaTime; val = rb2d.linearVelocity; if (((Vector2)(ref val)).magnitude > maxSpeed.Value) { Rigidbody2D? obj2 = rb2d; val = rb2d.linearVelocity; obj2.linearVelocity = ((Vector2)(ref val)).normalized * maxSpeed.Value; } } public override void OnExit() { rb2d = null; selfTransform = null; resolvedTarget = null; } private Transform? ResolveTarget() { if ((Object)(object)targetTransform != (Object)null) { return targetTransform; } if (targetGameObject != null && (Object)(object)targetGameObject.Value != (Object)null) { return targetGameObject.Value.transform; } return null; } } [ActionCategory("AnySilkBoss")] [Tooltip("延迟启用或禁用 Behaviour 组件。")] public class EnableBehaviourDelay : FsmStateAction { [RequiredField] [Tooltip("要控制的 Behaviour 组件")] public FsmObject? behaviour; [RequiredField] [Tooltip("启用或禁用组件")] public FsmBool? enable; [Tooltip("延迟时间(秒)")] public FsmFloat? delay; [Tooltip("退出状态时重置组件状态")] public bool resetOnExit; private float timer; private Behaviour? targetBehaviour; private bool initialEnabledState; public override void Reset() { behaviour = null; enable = null; delay = null; resetOnExit = false; timer = 0f; } public override void OnEnter() { FsmObject? obj = behaviour; ref Behaviour? reference = ref targetBehaviour; Object obj2 = ((obj != null) ? obj.Value : null); reference = (Behaviour?)(object)((obj2 is Behaviour) ? obj2 : null); if ((Object)(object)targetBehaviour == (Object)null) { ((FsmStateAction)this).LogError("Behaviour 组件为 null 或类型不正确"); ((FsmStateAction)this).Finish(); return; } initialEnabledState = targetBehaviour.enabled; if (delay == null || delay.Value <= 0f) { DoEnableBehaviour(); } else { timer = delay.Value; } } public override void OnUpdate() { if (timer > 0f) { timer -= Time.deltaTime; } else { DoEnableBehaviour(); } } public override void OnExit() { if (!((Object)(object)targetBehaviour == (Object)null) && resetOnExit) { targetBehaviour.enabled = initialEnabledState; } } private void DoEnableBehaviour() { if ((Object)(object)targetBehaviour == (Object)null || enable == null) { ((FsmStateAction)this).Finish(); return; } targetBehaviour.enabled = enable.Value; ((FsmStateAction)this).Finish(); } } public class FollowTargetAction : FsmStateAction { [Tooltip("跟随目标的 GameObject")] public FsmGameObject? targetGameObject; [Tooltip("跟随目标的 Transform(直接引用,优先级高于 targetGameObject)")] public Transform? targetTransform; [Tooltip("位置偏移(相对于目标)")] public FsmVector3? positionOffset; [Tooltip("是否使用局部坐标系计算偏移(true=偏移量随目标旋转,false=世界坐标偏移)")] public FsmBool? useLocalOffset; [Tooltip("是否跟随 X 轴")] public FsmBool? followX; [Tooltip("是否跟随 Y 轴")] public FsmBool? followY; [Tooltip("是否跟随 Z 轴")] public FsmBool? followZ; [Tooltip("位置平滑速度(0=立即跟随,>0=平滑插值)")] public FsmFloat? positionSmoothSpeed; [Tooltip("是否跟随角度(Z轴旋转)")] public FsmBool? followRotation; [Tooltip("角度偏移(相对于目标)")] public FsmFloat? rotationOffset; [Tooltip("角度平滑速度(0=立即跟随,>0=平滑插值)")] public FsmFloat? rotationSmoothSpeed; [Tooltip("是否在 Update 中更新(默认true)")] public FsmBool? updateInUpdate; [Tooltip("是否在 LateUpdate 中更新(用于跟随动画后的位置)")] public FsmBool? updateInLateUpdate; [Tooltip("是否强制直接设置位置(忽略平滑,每帧直接赋值)")] public FsmBool? forceDirectSet; private Transform? selfTransform; private Transform? resolvedTarget; public override void Reset() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) targetGameObject = null; targetTransform = null; positionOffset = FsmVector3.op_Implicit(Vector3.zero); useLocalOffset = FsmBool.op_Implicit(false); followX = FsmBool.op_Implicit(true); followY = FsmBool.op_Implicit(true); followZ = FsmBool.op_Implicit(false); positionSmoothSpeed = FsmFloat.op_Implicit(0f); followRotation = FsmBool.op_Implicit(false); rotationOffset = FsmFloat.op_Implicit(0f); rotationSmoothSpeed = FsmFloat.op_Implicit(0f); updateInUpdate = FsmBool.op_Implicit(true); updateInLateUpdate = FsmBool.op_Implicit(false); forceDirectSet = FsmBool.op_Implicit(false); } public override void OnEnter() { if ((Object)(object)((FsmStateAction)this).Owner == (Object)null) { ((FsmStateAction)this).Log("FollowTargetAction: Owner 为 null"); ((FsmStateAction)this).Finish(); return; } selfTransform = ((FsmStateAction)this).Owner.transform; resolvedTarget = ResolveTarget(); if ((Object)(object)resolvedTarget == (Object)null) { ((FsmStateAction)this).Log("FollowTargetAction: 未找到跟随目标"); ((FsmStateAction)this).Finish(); } else { DoFollow(); } } public override void OnUpdate() { FsmBool? obj = updateInUpdate; if (obj == null || obj.Value) { DoFollow(); } } public override void OnLateUpdate() { FsmBool? obj = updateInLateUpdate; if (obj != null && obj.Value) { DoFollow(); } } public override void OnExit() { selfTransform = null; resolvedTarget = null; } private void DoFollow() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)selfTransform == (Object)null || (Object)(object)resolvedTarget == (Object)null) { return; } Vector3 position = resolvedTarget.position; FsmVector3? obj = positionOffset; Vector3 val = ((obj != null) ? obj.Value : Vector3.zero); FsmBool? obj2 = useLocalOffset; if (obj2 != null && obj2.Value) { val = resolvedTarget.TransformDirection(val); } position += val; Vector3 position2 = selfTransform.position; FsmBool? obj3 = forceDirectSet; bool flag = obj3 != null && obj3.Value; float num; if (!flag) { FsmFloat? obj4 = positionSmoothSpeed; num = ((obj4 != null) ? obj4.Value : 0f); } else { num = 0f; } float num2 = num; FsmBool? obj5 = followX; if (obj5 != null && obj5.Value) { position2.x = ((num2 > 0f && !flag) ? Mathf.Lerp(position2.x, position.x, num2 * Time.deltaTime) : position.x); } FsmBool? obj6 = followY; if (obj6 != null && obj6.Value) { position2.y = ((num2 > 0f && !flag) ? Mathf.Lerp(position2.y, position.y, num2 * Time.deltaTime) : position.y); } FsmBool? obj7 = followZ; if (obj7 != null && obj7.Value) { position2.z = ((num2 > 0f && !flag) ? Mathf.Lerp(position2.z, position.z, num2 * Time.deltaTime) : position.z); } selfTransform.position = position2; FsmBool? obj8 = followRotation; if (obj8 != null && obj8.Value) { float z = resolvedTarget.eulerAngles.z; FsmFloat? obj9 = rotationOffset; float num3 = z + ((obj9 != null) ? obj9.Value : 0f); float num4; if (!flag) { FsmFloat? obj10 = rotationSmoothSpeed; num4 = ((obj10 != null) ? obj10.Value : 0f); } else { num4 = 0f; } float num5 = num4; if (num5 > 0f && !flag) { float z2 = selfTransform.eulerAngles.z; float num6 = Mathf.LerpAngle(z2, num3, num5 * Time.deltaTime); selfTransform.rotation = Quaternion.Euler(0f, 0f, num6); } else { selfTransform.rotation = Quaternion.Euler(0f, 0f, num3); } } } private Transform? ResolveTarget() { if ((Object)(object)targetTransform != (Object)null) { return targetTransform; } if (targetGameObject != null && (Object)(object)targetGameObject.Value != (Object)null) { return targetGameObject.Value.transform; } return null; } public void SetTarget(Transform target) { targetTransform = target; resolvedTarget = target; } public void SetOffset(Vector3 offset) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0015: Unknown result type (might be due to invalid IL or missing references) if (positionOffset != null) { positionOffset.Value = offset; return; } positionOffset = new FsmVector3 { Value = offset }; } } public class GuardedSendEventByName : FsmStateAction { public FsmEventTarget? eventTarget; public FsmString? sendEvent; public FsmFloat? delay; public bool everyFrame; public FsmBool? suppressDuringBigSilkBall; private float _elapsed; public override void Reset() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown eventTarget = null; sendEvent = null; delay = null; everyFrame = false; suppressDuringBigSilkBall = new FsmBool(FsmBool.op_Implicit(true)); } public override void OnEnter() { _elapsed = 0f; FsmFloat? obj = delay; if (((obj != null) ? obj.Value : 0f) < 0.001f) { SendIfAllowed(); if (!everyFrame) { ((FsmStateAction)this).Finish(); } } } public override void OnUpdate() { if (everyFrame) { SendIfAllowed(); return; } _elapsed += Time.deltaTime; float elapsed = _elapsed; FsmFloat? obj = delay; if (elapsed >= ((obj != null) ? obj.Value : 0f)) { SendIfAllowed(); ((FsmStateAction)this).Finish(); } } private void SendIfAllowed() { FsmString? obj = sendEvent; string text = ((obj != null) ? obj.Value : null) ?? ""; FsmBool? obj2 = suppressDuringBigSilkBall; if ((obj2 == null || obj2.Value) && text == "ATTACK" && BigSilkBallPhaseGuard.IsActive) { Log.Info("[GuardedSendEventByName] 大丝球阶段抑制延迟 Web Strand ATTACK"); } else if (eventTarget != null && !string.IsNullOrEmpty(text)) { ((FsmStateAction)this).Fsm.Event(eventTarget, text); } } } public class OrbitAroundTargetAction : FsmStateAction { public FsmGameObject? targetGameObject; public Transform? targetTransform; public FsmVector3? targetPositionOffset; public FsmFloat orbitRadius = FsmFloat.op_Implicit(7f); public FsmFloat orbitSpeed = FsmFloat.op_Implicit(200f); public FsmFloat orbitAngleOffset = FsmFloat.op_Implicit(0f); public FsmBool? useSpeedSignForDirection; public FsmBool? clockwise; public FsmBool? followTarget; public FsmFloat? positionLerpSpeed; public FsmBool? rotateToFaceCenter; public FsmBool? pointOutward; public FsmFloat? rotationOffset; public FsmFloat? directionalRotationOffset; public FsmBool? applyDirectionalRotationOffset; public FsmFloat? rotationLerpSpeed; public FsmFloat? maxDuration; public FsmEvent? onTimeout; public FsmBool? sendEventOnFullRotation; public FsmEvent? onFullRotation; public FsmBool? finishAfterFullRotation; public FsmBool? zeroVelocityOnEnter; public FsmBool? zeroVelocityOnExit; private Transform? _selfTransform; private Transform? _resolvedTarget; private Vector3 _fixedTargetPosition; private float _elapsed; private float _currentAngle; private float _accumulatedAbsAngle; private float _lastAngle; private bool _initialized; public override void Reset() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) targetGameObject = null; targetTransform = null; targetPositionOffset = FsmVector3.op_Implicit(Vector3.zero); orbitRadius = FsmFloat.op_Implicit(7f); orbitSpeed = FsmFloat.op_Implicit(200f); orbitAngleOffset = FsmFloat.op_Implicit(0f); useSpeedSignForDirection = FsmBool.op_Implicit(true); clockwise = FsmBool.op_Implicit(true); followTarget = FsmBool.op_Implicit(true); positionLerpSpeed = FsmFloat.op_Implicit(30f); rotateToFaceCenter = FsmBool.op_Implicit(true); pointOutward = FsmBool.op_Implicit(false); rotationOffset = FsmFloat.op_Implicit(180f); directionalRotationOffset = FsmFloat.op_Implicit(10f); applyDirectionalRotationOffset = FsmBool.op_Implicit(true); rotationLerpSpeed = FsmFloat.op_Implicit(30f); maxDuration = FsmFloat.op_Implicit(0f); onTimeout = null; sendEventOnFullRotation = FsmBool.op_Implicit(false); onFullRotation = null; finishAfterFullRotation = FsmBool.op_Implicit(false); zeroVelocityOnEnter = FsmBool.op_Implicit(true); zeroVelocityOnExit = FsmBool.op_Implicit(true); } public override void OnEnter() { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FsmStateAction)this).Owner == (Object)null) { ((FsmStateAction)this).Finish(); return; } _selfTransform = ((FsmStateAction)this).Owner.transform; _resolvedTarget = ResolveTarget(); if ((Object)(object)_resolvedTarget == (Object)null) { ((FsmStateAction)this).Finish(); return; } _elapsed = 0f; _accumulatedAbsAngle = 0f; _initialized = false; Vector3 position = _resolvedTarget.position; FsmVector3? obj = targetPositionOffset; _fixedTargetPosition = position + ((obj != null) ? obj.Value : Vector3.zero); _currentAngle = orbitAngleOffset.Value; _lastAngle = _currentAngle; FsmBool? obj2 = zeroVelocityOnEnter; if (obj2 != null && obj2.Value) { ZeroVelocity(); } } public override void OnUpdate() { //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_selfTransform == (Object)null || (Object)(object)_resolvedTarget == (Object)null) { ((FsmStateAction)this).Finish(); return; } float deltaTime = Time.deltaTime; _elapsed += deltaTime; if (maxDuration != null && maxDuration.Value > 0f && _elapsed >= maxDuration.Value) { if (onTimeout != null) { ((FsmStateAction)this).Fsm.Event(onTimeout); } ((FsmStateAction)this).Finish(); return; } FsmBool? obj = followTarget; Vector3 val; if (obj != null && !obj.Value) { val = _fixedTargetPosition; } else { Vector3 position = _resolvedTarget.position; FsmVector3? obj2 = targetPositionOffset; val = position + ((obj2 != null) ? obj2.Value : Vector3.zero); } Vector3 val2 = val; float num = orbitSpeed.Value; FsmBool? obj3 = useSpeedSignForDirection; float num2; if (obj3 == null || obj3.Value) { num2 = (Mathf.Approximately(num, 0f) ? 0f : Mathf.Sign(num)); } else { FsmBool? obj4 = clockwise; num2 = ((obj4 == null || obj4.Value) ? 1f : (-1f)); num = Mathf.Abs(num); } _currentAngle += num2 * Mathf.Abs(num) * deltaTime; if (!_initialized) { _lastAngle = _currentAngle; _initialized = true; } float num3 = Mathf.DeltaAngle(_lastAngle, _currentAngle); _accumulatedAbsAngle += Mathf.Abs(num3); _lastAngle = _currentAngle; FsmBool? obj5 = sendEventOnFullRotation; if (obj5 != null && obj5.Value && _accumulatedAbsAngle >= 360f) { _accumulatedAbsAngle -= 360f; if (onFullRotation != null) { ((FsmStateAction)this).Fsm.Event(onFullRotation); } FsmBool? obj6 = finishAfterFullRotation; if (obj6 != null && obj6.Value) { ((FsmStateAction)this).Finish(); return; } } float num4 = _currentAngle * (MathF.PI / 180f); float value = orbitRadius.Value; Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(Mathf.Cos(num4) * value, Mathf.Sin(num4) * value, 0f); Vector3 val4 = val2 + val3; Vector3 position2 = _selfTransform.position; FsmFloat? obj7 = positionLerpSpeed; float num5 = ((obj7 != null) ? obj7.Value : 0f); Vector3 val5 = ((num5 > 0f) ? Vector3.Lerp(position2, val4, deltaTime * num5) : val4); _selfTransform.position = new Vector3(val5.x, val5.y, position2.z); FsmBool? obj8 = rotateToFaceCenter; if (obj8 != null && !obj8.Value) { return; } FsmBool? obj9 = pointOutward; Vector3 val6 = ((obj9 != null && obj9.Value) ? (_selfTransform.position - val2) : (val2 - _selfTransform.position)); if (val6 != Vector3.zero) { float num6 = Mathf.Atan2(val6.y, val6.x) * 57.29578f; FsmFloat? obj10 = rotationOffset; float num7 = num6 + ((obj10 != null) ? obj10.Value : 0f); FsmBool? obj11 = applyDirectionalRotationOffset; if (obj11 != null && obj11.Value) { float num8 = num7; FsmFloat? obj12 = directionalRotationOffset; num7 = num8 + ((obj12 != null) ? obj12.Value : 0f) * num2; } FsmFloat? obj13 = rotationLerpSpeed; float num9 = ((obj13 != null) ? obj13.Value : 0f); Quaternion val7 = Quaternion.Euler(0f, 0f, num7); _selfTransform.rotation = ((num9 > 0f) ? Quaternion.Lerp(_selfTransform.rotation, val7, deltaTime * num9) : val7); } } public override void OnExit() { FsmBool? obj = zeroVelocityOnExit; if (obj != null && obj.Value) { ZeroVelocity(); } _selfTransform = null; _resolvedTarget = null; } private Transform? ResolveTarget() { if ((Object)(object)targetTransform != (Object)null) { return targetTransform; } if (targetGameObject != null && (Object)(object)targetGameObject.Value != (Object)null) { return targetGameObject.Value.transform; } return Object.FindFirstObjectByType()?.transform; } private void ZeroVelocity() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_selfTransform == (Object)null)) { Rigidbody2D component = ((Component)_selfTransform).GetComponent(); if ((Object)(object)component != (Object)null) { component.linearVelocity = Vector2.zero; component.angularVelocity = 0f; } } } } public class PredictiveBlastAction : FsmStateAction { [Tooltip("预测时间(秒),玩家在这个时间后会到达的位置")] public FsmFloat predictionTime; [Tooltip("预测位置的随机偏移范围")] public FsmFloat positionRandomOffset; [Tooltip("是否立即生成爆炸(false 则只计算位置,输出到 predictedPosition)")] public FsmBool spawnBlastImmediately; [Tooltip("输出:预测的目标位置")] public FsmVector3 predictedPosition; [Tooltip("爆炸生成后的回调事件")] public FsmEvent? onBlastSpawned; [Tooltip("场地边界限制 - 最小 X")] public FsmFloat boundaryMinX; [Tooltip("场地边界限制 - 最大 X")] public FsmFloat boundaryMaxX; [Tooltip("场地边界限制 - 最小 Y")] public FsmFloat boundaryMinY; [Tooltip("场地边界限制 - 最大 Y")] public FsmFloat boundaryMaxY; private FWBlastManager? blastManager; public override void Reset() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) predictionTime = FsmFloat.op_Implicit(0.5f); positionRandomOffset = FsmFloat.op_Implicit(1f); spawnBlastImmediately = FsmBool.op_Implicit(true); predictedPosition = FsmVector3.op_Implicit(Vector3.zero); onBlastSpawned = null; boundaryMinX = FsmFloat.op_Implicit(25f); boundaryMaxX = FsmFloat.op_Implicit(50f); boundaryMinY = FsmFloat.op_Implicit(5f); boundaryMaxY = FsmFloat.op_Implicit(25f); } public override void OnEnter() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) HeroController instance = HeroController.instance; if ((Object)(object)instance == (Object)null) { ((FsmStateAction)this).Log("PredictiveBlastAction: 未找到玩家"); ((FsmStateAction)this).Finish(); return; } Vector3 val = CalculatePredictedPosition(instance); predictedPosition.Value = val; if (spawnBlastImmediately.Value) { GetManagerReferences(); if ((Object)(object)blastManager != (Object)null) { blastManager.SpawnBombBlast(val, null, 0.65f); if (onBlastSpawned != null) { ((FsmStateAction)this).Fsm.Event(onBlastSpawned); } } } ((FsmStateAction)this).Finish(); } private Vector3 CalculatePredictedPosition(HeroController hero) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) Vector3 position = hero.transform.position; Vector2 val = Vector2.zero; Rigidbody2D component = ((Component)hero).GetComponent(); if ((Object)(object)component != (Object)null) { val = component.linearVelocity; } Vector3 val2 = position + new Vector3(val.x, val.y, 0f) * predictionTime.Value; if (positionRandomOffset.Value > 0f) { val2.x += Random.Range(0f - positionRandomOffset.Value, positionRandomOffset.Value); val2.y += Random.Range(0f - positionRandomOffset.Value, positionRandomOffset.Value); } val2.x = Mathf.Clamp(val2.x, boundaryMinX.Value, boundaryMaxX.Value); val2.y = Mathf.Clamp(val2.y, boundaryMinY.Value, boundaryMaxY.Value); return val2; } private void GetManagerReferences() { GameObject val = GameObject.Find("AnySilkBossManager"); if ((Object)(object)val != (Object)null) { blastManager = val.GetComponent(); } } public static Vector3 CalculatePrediction(float predictionTime, float randomOffset = 0f, float? minX = null, float? maxX = null, float? minY = null, float? maxY = null) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) HeroController instance = HeroController.instance; if ((Object)(object)instance == (Object)null) { return Vector3.zero; } Vector3 position = instance.transform.position; Vector2 val = Vector2.zero; Rigidbody2D component = ((Component)instance).GetComponent(); if ((Object)(object)component != (Object)null) { val = component.linearVelocity; } Vector3 val2 = position + new Vector3(val.x, val.y, 0f) * predictionTime; if (randomOffset > 0f) { val2.x += Random.Range(0f - randomOffset, randomOffset); val2.y += Random.Range(0f - randomOffset, randomOffset); } if (minX.HasValue && maxX.HasValue) { val2.x = Mathf.Clamp(val2.x, minX.Value, maxX.Value); } if (minY.HasValue && maxY.HasValue) { val2.y = Mathf.Clamp(val2.y, minY.Value, maxY.Value); } return val2; } } public class ReverseAccelerationAction : FsmStateAction { [Tooltip("圆心位置(丝球将从这里向外发射并返回)")] public FsmVector3 centerPoint; [Tooltip("初始向外速度(单位/秒)")] public FsmFloat initialOutwardSpeed; [Tooltip("反向加速度(指向圆心,单位/秒²)")] public FsmFloat reverseAcceleration; [Tooltip("最大向内速度(限制返回速度)")] public FsmFloat maxInwardSpeed; [Tooltip("返回圆心的距离阈值")] public FsmFloat returnThreshold; [Tooltip("运行时间限制(秒),<=0 表示无限")] public FsmFloat maxDuration; [Tooltip("到达圆心时触发的事件")] public FsmEvent? onReturnToCenter; [Tooltip("超时时触发的事件")] public FsmEvent? onTimeout; [Tooltip("是否在碰墙时结束")] public FsmBool finishOnWallHit; private Rigidbody2D? rb2d; private Transform? selfTransform; private float elapsedTime; private bool hasReversed; private Vector2 initialDirection; private Vector2 fixedAccelDirection; public bool HasReversed => hasReversed; public override void Reset() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) centerPoint = FsmVector3.op_Implicit(Vector3.zero); initialOutwardSpeed = FsmFloat.op_Implicit(15f); reverseAcceleration = FsmFloat.op_Implicit(20f); maxInwardSpeed = FsmFloat.op_Implicit(25f); returnThreshold = FsmFloat.op_Implicit(0.5f); maxDuration = FsmFloat.op_Implicit(0f); onReturnToCenter = null; onTimeout = null; finishOnWallHit = FsmBool.op_Implicit(true); } public override void OnEnter() { //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FsmStateAction)this).Owner == (Object)null) { ((FsmStateAction)this).Log("ReverseAccelerationAction: Owner 为 null"); ((FsmStateAction)this).Finish(); return; } selfTransform = ((FsmStateAction)this).Owner.transform; rb2d = ((FsmStateAction)this).Owner.GetComponent(); if ((Object)(object)rb2d == (Object)null) { ((FsmStateAction)this).Log("ReverseAccelerationAction: 未找到 Rigidbody2D"); ((FsmStateAction)this).Finish(); return; } SilkBallBehavior component = ((FsmStateAction)this).Owner.GetComponent(); if ((Object)(object)component != (Object)null) { centerPoint.Value = component.reverseAccelCenter; initialOutwardSpeed.Value = component.initialOutwardSpeed; reverseAcceleration.Value = component.reverseAccelValue; maxInwardSpeed.Value = component.maxInwardSpeed; maxDuration.Value = component.reverseAccelDuration; } elapsedTime = 0f; hasReversed = false; Vector2 val = rb2d.linearVelocity; Vector2 normalized; if (((Vector2)(ref val)).sqrMagnitude > 0.0001f) { val = rb2d.linearVelocity; normalized = ((Vector2)(ref val)).normalized; } else { Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(centerPoint.Value.x, centerPoint.Value.y); Vector2 val3 = default(Vector2); ((Vector2)(ref val3))..ctor(selfTransform.position.x, selfTransform.position.y); val = val3 - val2; normalized = ((Vector2)(ref val)).normalized; if (((Vector2)(ref normalized)).sqrMagnitude < 0.0001f) { float num = Random.Range(0f, 360f) * (MathF.PI / 180f); ((Vector2)(ref normalized))..ctor(Mathf.Cos(num), Mathf.Sin(num)); } } initialDirection = normalized; fixedAccelDirection = -initialDirection; rb2d.gravityScale = 0f; rb2d.linearVelocity = initialDirection * initialOutwardSpeed.Value; } public override void OnUpdate() { //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)rb2d == (Object)null || (Object)(object)selfTransform == (Object)null) { ((FsmStateAction)this).Finish(); return; } if (maxDuration.Value > 0f) { elapsedTime += Time.deltaTime; if (elapsedTime >= maxDuration.Value) { if (onTimeout != null) { ((FsmStateAction)this).Fsm.Event(onTimeout); } ((FsmStateAction)this).Finish(); return; } } Vector2 val = fixedAccelDirection * reverseAcceleration.Value; Rigidbody2D? obj = rb2d; obj.linearVelocity += val * Time.deltaTime; float num = Vector2.Dot(rb2d.linearVelocity, fixedAccelDirection); if (num > maxInwardSpeed.Value) { Vector2 val2 = fixedAccelDirection * maxInwardSpeed.Value; Vector2 val3 = default(Vector2); ((Vector2)(ref val3))..ctor(0f - fixedAccelDirection.y, fixedAccelDirection.x); float num2 = Vector2.Dot(rb2d.linearVelocity, val3); rb2d.linearVelocity = val2 + val3 * num2; } if (!hasReversed && num > 0f) { hasReversed = true; } if (onReturnToCenter != null && returnThreshold.Value > 0f) { Vector2 val4 = default(Vector2); ((Vector2)(ref val4))..ctor(centerPoint.Value.x, centerPoint.Value.y); Vector2 val5 = default(Vector2); ((Vector2)(ref val5))..ctor(selfTransform.position.x, selfTransform.position.y); float num3 = Vector2.Distance(val5, val4); if (hasReversed && num3 <= returnThreshold.Value) { ((FsmStateAction)this).Fsm.Event(onReturnToCenter); ((FsmStateAction)this).Finish(); } } } public override void OnExit() { rb2d = null; selfTransform = null; } public float GetDistanceToCenter() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)selfTransform == (Object)null) { return float.MaxValue; } Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(centerPoint.Value.x, centerPoint.Value.y); Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(selfTransform.position.x, selfTransform.position.y); return Vector2.Distance(val2, val); } } public class SoftLockTrackAction : FsmStateAction { public FsmGameObject? targetGameObject; public Transform? targetTransform; public FsmVector3? positionOffset; public FsmBool? maintainInitialOffset; public FsmBool? followX; public FsmBool? followY; public FsmBool? followZ; public FsmFloat? targetX; public FsmFloat? targetY; public FsmFloat? targetZ; public FsmFloat? positionLerpSpeed; public FsmBool? useRigidbody; public FsmFloat? maxSpeed; public FsmFloat? acceleration; public FsmBool? useMinX; public FsmFloat? minX; public FsmBool? useMaxX; public FsmFloat? maxX; public FsmBool? useMinY; public FsmFloat? minY; public FsmBool? useMaxY; public FsmFloat? maxY; public FsmFloat? rotationZ; public FsmFloat? rotationLerpSpeed; public FsmFloat? maxDuration; public FsmEvent? onTimeout; public FsmBool? finishAfterTimeout; public FsmBool? zeroVelocityOnEnter; public FsmBool? zeroVelocityOnExit; private Transform? _selfTransform; private Transform? _resolvedTarget; private Rigidbody2D? _rb2d; private Vector3 _fixedPosition; private Vector3 _runtimeOffset; private float _elapsed; public override void Reset() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) targetGameObject = null; targetTransform = null; positionOffset = FsmVector3.op_Implicit(Vector3.zero); maintainInitialOffset = FsmBool.op_Implicit(true); followX = FsmBool.op_Implicit(false); followY = FsmBool.op_Implicit(false); followZ = FsmBool.op_Implicit(false); targetX = null; targetY = null; targetZ = null; positionLerpSpeed = FsmFloat.op_Implicit(15f); useRigidbody = FsmBool.op_Implicit(false); maxSpeed = FsmFloat.op_Implicit(40f); acceleration = FsmFloat.op_Implicit(200f); useMinX = FsmBool.op_Implicit(false); minX = FsmFloat.op_Implicit(0f); useMaxX = FsmBool.op_Implicit(false); maxX = FsmFloat.op_Implicit(0f); useMinY = FsmBool.op_Implicit(false); minY = FsmFloat.op_Implicit(0f); useMaxY = FsmBool.op_Implicit(false); maxY = FsmFloat.op_Implicit(0f); rotationZ = null; rotationLerpSpeed = FsmFloat.op_Implicit(20f); maxDuration = FsmFloat.op_Implicit(0f); onTimeout = null; finishAfterTimeout = FsmBool.op_Implicit(true); zeroVelocityOnEnter = FsmBool.op_Implicit(true); zeroVelocityOnExit = FsmBool.op_Implicit(true); } public override void OnEnter() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((FsmStateAction)this).Owner == (Object)null) { ((FsmStateAction)this).Finish(); return; } _selfTransform = ((FsmStateAction)this).Owner.transform; _resolvedTarget = ResolveTarget(); if ((Object)(object)_resolvedTarget == (Object)null) { ((FsmStateAction)this).Finish(); return; } FsmBool? obj = useRigidbody; if (obj != null && obj.Value) { _rb2d = ((Component)_selfTransform).GetComponent(); } else { _rb2d = null; } _elapsed = 0f; _fixedPosition = _selfTransform.position; FsmVector3? obj2 = positionOffset; Vector3 val = ((obj2 != null) ? obj2.Value : Vector3.zero); FsmBool? obj3 = maintainInitialOffset; if (obj3 == null || obj3.Value) { _runtimeOffset = _selfTransform.position - _resolvedTarget.position; } else { _runtimeOffset = Vector3.zero; } _runtimeOffset += val; FsmBool? obj4 = zeroVelocityOnEnter; if (obj4 != null && obj4.Value) { ZeroVelocity(); } ApplyRotation(Time.deltaTime); } public override void OnFixedUpdate() { //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) FsmBool? obj = useRigidbody; if (obj == null || !obj.Value) { return; } if ((Object)(object)_selfTransform == (Object)null || (Object)(object)_resolvedTarget == (Object)null) { ((FsmStateAction)this).Finish(); } else { if ((Object)(object)_rb2d == (Object)null) { return; } float fixedDeltaTime = Time.fixedDeltaTime; _elapsed += fixedDeltaTime; if (maxDuration != null && maxDuration.Value > 0f && _elapsed >= maxDuration.Value) { if (onTimeout != null) { ((FsmStateAction)this).Fsm.Event(onTimeout); } FsmBool? obj2 = finishAfterTimeout; if (obj2 == null || obj2.Value) { ((FsmStateAction)this).Finish(); } return; } Vector3 position = _selfTransform.position; Vector3 val = ComputeDestination(position); FsmFloat? obj3 = positionLerpSpeed; float num = ((obj3 != null) ? obj3.Value : 0f); Vector2 position2 = _rb2d.position; Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(val.x, val.y); Vector2 val3 = ((num <= 0f) ? ((val2 - position2) / fixedDeltaTime) : ((val2 - position2) * num)); FsmFloat? obj4 = maxSpeed; float num2 = ((obj4 != null) ? obj4.Value : 40f); if (num2 > 0f && ((Vector2)(ref val3)).magnitude > num2) { val3 = ((Vector2)(ref val3)).normalized * num2; } FsmFloat? obj5 = acceleration; float num3 = ((obj5 != null) ? obj5.Value : 200f); _rb2d.linearVelocity = ((num3 > 0f) ? Vector2.MoveTowards(_rb2d.linearVelocity, val3, num3 * fixedDeltaTime) : val3); if (!Mathf.Approximately(position.z, val.z)) { Vector3 position3 = _selfTransform.position; position3.z = val.z; _selfTransform.position = position3; } } } public override void OnUpdate() { //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) FsmBool? obj = useRigidbody; if (obj != null && obj.Value && (Object)(object)_rb2d != (Object)null) { ApplyRotation(Time.deltaTime); return; } if ((Object)(object)_selfTransform == (Object)null || (Object)(object)_resolvedTarget == (Object)null) { ((FsmStateAction)this).Finish(); return; } float deltaTime = Time.deltaTime; _elapsed += deltaTime; if (maxDuration != null && maxDuration.Value > 0f && _elapsed >= maxDuration.Value) { if (onTimeout != null) { ((FsmStateAction)this).Fsm.Event(onTimeout); } FsmBool? obj2 = finishAfterTimeout; if (obj2 == null || obj2.Value) { ((FsmStateAction)this).Finish(); } return; } Vector3 position = _selfTransform.position; Vector3 val = ComputeDestination(position); FsmFloat? obj3 = positionLerpSpeed; float num = ((obj3 != null) ? obj3.Value : 0f); if (num > 0f) { Vector3 position2 = Vector3.Lerp(position, val, deltaTime * num); _selfTransform.position = position2; } else { _selfTransform.position = val; } ApplyRotation(deltaTime); } public override void OnExit() { FsmBool? obj = zeroVelocityOnExit; if (obj != null && obj.Value) { ZeroVelocity(); } _selfTransform = null; _resolvedTarget = null; _rb2d = null; } private Vector3 ComputeDestination(Vector3 current) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) Vector3 val = current; FsmBool? obj = followX; if (obj != null && obj.Value) { val.x = _resolvedTarget.position.x + _runtimeOffset.x; } else if (targetX != null) { val.x = targetX.Value; } else { val.x = _fixedPosition.x; } FsmBool? obj2 = followY; if (obj2 != null && obj2.Value) { val.y = _resolvedTarget.position.y + _runtimeOffset.y; } else if (targetY != null) { val.y = targetY.Value; } else { val.y = _fixedPosition.y; } FsmBool? obj3 = followZ; if (obj3 != null && obj3.Value) { val.z = _resolvedTarget.position.z + _runtimeOffset.z; } else if (targetZ != null) { val.z = targetZ.Value; } else { val.z = _fixedPosition.z; } FsmBool? obj4 = useMinX; if (obj4 != null && obj4.Value && minX != null) { val.x = Mathf.Max(val.x, minX.Value); } FsmBool? obj5 = useMaxX; if (obj5 != null && obj5.Value && maxX != null) { val.x = Mathf.Min(val.x, maxX.Value); } FsmBool? obj6 = useMinY; if (obj6 != null && obj6.Value && minY != null) { val.y = Mathf.Max(val.y, minY.Value); } FsmBool? obj7 = useMaxY; if (obj7 != null && obj7.Value && maxY != null) { val.y = Mathf.Min(val.y, maxY.Value); } return val; } private Transform? ResolveTarget() { if ((Object)(object)targetTransform != (Object)null) { return targetTransform; } if (targetGameObject != null && (Object)(object)targetGameObject.Value != (Object)null) { return targetGameObject.Value.transform; } return Object.FindFirstObjectByType()?.transform; } private void ApplyRotation(float dt) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_selfTransform == (Object)null) && rotationZ != null) { Quaternion val = Quaternion.Euler(0f, 0f, rotationZ.Value); FsmFloat? obj = rotationLerpSpeed; float num = ((obj != null) ? obj.Value : 0f); _selfTransform.rotation = ((num > 0f) ? Quaternion.Lerp(_selfTransform.rotation, val, dt * num) : val); } } private void ZeroVelocity() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_selfTransform == (Object)null)) { Rigidbody2D component = ((Component)_selfTransform).GetComponent(); if ((Object)(object)component != (Object)null) { component.linearVelocity = Vector2.zero; component.angularVelocity = 0f; } } } } }