Decompiled source of Neon faction v1.0.3
Niiido.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Xml; using BepInEx; using DM; using HarmonyLib; using Landfall.TABS; using Landfall.TABS.AI; using Landfall.TABS.AI.Systems; using Landfall.TABS.GameMode; using Landfall.TABS.GameState; using Landfall.TABS.UnitEditor; using ModdingForDummies; using ModdingForDummies.AssetManagement; using ModdingForDummies.TABSSimp; using Niiido; using SLMA; using Sirenix.Serialization; using TFBGames; using Unity.Entities; using UnityEngine; using UnityEngine.Events; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("ModdingForDummies")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ModdingForDummies")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("1619c49c-bc45-486c-bbca-6b52cef4f478")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] public class 斯安维斯坦 : MonoBehaviour { [CompilerGenerated] private sealed class <激活时间>d__16 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public float time; public 斯安维斯坦 <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <激活时间>d__16(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.是否开启斯安维斯坦 = true; <>2__current = (object)new WaitForSeconds(time); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.是否开启斯安维斯坦 = 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 SkinnedMeshRenderer[] 所有蒙皮网格1; private float 计时器; private float 计时器2; private bool 是否开启斯安维斯坦 = false; public float 间隔时间 = 0.05f; public Material 可变色材质1 = new Material(UmMyMod.Asset1.LoadAsset<Material>("率hi哦那个3")); public Material 材质232 = new Material((Material)SLMALoader.SDic["materials"]["M_BrowningM2_Metal004"]); private float 持续百变量; public float 完成颜色循环时间 = 5f; public float 残影持续时间 = 2f; private Color 开始颜色 = new Color(0f, 1.4f, 0f, 0.5f); private Color 结束颜色 = new Color(1.4f, 0f, 0f, 0.5f); public Color 残影颜色; private List<GameObject> 残影列表 = new List<GameObject>(); private void Start() { 所有蒙皮网格1 = ((Component)((Component)this).transform.root).GetComponentsInChildren<SkinnedMeshRenderer>(); } public void 启动(float time1 = 1f) { ((MonoBehaviour)this).StartCoroutine(激活时间(time1)); } [IteratorStateMachine(typeof(<激活时间>d__16))] private IEnumerator 激活时间(float time = 1f) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <激活时间>d__16(0) { <>4__this = this, time = time }; } private void 生成一次() { if (所有蒙皮网格1 == null || 所有蒙皮网格1.Length == 0) { 所有蒙皮网格1 = ((Component)((Component)this).transform.root).GetComponentsInChildren<SkinnedMeshRenderer>(); } 生成蒙皮网格残影(所有蒙皮网格1, 材质232); } public void 生成蒙皮网格残影(SkinnedMeshRenderer[] 所有蒙皮网格, Material 可变色材质) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_0046: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown foreach (SkinnedMeshRenderer val in 所有蒙皮网格) { if (((Renderer)val).enabled && !((Object)(object)val.sharedMesh == (Object)null)) { GameObject val2 = new GameObject("残影"); val2.transform.position = ((Component)val).transform.position; val2.transform.rotation = ((Component)val).transform.rotation; MeshRenderer val3 = val2.AddComponent<MeshRenderer>(); MeshFilter val4 = val2.AddComponent<MeshFilter>(); val2.AddComponent<n秒后移除物体并生成爆炸>().cd = 残影持续时间; Mesh val5 = new Mesh(); val.BakeMesh(val5); val4.mesh = val5; Material material = new Material(可变色材质); ((Renderer)val3).material = material; } } } private void Update() { if (是否开启斯安维斯坦) { 计时器 += Time.deltaTime; 更新残影颜色(); if (计时器 >= 间隔时间) { 生成一次(); 计时器 -= 间隔时间; } } else { 重置颜色状态(); 计时器 = 0f; } } private void 更新残影颜色() { //IL_0032: 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_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_004a: Unknown result type (might be due to invalid IL or missing references) 计时器2 += Time.deltaTime; float num = Mathf.PingPong(计时器2 / (完成颜色循环时间 / 2f), 1f); Color color = Color.Lerp(开始颜色, 结束颜色, num); 材质232.color = color; } private void 重置颜色状态() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) 计时器2 = 0f; 材质232.color = 开始颜色; } } public class n秒后移除物体并生成爆炸 : MonoBehaviour { [CompilerGenerated] private sealed class <开始删除生成>d__2 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public n秒后移除物体并生成爆炸 <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <开始删除生成>d__2(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.cd); <>1__state = 1; return true; case 1: <>1__state = -1; Object.Destroy((Object)(object)((Component)<>4__this).gameObject); 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 cd = 1.3f; public void Start() { ((MonoBehaviour)this).StartCoroutine(开始删除生成()); } [IteratorStateMachine(typeof(<开始删除生成>d__2))] private IEnumerator 开始删除生成() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <开始删除生成>d__2(0) { <>4__this = this }; } } public class 添加延迟事件 : MonoBehaviour { private DelayEvent 延迟事件组件; private 斯安维斯坦 斯安维斯坦组件; public float 持续时间 = 0.15f; private void Start() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown 延迟事件组件 = ((Component)this).GetComponent<DelayEvent>(); 斯安维斯坦组件 = ((Component)this).GetComponent<斯安维斯坦>(); if ((Object)(object)延迟事件组件 != (Object)null && (Object)(object)斯安维斯坦组件 != (Object)null) { 延迟事件组件.delayedEvent.AddListener(new UnityAction(启动残影)); } else { Debug.LogWarning((object)(((Object)((Component)this).gameObject).name + ": 缺少必要组件")); } } private void 启动残影() { if ((Object)(object)斯安维斯坦组件 != (Object)null) { 斯安维斯坦组件.启动(持续时间); } } private void OnDestroy() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown if ((Object)(object)延迟事件组件 != (Object)null) { 延迟事件组件.delayedEvent.RemoveListener(new UnityAction(启动残影)); } } } public class 添加延迟2事件 : MonoBehaviour { [CompilerGenerated] private sealed class <启动残影xz>d__11 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public 添加延迟2事件 <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <启动残影xz>d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.feixx = true; <>4__this.斯安维斯坦组件.启动(5f); <>2__current = (object)new WaitForSeconds(5f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.feixx = false; <>4__this.ClearAllVelocity(); 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 DelayEvent 延迟事件组件; private 斯安维斯坦 斯安维斯坦组件; public float 持续时间 = 0.15f; private bool feixx = false; private Unit unit34; private Rigidbody[] allrig; public float 力度 = 8000f; private float 计时器1; public GameObject 生生爆炸23 = UmMyMod.Asset1.LoadAsset<GameObject>("螳螂刀打击爆炸34"); private void Start() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown unit34 = ((Component)((Component)this).transform.root).GetComponentInChildren<Unit>(); 延迟事件组件 = ((Component)this).GetComponent<DelayEvent>(); 斯安维斯坦组件 = ((Component)this).GetComponent<斯安维斯坦>(); if ((Object)(object)延迟事件组件 != (Object)null && (Object)(object)斯安维斯坦组件 != (Object)null) { 延迟事件组件.delayedEvent.AddListener(new UnityAction(启动残影)); } else { Debug.LogWarning((object)(((Object)((Component)this).gameObject).name + ": 缺少必要组件")); } } private void 启动残影() { ((MonoBehaviour)this).StartCoroutine(启动残影xz()); } [IteratorStateMachine(typeof(<启动残影xz>d__11))] private IEnumerator 启动残影xz() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <启动残影xz>d__11(0) { <>4__this = this }; } private void Update() { 飞翔11(); } private void 飞翔11() { //IL_0044: 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_0063: 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_0097: 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_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) if (!feixx) { return; } Unit unit = unit34.data.targetData.unit; if (!unit.data.Dead) { Vector3 val = unit.data.mainRig.position - unit34.data.mainRig.position; Vector3 normalized = ((Vector3)(ref val)).normalized; allrig = unit34.data.allRigs.AllRigs; for (int i = 0; i < allrig.Length; i++) { allrig[i].AddForce(normalized * (力度 * Time.deltaTime), (ForceMode)5); } 计时器1 += Time.deltaTime; if ((double)计时器1 > 0.1 && unit34.data.distanceToTarget < 1f) { TeamHolder.AddTeamHolder(Object.Instantiate<GameObject>(生生爆炸23, unit.data.mainRig.position, Quaternion.identity), ((Component)this).gameObject); 计时器1 = 0f; } } } private void ClearAllVelocity() { //IL_000e: 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) for (int i = 0; i < allrig.Length; i++) { allrig[i].velocity = Vector3.zero; allrig[i].angularVelocity = Vector3.zero; } } } public class 是否下马判断 : MonoBehaviour { private Unit unit; private bool 判断1 = true; private float 计时器 = 0f; private Mount mount2; private 添加延迟2事件 wwww; public void Start() { unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>(); mount2 = ((Component)unit).GetComponentInChildren<Mount>(); wwww = ((Component)this).gameObject.GetComponent<添加延迟2事件>(); ((Behaviour)wwww).enabled = false; if ((Object)(object)mount2 == (Object)null) { ((Behaviour)wwww).enabled = true; } } public void Update() { if ((Object)(object)mount2 != (Object)null && 判断1 && !mount2.IsMounted) { ((Behaviour)wwww).enabled = true; 判断1 = false; } } } public class 黑客真伤效果 : MonoBehaviour { private Unit unit; private bool 判断1 = true; private float 计时器 = 0f; private void Start() { unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>(); if ((Object)(object)unit == (Object)null) { Debug.LogError((object)"未找到Unit组件"); return; } float maxHealth = unit.data.maxHealth; if (maxHealth > 10000f) { 强制死亡(); } else if (maxHealth > 8000f) { 固定扣血(1000f); } else if (maxHealth > 5000f) { 固定扣血(600f); } else if (maxHealth > 3000f) { 固定扣血(400f); } else if (maxHealth > 1000f) { 固定扣血(100f); } else if (maxHealth > 500f) { 固定扣血(10f); } } private void 强制死亡() { 黑客消除er(); GameModeService service = ServiceLocator.GetService<GameModeService>(); if (service.CurrentGameMode == null) { Debug.LogError((object)"Could not find CurrentGameMode!"); } else { service.CurrentGameMode.OnUnitDied(unit); } Object.Destroy((Object)(object)((Component)unit).gameObject); } private void 黑客消除er() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0052: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown SkinnedMeshRenderer[] componentsInChildren = ((Component)unit).GetComponentsInChildren<SkinnedMeshRenderer>(); foreach (SkinnedMeshRenderer val in componentsInChildren) { if (((Renderer)val).enabled && !((Object)(object)val.sharedMesh == (Object)null)) { GameObject val2 = new GameObject("残影"); val2.transform.position = ((Component)val).transform.position; val2.transform.rotation = ((Component)val).transform.rotation; MeshRenderer val3 = val2.AddComponent<MeshRenderer>(); MeshFilter val4 = val2.AddComponent<MeshFilter>(); val2.AddComponent<n秒后移除物体并淡出>().cd = 2f; Mesh val5 = new Mesh(); val.BakeMesh(val5); val4.mesh = val5; Material material = new Material(UmMyMod.Asset1.LoadAsset<Material>("透明公司收到23其3")); ((Renderer)val3).material = material; } } } private void 固定扣血(float he12) { DataHandler data = unit.data; data.health -= he12; if (unit.data.health <= 0f) { 强制死亡(); } } } public class n秒后移除物体并淡出 : MonoBehaviour { [CompilerGenerated] private sealed class <开始删除生成>d__6 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public n秒后移除物体并淡出 <>4__this; object IEnumerator<object>.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() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(<>4__this.cd); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.淡出效果()); <>1__state = 2; return true; case 2: <>1__state = -1; Object.Destroy((Object)(object)((Component)<>4__this).gameObject); 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__7 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public n秒后移除物体并淡出 <>4__this; private float <计时器>5__1; private Color <最终颜色>5__2; private float <进度>5__3; private Color <新颜色>5__4; object IEnumerator<object>.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() { //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_00c9: 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_0133: 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)<>4__this.渲染器 == (Object)null || (Object)(object)<>4__this.材质 == (Object)null) { return false; } <计时器>5__1 = 0f; break; case 1: <>1__state = -1; break; } if (<计时器>5__1 < <>4__this.淡出时间) { <计时器>5__1 += Time.deltaTime; <进度>5__3 = <计时器>5__1 / <>4__this.淡出时间; <新颜色>5__4 = <>4__this.初始颜色; <新颜色>5__4.a = Mathf.Lerp(1f, 0f, <进度>5__3); <>4__this.材质.color = <新颜色>5__4; <>2__current = null; <>1__state = 1; return true; } <最终颜色>5__2 = <>4__this.初始颜色; <最终颜色>5__2.a = 0f; <>4__this.材质.color = <最终颜色>5__2; 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 cd = 1.3f; public float 淡出时间 = 0.5f; private Renderer 渲染器; private Material 材质; private Color 初始颜色; public void Start() { //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) 渲染器 = ((Component)this).GetComponent<Renderer>(); if ((Object)(object)渲染器 != (Object)null) { 材质 = 渲染器.material; 初始颜色 = 材质.color; } ((MonoBehaviour)this).StartCoroutine(开始删除生成()); } [IteratorStateMachine(typeof(<开始删除生成>d__6))] private IEnumerator 开始删除生成() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <开始删除生成>d__6(0) { <>4__this = this }; } [IteratorStateMachine(typeof(<淡出效果>d__7))] private IEnumerator 淡出效果() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <淡出效果>d__7(0) { <>4__this = this }; } private void OnDestroy() { } public void 开始淡出() { ((MonoBehaviour)this).StartCoroutine(开始删除生成()); } public void 设置参数(float 新CD, float 新淡出时间) { cd = 新CD; 淡出时间 = 新淡出时间; } } public class 飞天坠落3 : MonoBehaviour { [CompilerGenerated] private sealed class <激活时间>d__20 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public float time; public float time2; public 飞天坠落3 <>4__this; object IEnumerator<object>.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() { <>1__state = -2; } private bool MoveNext() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.激活跳跃 = true; <>4__this.正在起飞 = true; <>4__this.正在坠落 = false; <>2__current = (object)new WaitForSeconds(time); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.正在起飞 = false; <>4__this.正在坠落 = true; <>2__current = (object)new WaitForSeconds(time2); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.激活跳跃 = false; <>4__this.正在坠落 = false; <>4__this.到达目标判断 = true; <>4__this.计时器3 = 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 Rigidbody[] 所有刚体组件; public Transform 目标变换; public Transform 本体变换; public bool 激活跳跃 = false; public float 跳跃时间 = 1f; public float 坠落时间 = 1f; public float 水平力强度 = 2000f; public float 起飞强度 = 2000f; public float 坠落强度 = 2000f; private float 计时器3 = 0f; private bool 正在起飞 = false; public GameObject exp; public GameObject 转化a; private bool 到达目标判断 = true; private bool 正在坠落 = false; private float 平滑系数 = 0.1f; private Dictionary<Rigidbody, Vector3> 初始角速度 = new Dictionary<Rigidbody, Vector3>(); private void Start() { } public void 启动(Rigidbody[] 所有刚体, float 上升, float 下降, float 水平, float 跳跃时间1, float 下落时间1, Transform 目标变换1, Transform 本体变换1, GameObject exp1, GameObject exp转化) { 所有刚体组件 = 所有刚体; 目标变换 = 目标变换1; 本体变换 = 本体变换1; 水平力强度 = 水平; 起飞强度 = 上升; 坠落强度 = 下降; 跳跃时间 = 跳跃时间1; 坠落时间 = 下落时间1; exp = exp1; 转化a = exp转化; 保存初始角速度(); ((MonoBehaviour)this).StartCoroutine(激活时间(跳跃时间1, 下落时间1)); } private void 保存初始角速度() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) 初始角速度.Clear(); Rigidbody[] array = 所有刚体组件; foreach (Rigidbody val in array) { 初始角速度[val] = val.angularVelocity; } } [IteratorStateMachine(typeof(<激活时间>d__20))] private IEnumerator 激活时间(float time = 3f, float time2 = 3f) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <激活时间>d__20(0) { <>4__this = this, time = time, time2 = time2 }; } private void Update() { if (激活跳跃) { 起飞3(); } } private void 起飞3() { 计时器3 += Time.deltaTime; if (正在起飞 && 计时器3 < 跳跃时间) { 上升力32(); 平滑旋转(); } if (与目标水平距离() < 3f && 到达目标判断 && 正在起飞) { 正在起飞 = false; 正在坠落 = true; 计时器3 = 0f; 到达目标判断 = false; } if (正在坠落 && 计时器3 < 坠落时间) { 坠落力32(); 平滑旋转(); 射线地面检测(); } if (!正在起飞 && !正在坠落 && 激活跳跃) { 平滑旋转(); } } private void 平滑旋转() { //IL_0061: 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_0025: 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_003b: 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_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_00d5: 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) Vector3 val2 = default(Vector3); for (int i = 0; i < 所有刚体组件.Length; i++) { Rigidbody val = 所有刚体组件[i]; if (初始角速度.ContainsKey(val)) { val.angularVelocity = Vector3.Lerp(val.angularVelocity, 初始角速度[val] * 0.3f, 平滑系数 * Time.deltaTime * 10f); } ((Vector3)(ref val2))..ctor(val.velocity.x, 0f, val.velocity.z); if (((Vector3)(ref val2)).magnitude > 5f && !正在起飞) { val.velocity = new Vector3(Mathf.Lerp(val.velocity.x, 0f, 平滑系数 * Time.deltaTime * 5f), val.velocity.y, Mathf.Lerp(val.velocity.z, 0f, 平滑系数 * Time.deltaTime * 5f)); } } } private Vector3 与目标水平方向() { //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) //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_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_0033: Unknown result type (might be due to invalid IL or missing references) Vector3 val = 目标变换.position - 本体变换.position; val.y = 0f; return ((Vector3)(ref val)).normalized; } private float 与目标水平距离() { //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_0024: 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_0032: Unknown result type (might be due to invalid IL or missing references) Vector3 position = 目标变换.position; position.y = 0f; Vector3 position2 = 本体变换.position; position2.y = 0f; return Vector3.Distance(position, position2); } private void 上升力32() { //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_0027: 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_003c: 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_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_0067: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 所有刚体组件.Length; i++) { Vector3 val = 与目标水平方向(); float num = Mathf.Clamp01(与目标水平距离() / 10f); 所有刚体组件[i].AddForce(Vector3.up * 起飞强度 * Time.deltaTime, (ForceMode)5); 所有刚体组件[i].AddForce(val * 水平力强度 * num * Time.deltaTime, (ForceMode)5); } } private void 坠落力32() { //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_0027: 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_003c: 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_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_0067: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 所有刚体组件.Length; i++) { Vector3 val = 与目标水平方向(); float num = Mathf.Clamp01(与目标水平距离() / 5f); 所有刚体组件[i].AddForce(Vector3.down * 坠落强度 * Time.deltaTime, (ForceMode)5); 所有刚体组件[i].AddForce(val * 水平力强度 * num * Time.deltaTime, (ForceMode)5); } } private void 射线地面检测() { //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_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_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_0022: 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_0091: 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_00c8: 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_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_0101: Unknown result type (might be due to invalid IL or missing references) Vector3 val = 本体变换.position + Vector3.up * 10f; RaycastHit[] array = Physics.RaycastAll(val, Vector3.down, 60f); Array.Sort(array, (RaycastHit a, RaycastHit b) => ((RaycastHit)(ref a)).distance.CompareTo(((RaycastHit)(ref b)).distance)); RaycastHit? val2 = null; RaycastHit[] array2 = array; for (int i = 0; i < array2.Length; i++) { RaycastHit value = array2[i]; if (!IsUnitOrChildOfUnit(((Component)((RaycastHit)(ref value)).collider).gameObject)) { val2 = value; break; } } if (val2.HasValue) { Vector3 position = 本体变换.position; RaycastHit value2 = val2.Value; float num = Vector3.Distance(position, ((RaycastHit)(ref value2)).point); if (num < 1.5f) { 平滑减速(); GameObject gameObjectw = exp; value2 = val2.Value; 生成坠落爆炸(gameObjectw, ((RaycastHit)(ref value2)).point, 转化a); 已坠落1(); } } } private void 平滑减速() { //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_002c: 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_0054: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 所有刚体组件.Length; i++) { Rigidbody val = 所有刚体组件[i]; val.velocity = Vector3.Lerp(val.velocity, Vector3.zero, 0.5f * Time.deltaTime * 10f); val.angularVelocity = Vector3.Lerp(val.angularVelocity, Vector3.zero, 0.5f * Time.deltaTime * 10f); } } private bool IsUnitOrChildOfUnit(GameObject obj) { if ((Object)(object)obj.GetComponent<FollowTransform>() != (Object)null) { return true; } GameObject gameObject = ((Component)obj.transform.root).gameObject; Unit[] componentsInChildren = gameObject.GetComponentsInChildren<Unit>(true); return componentsInChildren.Length != 0; } private void 生成坠落爆炸(GameObject gameObjectw, Vector3 pion, GameObject 召唤物) { //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) if ((Object)(object)gameObjectw != (Object)null) { TeamHolder.AddTeamHolder(Object.Instantiate<GameObject>(gameObjectw, pion, Quaternion.identity), 召唤物); } } private void 已坠落1() { 激活跳跃 = false; 正在起飞 = false; 正在坠落 = false; 到达目标判断 = true; 计时器3 = 0f; } } public class 泰山压顶控制器 : MonoBehaviour { private DelayEvent 延迟事件组件; private 飞天坠落3 泰山压顶组件; private Unit Unit23; public GameObject exp323 = UmMyMod.Asset1.LoadAsset<GameObject>("坠落爆炸234"); private void Start() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown 延迟事件组件 = ((Component)this).GetComponent<DelayEvent>(); 泰山压顶组件 = ((Component)this).GetComponent<飞天坠落3>(); Unit23 = ((Component)((Component)this).transform.root).GetComponentInChildren<Unit>(); if ((Object)(object)延迟事件组件 != (Object)null && (Object)(object)泰山压顶组件 != (Object)null) { 延迟事件组件.delayedEvent.AddListener(new UnityAction(启动泰山压顶控制器)); } else { Debug.LogWarning((object)(((Object)((Component)this).gameObject).name + ": 缺少必要组件")); } } private void 启动泰山压顶控制器() { Unit unit = Unit23.data.targetData.unit; if ((Object)(object)泰山压顶组件 != (Object)null) { 泰山压顶组件.启动(Unit23.data.allRigs.AllRigs, 6000f, 8000f, 4000f, 1.5f, 4f, ((Component)unit.data.mainRig).transform, ((Component)Unit23.data.mainRig).transform, exp323, ((Component)this).gameObject); } } private void OnDestroy() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown if ((Object)(object)延迟事件组件 != (Object)null) { 延迟事件组件.delayedEvent.RemoveListener(new UnityAction(启动泰山压顶控制器)); } } } public class 顺序发射炮弹 : MonoBehaviour { [CompilerGenerated] private sealed class <DisableChildrenOneByOne>d__5 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public 顺序发射炮弹 <>4__this; private int <i>5__1; private Transform <child>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <DisableChildrenOneByOne>d__5(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <child>5__2 = null; <>1__state = -2; } private bool MoveNext() { //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; <i>5__1 = 0; break; case 1: <>1__state = -1; <child>5__2 = null; <i>5__1++; break; } if (<i>5__1 < <>4__this.parentObject.transform.childCount) { <child>5__2 = <>4__this.parentObject.transform.GetChild(<i>5__1); if ((Object)(object)((Component)<child>5__2).gameObject.GetComponentInChildren<SpawnObject>() != (Object)null) { ((Component)<child>5__2).gameObject.GetComponent<DelayEvent>().Go(); } <>2__current = (object)new WaitForSeconds(<>4__this.delayBetweenDisable); <>1__state = 1; return true; } Debug.Log((object)"所有子物体已按顺序禁用完成!"); 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 GameObject parentObject; public float delayBetweenDisable = 0.1f; private Unit erree; private void Start() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown erree = ((Component)((Component)this).transform.root).GetComponentInChildren<Unit>(); ((Component)this).gameObject.GetComponent<DelayEvent>().delayedEvent.AddListener(new UnityAction(启动32)); parentObject = ((Component)((Component)this).gameObject.transform.Find("本体火箭同233244")).gameObject; if (!((Object)(object)parentObject != (Object)null)) { Debug.LogError((object)"请指定父物体!"); } } private void 启动32() { if (!erree.data.targetData.Dead) { ((MonoBehaviour)this).StartCoroutine(DisableChildrenOneByOne()); } } [IteratorStateMachine(typeof(<DisableChildrenOneByOne>d__5))] private IEnumerator DisableChildrenOneByOne() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <DisableChildrenOneByOne>d__5(0) { <>4__this = this }; } } public class 半血变换4 : MonoBehaviour { [CompilerGenerated] private sealed class <kiazhaidsfj>d__7 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public UnitBlueprint unit3; public 半血变换4 <>4__this; private Quaternion <rotation>5__1; private GameObject <gameObject1>5__2; private Rigidbody[] <allRigs>5__3; private Rigidbody[] <allRigs2>5__4; private int <num>5__5; private int <m>5__6; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <kiazhaidsfj>d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <gameObject1>5__2 = null; <allRigs>5__3 = null; <allRigs2>5__4 = null; <>1__state = -2; } private bool MoveNext() { //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_0048: 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_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_007c: 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_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_00e1: 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_017c: 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_01e7: 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_023b: Unknown result type (might be due to invalid IL or missing references) if (<>1__state != 0) { return false; } <>1__state = -1; <rotation>5__1 = Quaternion.LookRotation(Vector3.up); TeamHolder.AddTeamHolder(Object.Instantiate<GameObject>(<>4__this.母体集束炸弹, <>4__this.unit.data.mainRig.position + ((Component)<>4__this.unit.data.mainRig).transform.forward * -4f, <rotation>5__1), ((Component)<>4__this).gameObject); <gameObject1>5__2 = unit3.Spawn(<>4__this.unit.data.mainRig.position + Vector3.up * 1000f, <>4__this.unit.data.mainRig.rotation, <>4__this.unit.Team, 1f, (UnitPoolInfo?)null)[0]; <allRigs>5__3 = <>4__this.unit.data.allRigs.AllRigs; <allRigs2>5__4 = <gameObject1>5__2.GetComponent<Unit>().data.allRigs.AllRigs; ((Component)<>4__this.unit).GetComponentsInChildren<Rigidbody>(); <gameObject1>5__2.transform.localScale = ((Component)<>4__this.unit).transform.localScale; for (<m>5__6 = 0; <m>5__6 < <allRigs2>5__4.Length; <m>5__6 = <num>5__5 + 1) { ((Component)<allRigs2>5__4[<m>5__6]).transform.localScale = ((Component)<allRigs>5__3[<m>5__6]).transform.localScale; ((Component)<allRigs2>5__4[<m>5__6]).transform.position = ((Component)<allRigs>5__3[<m>5__6]).transform.position; ((Component)<allRigs2>5__4[<m>5__6]).transform.rotation = ((Component)<allRigs>5__3[<m>5__6]).transform.rotation; <allRigs2>5__4[<m>5__6].velocity = <allRigs>5__3[<m>5__6].velocity; <num>5__5 = <m>5__6; } Object.Destroy((Object)(object)((Component)<>4__this.unit).gameObject); <>4__this.判断1 = 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 Unit unit; private bool 判断1 = true; private float 计时器 = 0f; public UnitBlueprint unitBlueprint323; public GameObject 母体集束炸弹; public void Start() { unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>(); } public void Update() { if ((double)unit.data.health <= (double)unit.data.maxHealth * 0.5 && 判断1) { ((MonoBehaviour)this).StartCoroutine(kiazhaidsfj(unitBlueprint323)); } } [IteratorStateMachine(typeof(<kiazhaidsfj>d__7))] public IEnumerator kiazhaidsfj(UnitBlueprint unit3) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <kiazhaidsfj>d__7(0) { <>4__this = this, unit3 = unit3 }; } } public class 集束炸弹母体脚本 : MonoBehaviour { [CompilerGenerated] private sealed class <集束爆炸协程>d__4 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public 集束炸弹母体脚本 <>4__this; private GameObject <集束炸弹控制器>5__1; private RemoveAfterSeconds <自动销毁组件>5__2; private 集束炸弹32 <集束炸弹逻辑>5__3; object IEnumerator<object>.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() { <集束炸弹控制器>5__1 = null; <自动销毁组件>5__2 = null; <集束炸弹逻辑>5__3 = 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 //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //IL_006c: 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(<>4__this.爆炸延迟时间); <>1__state = 1; return true; case 1: <>1__state = -1; <集束炸弹控制器>5__1 = new GameObject("集束炸弹控制器"); <集束炸弹控制器>5__1.transform.position = ((Component)<>4__this).transform.position; <自动销毁组件>5__2 = <集束炸弹控制器>5__1.AddComponent<RemoveAfterSeconds>(); <自动销毁组件>5__2.seconds = <>4__this.生成物存在时间; TeamHolder.AddTeamHolder(<集束炸弹控制器>5__1, ((Component)<>4__this).gameObject); <集束炸弹逻辑>5__3 = <集束炸弹控制器>5__1.AddComponent<集束炸弹32>(); <集束炸弹逻辑>5__3.子体集束炸弹预制体 = <>4__this.子体集束炸弹预制体1; Object.Destroy((Object)(object)((Component)<>4__this).gameObject); 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 GameObject 子体集束炸弹预制体1; [SerializeField] private float 爆炸延迟时间 = 1f; [SerializeField] private float 生成物存在时间 = 5f; private void Start() { ((MonoBehaviour)this).StartCoroutine(集束爆炸协程()); } [IteratorStateMachine(typeof(<集束爆炸协程>d__4))] public IEnumerator 集束爆炸协程() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <集束爆炸协程>d__4(0) { <>4__this = this }; } } public class 集束炸弹32 : MonoBehaviour { [CompilerGenerated] private sealed class <集束爆炸协程>d__8 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public 集束炸弹32 <>4__this; private int <i>5__1; private Vector3 <随机方向>5__2; private GameObject <炸弹实例>5__3; private Rigidbody <rb>5__4; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <集束爆炸协程>d__8(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <炸弹实例>5__3 = null; <rb>5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_0085: 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_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_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_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_011f: 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_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Expected O, but got Unknown int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; goto IL_018a; } <>1__state = -1; <i>5__1 = 0; goto IL_01ab; IL_018a: <炸弹实例>5__3 = null; <rb>5__4 = null; <i>5__1++; goto IL_01ab; IL_01ab: if ((float)<i>5__1 < <>4__this.集束炸弹数量) { <随机方向>5__2 = new Vector3(Random.Range(0f - <>4__this.随机散布范围, <>4__this.随机散布范围), Random.Range((0f - <>4__this.随机散布范围) * 1f, 0f), Random.Range(0f - <>4__this.随机散布范围, <>4__this.随机散布范围)); <炸弹实例>5__3 = Object.Instantiate<GameObject>(<>4__this.子体集束炸弹预制体, ((Component)<>4__this).transform.position, Quaternion.identity); if (<随机方向>5__2 != Vector3.zero) { <炸弹实例>5__3.transform.rotation = Quaternion.LookRotation(((Vector3)(ref <随机方向>5__2)).normalized); } <rb>5__4 = <炸弹实例>5__3.GetComponent<Rigidbody>(); if ((Object)(object)<rb>5__4 != (Object)null) { <rb>5__4.velocity = ((Vector3)(ref <随机方向>5__2)).normalized * 10f; } TeamHolder.AddTeamHolder(<炸弹实例>5__3, ((Component)<>4__this).gameObject); if (<>4__this.爆炸间隔 > 0f) { <>2__current = (object)new WaitForSeconds(<>4__this.爆炸间隔); <>1__state = 1; return true; } goto IL_018a; } 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(); } } [SerializeField] private float 集束炸弹数量 = 200f; [SerializeField] public GameObject 子体集束炸弹预制体; [SerializeField] private float 随机散布范围 = 12f; [SerializeField] private float 爆炸间隔 = 0.02f; private MoveTransform moveqw; public float 速度变化 = 50f; private void Start() { moveqw = 子体集束炸弹预制体.GetComponent<MoveTransform>(); ((MonoBehaviour)this).StartCoroutine(集束爆炸协程()); } private void Update() { moveqw.selfImpulse.z = Random.Range(0f, 速度变化); } [IteratorStateMachine(typeof(<集束爆炸协程>d__8))] public IEnumerator 集束爆炸协程() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <集束爆炸协程>d__8(0) { <>4__this = this }; } } public class 召唤爆炸并删除自身 : MonoBehaviour { private Unit unit; private bool 判断1 = true; private float 计时器 = 0f; public GameObject 爆炸; private void Start() { //IL_0046: 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) unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>(); ((Damagable)unit.data.healthHandler).TakeDamage(1000f, unit.data.mainRig.position, (Unit)null, (DamageType)0); TeamHolder.AddTeamHolder(Object.Instantiate<GameObject>(爆炸, unit.data.mainRig.position, Quaternion.identity), ((Component)this).gameObject); Object.Destroy((Object)(object)((Component)this).gameObject); } } public class 会员客户目标选择器 : MonoBehaviour { private Unit unit; private bool 判断1 = true; private float 计时器 = 0f; public void Start() { unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>(); UnitAPI api = unit.api; } } namespace ModdingForDummies { [BepInPlugin("nihongpaoxi34589", "nihongpaoxi344589", "1.0.0")] public class Launcher : BaseUnityPlugin { [CompilerGenerated] private sealed class <Launcher1>d__1 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Launcher <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Launcher1>d__1(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 //IL_0057: 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 WaitForSecondsRealtime(7f); <>1__state = 1; return true; case 1: <>1__state = -1; SLMALoader.GetInstance(); AssetImporter.Initialize(); UmMyMod.Main2(); new Harmony(Main212.modname).PatchAll(); Debug.Log((object)"已加载霓虹派系"); 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 void Awake() { ((BaseUnityPlugin)this).Logger.LogInfo((object)"霓虹补丁注入中..."); Harmony.CreateAndPatchAll(typeof(bububudinghding), (string)null); ((BaseUnityPlugin)this).Logger.LogInfo((object)"霓虹补丁注入完成!"); ((MonoBehaviour)this).StartCoroutine(Launcher1()); } [IteratorStateMachine(typeof(<Launcher1>d__1))] private IEnumerator Launcher1() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Launcher1>d__1(0) { <>4__this = this }; } } public static class UmMyMod { public static AssetBundle Asset1; public static Faction 霓虹派系公用; public static void Main2() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: 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_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_00bd: 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_010a: 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_0157: 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_01a4: 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_01f1: 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_023e: 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_028b: 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_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: 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_0334: 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_0381: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_0459: 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_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: 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_0502: Unknown result type (might be due to invalid IL or missing references) //IL_07ba: Unknown result type (might be due to invalid IL or missing references) //IL_07ce: Expected O, but got Unknown //IL_088f: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Expected O, but got Unknown //IL_0c74: Unknown result type (might be due to invalid IL or missing references) //IL_0c89: Expected O, but got Unknown //IL_0cae: Unknown result type (might be due to invalid IL or missing references) //IL_0cc3: Expected O, but got Unknown //IL_0ce8: Unknown result type (might be due to invalid IL or missing references) //IL_0cfd: Expected O, but got Unknown //IL_1072: Unknown result type (might be due to invalid IL or missing references) //IL_1078: Expected O, but got Unknown //IL_1097: Unknown result type (might be due to invalid IL or missing references) //IL_109d: Expected O, but got Unknown //IL_10ec: Unknown result type (might be due to invalid IL or missing references) //IL_10f6: Unknown result type (might be due to invalid IL or missing references) //IL_127f: Unknown result type (might be due to invalid IL or missing references) //IL_1285: Expected O, but got Unknown //IL_12b8: Unknown result type (might be due to invalid IL or missing references) //IL_12be: Expected O, but got Unknown //IL_130b: Unknown result type (might be due to invalid IL or missing references) //IL_1311: Expected O, but got Unknown //IL_1330: Unknown result type (might be due to invalid IL or missing references) //IL_1336: Expected O, but got Unknown //IL_144d: Unknown result type (might be due to invalid IL or missing references) //IL_1457: Unknown result type (might be due to invalid IL or missing references) //IL_149d: Unknown result type (might be due to invalid IL or missing references) //IL_14a2: Unknown result type (might be due to invalid IL or missing references) //IL_14b3: Unknown result type (might be due to invalid IL or missing references) //IL_14b8: Unknown result type (might be due to invalid IL or missing references) //IL_14bd: Unknown result type (might be due to invalid IL or missing references) //IL_14c7: Expected O, but got Unknown //IL_15af: Unknown result type (might be due to invalid IL or missing references) //IL_15b4: Unknown result type (might be due to invalid IL or missing references) //IL_1719: Unknown result type (might be due to invalid IL or missing references) //IL_1723: Expected O, but got Unknown //IL_182d: Unknown result type (might be due to invalid IL or missing references) //IL_1833: Expected O, but got Unknown //IL_1940: Unknown result type (might be due to invalid IL or missing references) //IL_1946: Expected O, but got Unknown Assembly executingAssembly = Assembly.GetExecutingAssembly(); Stream manifestResourceStream = executingAssembly.GetManifestResourceStream("Niiido.fghrrh"); AssetBundle val = (Asset1 = AssetBundle.LoadFromStream(manifestResourceStream)); Material[] redmaterials = (Material[])(object)new Material[1] { new Material(val.LoadAsset<Material>("redt1")) }; Material[] bullmasss = (Material[])(object)new Material[1] { new Material(val.LoadAsset<Material>("bullt1")) }; Material[] redmaterials2 = (Material[])(object)new Material[1] { new Material(val.LoadAsset<Material>("redt2")) }; Material[] bullmasss2 = (Material[])(object)new Material[1] { new Material(val.LoadAsset<Material>("bullt2")) }; Texture2D val2 = val.LoadAsset<Texture2D>("光剑士兵43"); ((Texture)val2).filterMode = (FilterMode)0; Sprite val3 = Sprite.Create(val2, new Rect(0f, 0f, (float)((Texture)val2).width, (float)((Texture)val2).height), new Vector2(0.5f, 0.5f)); Texture2D val4 = val.LoadAsset<Texture2D>("光剑大师34"); ((Texture)val4).filterMode = (FilterMode)0; Sprite val5 = Sprite.Create(val4, new Rect(0f, 0f, (float)((Texture)val4).width, (float)((Texture)val4).height), new Vector2(0.5f, 0.5f)); Texture2D val6 = val.LoadAsset<Texture2D>("或i吨传送23"); ((Texture)val6).filterMode = (FilterMode)0; Sprite val7 = Sprite.Create(val6, new Rect(0f, 0f, (float)((Texture)val6).width, (float)((Texture)val6).height), new Vector2(0.5f, 0.5f)); Texture2D val8 = val.LoadAsset<Texture2D>("擂台炮2342"); ((Texture)val8).filterMode = (FilterMode)0; Sprite val9 = Sprite.Create(val8, new Rect(0f, 0f, (float)((Texture)val8).width, (float)((Texture)val8).height), new Vector2(0.5f, 0.5f)); Texture2D val10 = val.LoadAsset<Texture2D>("激光塔345t"); ((Texture)val10).filterMode = (FilterMode)0; Sprite val11 = Sprite.Create(val10, new Rect(0f, 0f, (float)((Texture)val10).width, (float)((Texture)val10).height), new Vector2(0.5f, 0.5f)); Texture2D val12 = val.LoadAsset<Texture2D>("激光枪手i234"); ((Texture)val12).filterMode = (FilterMode)0; Sprite val13 = Sprite.Create(val12, new Rect(0f, 0f, (float)((Texture)val12).width, (float)((Texture)val12).height), new Vector2(0.5f, 0.5f)); Texture2D val14 = val.LoadAsset<Texture2D>("磁暴步兵234"); ((Texture)val14).filterMode = (FilterMode)0; Sprite val15 = Sprite.Create(val14, new Rect(0f, 0f, (float)((Texture)val14).width, (float)((Texture)val14).height), new Vector2(0.5f, 0.5f)); Texture2D val16 = val.LoadAsset<Texture2D>("罪恶克星1234"); ((Texture)val16).filterMode = (FilterMode)0; Sprite val17 = Sprite.Create(val16, new Rect(0f, 0f, (float)((Texture)val16).width, (float)((Texture)val16).height), new Vector2(0.5f, 0.5f)); Texture2D val18 = val.LoadAsset<Texture2D>("雷电法王3144"); ((Texture)val18).filterMode = (FilterMode)0; Sprite val19 = Sprite.Create(val18, new Rect(0f, 0f, (float)((Texture)val18).width, (float)((Texture)val18).height), new Vector2(0.5f, 0.5f)); Texture2D val20 = val.LoadAsset<Texture2D>("穿透射线23"); ((Texture)val20).filterMode = (FilterMode)0; Sprite val21 = Sprite.Create(val20, new Rect(0f, 0f, (float)((Texture)val20).width, (float)((Texture)val20).height), new Vector2(0.5f, 0.5f)); Texture2D val22 = val.LoadAsset<Texture2D>("擂台拳击手3425245"); ((Texture)val22).filterMode = (FilterMode)0; Sprite val23 = Sprite.Create(val22, new Rect(0f, 0f, (float)((Texture)val22).width, (float)((Texture)val22).height), new Vector2(0.5f, 0.5f)); Texture2D val24 = val.LoadAsset<Texture2D>("引力风暴312445"); ((Texture)val14).filterMode = (FilterMode)0; Sprite val25 = Sprite.Create(val24, new Rect(0f, 0f, (float)((Texture)val24).width, (float)((Texture)val24).height), new Vector2(0.5f, 0.5f)); Texture2D val26 = val.LoadAsset<Texture2D>("最终冷静23r"); ((Texture)val16).filterMode = (FilterMode)0; Sprite val27 = Sprite.Create(val26, new Rect(0f, 0f, (float)((Texture)val26).width, (float)((Texture)val26).height), new Vector2(0.5f, 0.5f)); Texture2D val28 = val.LoadAsset<Texture2D>("超级坦克234"); ((Texture)val28).filterMode = (FilterMode)0; Sprite val29 = Sprite.Create(val28, new Rect(0f, 0f, (float)((Texture)val28).width, (float)((Texture)val28).height), new Vector2(0.5f, 0.5f)); Texture2D val30 = val.LoadAsset<Texture2D>("霓虹派系2547"); ((Texture)val30).filterMode = (FilterMode)0; Sprite val31 = Sprite.Create(val30, new Rect(0f, 0f, (float)((Texture)val30).width, (float)((Texture)val30).height), new Vector2(0.5f, 0.5f)); Faction val32 = (霓虹派系公用 = SLMATool.CreateFaction("霓虹派系", (UnitBlueprint[])null, val31, 4354536)); UnitBlueprint val33 = SLMATool.CreateUnit("空白单位2", (UnitBlueprint)null, (Faction)null, (Sprite)null); val33.SetField<UnitBlueprint>("VocalRef", "Misc Attack Vocals/Crow"); val33.SetField<UnitBlueprint>("DeathRef", "Misc Attack Vocals/Crow"); val33.SetField<UnitBlueprint>("footRef", "Misc Attack Vocals/Crow"); UnitBlueprint val34 = SLMATool.CreateUnit("霓虹光剑兵", val33, val32, val3); val34.forceCost = 230u; UnitBlueprint val35 = SLMATool.CreateUnit("霓虹激光枪手", val33, val32, val13); val35.forceCost = 500u; UnitBlueprint val36 = SLMATool.CreateUnit("霓虹混沌刺客", val33, val32, val7); val36.forceCost = 1000u; UnitBlueprint val37 = SLMATool.CreateUnit("霓虹光剑大师", val33, val32, val5); val37.forceCost = 1500u; UnitBlueprint val38 = SLMATool.CreateUnit("罪恶克星", val33, val32, val17); val38.forceCost = 3008u; UnitBlueprint val39 = SLMATool.CreateUnit("霓虹磁暴步兵", val33, val32, val15); val39.forceCost = 3300u; UnitBlueprint val40 = SLMATool.CreateUnit("霓虹激光塔", val33, val32, val11); val40.forceCost = 3500u; UnitBlueprint val41 = SLMATool.CreateUnit("霓虹雷电法王", val33, val32, val19); val41.forceCost = 4000u; UnitBlueprint val42 = SLMATool.CreateUnit("霓虹擂台发射器", val33, val32, val9); val42.forceCost = 4500u; UnitBlueprint val43 = SLMATool.CreateUnit("霓虹穿透狙击手", val33, val32, val21); val43.forceCost = 7700u; UnitBlueprint val44 = SLMATool.CreateUnit("霓虹擂台拳击手", val33, val32, val23); val44.forceCost = 10500u; UnitBlueprint val45 = SLMATool.CreateUnit("霓虹引力风暴", val33, val32, val25); val45.forceCost = 12000u; UnitBlueprint val46 = SLMATool.CreateUnit("霓虹折跃者", val33, val32, val27); val46.forceCost = 20000u; UnitBlueprint val47 = SLMATool.CreateUnit("霓虹超级坦克", val33, val32, val29); val47.forceCost = 20000u; UnitBlueprint val48 = SLMATool.CreateUnit("虚拟擂台冠军", val33, (Faction)null, (Sprite)null); GameObject unitBase = UPool.MyPool.AddObject("霓虹坦克模型", val.LoadAsset<GameObject>("ZHUZHANTANKE"), true, (HideFlags)52, (Sprite)null, 5120968, true); GameObject unitBase2 = UPool.MyPool.AddObject("霓虹挡光塔模型", val.LoadAsset<GameObject>("nihonmhgbjiadhd"), true, (HideFlags)52, (Sprite)null, 5120969, true); GameObject unitBase3 = UPool.MyPool.AddObject("霓虹大炮模型", val.LoadAsset<GameObject>("lwesdftgfe"), true, (HideFlags)52, (Sprite)null, 5120970, true); GameObject val49 = UPool.MyPool.AddObject("虚拟擂台冠军模型", (GameObject)SLMALoader.SDic["bases"]["Humanoid"], true, (HideFlags)52, (Sprite)null, 5120971, true); GameObject rightWeapon = UPool.MyPool.AddObject("霓虹坦克炮管", val.LoadAsset<GameObject>("NIHONGPAOGUAN"), true, (HideFlags)52, val31, 5120972, true); GameObject val50 = UPool.MyPool.AddObject("霓虹激光发射器", val.LoadAsset<GameObject>("minigunadsfasdf"), true, (HideFlags)52, val31, 5120973, true); GameObject val51 = UPool.MyPool.AddObject("霓虹穿透射线发射器", val.LoadAsset<GameObject>("nihongjujiqiangsfdj"), true, (HideFlags)52, val31, 5120974, true); GameObject val52 = UPool.MyPool.AddObject("最终棱镜1", val.LoadAsset<GameObject>("zuizhonglengjinghjsdff"), true, (HideFlags)52, val31, 5120975, true); GameObject val53 = UPool.MyPool.AddObject("擂台发射器武器", (GameObject)SLMALoader.SDic["weapons"]["CannonBallBomb"], true, (HideFlags)52, val31, 5120976, true); GameObject val54 = UPool.MyPool.AddObject("擂台虚拟拳套", val.LoadAsset<GameObject>("nihonghquantao"), true, (HideFlags)52, val31, 5120977, true); GameObject val55 = UPool.MyPool.AddObject("磁暴步枪123", val.LoadAsset<GameObject>("diancipao78"), true, (HideFlags)52, val31, 5120978, true); GameObject val56 = UPool.MyPool.AddObject("擂台冠军拳套", val.LoadAsset<GameObject>("noghusdfuogknvdcss"), true, (HideFlags)52, val31, 5120979, true); GameObject val57 = UPool.MyPool.AddObject("超级拳击手拳套(超浓版)", val.LoadAsset<GameObject>("chaioaosdjifeui"), true, (HideFlags)52, val31, 5120980, true); GameObject val58 = UPool.MyPool.AddObject("激光手枪3eq", val.LoadAsset<GameObject>("jiguangsghiascd"), true, (HideFlags)52, val31, 5120981, true); GameObject rightWeapon2 = UPool.MyPool.AddObject("能量枪223", val.LoadAsset<GameObject>("nengliangdfsq"), true, (HideFlags)52, val31, 5120982, true); GameObject rightWeapon3 = UPool.MyPool.AddObject("普通光剑3143", val.LoadAsset<GameObject>("Neon_Sword231"), true, (HideFlags)52, val31, 5120983, true); GameObject rightWeapon4 = UPool.MyPool.AddObject("旋转光剑243r", val.LoadAsset<GameObject>("Neon_Sworddfghfg"), true, (HideFlags)52, val31, 5120984, true); GameObject rightWeapon5 = UPool.MyPool.AddObject("引力枪123", val.LoadAsset<GameObject>("yinliquahdc"), true, (HideFlags)52, val31, 5120985, true); GameObject rightWeapon6 = UPool.MyPool.AddObject("队伍霓虹色手爪1", val.LoadAsset<GameObject>("霓虹爪1231"), true, (HideFlags)52, val31, 5120986, true); GameObject leftWeapon = UPool.MyPool.AddObject("队伍霓虹色手爪2", val.LoadAsset<GameObject>("霓虹爪5416"), true, (HideFlags)52, val31, 5120987, true); GameObject val59 = UPool.MyPool.AddObject("激光武器4", val.LoadAsset<GameObject>("激光武器4543"), true, (HideFlags)52, val31, 567486734, true); ((Weapon)val59.GetComponentInChildren<RangeWeapon>()).internalCooldown = 9f; GameObject val60 = UPool.MyPool.AddObject("霓虹坦克炮弹", val.LoadAsset<GameObject>("nihongpaodaaan"), true, (HideFlags)52, val31, 5120988, true); GameObject val61 = UPool.MyPool.AddObject("霓虹穿透射线子弹", val.LoadAsset<GameObject>("nihingzidan234524"), true, (HideFlags)52, val31, 5120989, true); GameObject val62 = UPool.MyPool.AddObject("擂台弹", val.LoadAsset<GameObject>("letyatfg"), true, (HideFlags)52, val31, 512090, true); GameObject val63 = UPool.MyPool.AddObject("磁暴步兵子弹", val.LoadAsset<GameObject>("zxafasfhff"), true, (HideFlags)52, val31, 512091, true); GameObject val64 = UPool.MyPool.AddObject("激光子弹345", val.LoadAsset<GameObject>("duanzhajisad"), true, (HideFlags)52, val31, 512092, true); GameObject val65 = UPool.MyPool.AddObject("引力风暴22", val.LoadAsset<GameObject>("heidongsdaad"), true, (HideFlags)52, val31, 512093, true); GameObject val66 = UPool.MyPool.AddObject("激光子弹粒子拖尾134", val.LoadAsset<GameObject>("激光塔飞弹93029"), true, (HideFlags)52, val31, 512094, true); GameObject val67 = UPool.MyPool.AddObject("斥力风暴34", val.LoadAsset<GameObject>("斥力风暴3465"), true, (HideFlags)52, val31, 512095, true); GameObject gameObject = UPool.MyPool.AddObject("射线爆炸", val.LoadAsset<GameObject>("jiguangmingzhong"), true, (HideFlags)52, val31, 512096, true); val.LoadAsset<GameObject>("激光2345452").AddComponent<LaserWithCollision>().hitEffectPrefab = val.LoadAsset<GameObject>("激光渣打吧3"); val.LoadAsset<GameObject>("激光2345452").GetComponent<LaserWithCollision>().laserMaterial = val.LoadAsset<Material>("激光才u在"); GameObject gameObject2 = UPool.MyPool.AddObject("雷电爆炸34", val.LoadAsset<GameObject>("shandiansdf"), true, (HideFlags)52, val31, 512097, true); GameObject val68 = UPool.MyPool.AddObject("8秒后死亡", (GameObject)SLMALoader.SDic["moves"]["Head_up"], true, (HideFlags)52, val31, 512098, true); GameObject val69 = UPool.MyPool.AddObject("开局生成风暴", (GameObject)SLMALoader.SDic["moves"]["Head_up"], true, (HideFlags)52, val31, 512099, true); GameObject val70 = UPool.MyPool.AddObject("开局生成传送阵", (GameObject)SLMALoader.SDic["moves"]["Head_up"], true, (HideFlags)52, val31, 512100, true); GameObject val71 = UPool.MyPool.AddObject("生成虚拟擂台", val.LoadAsset<GameObject>("komngjin"), true, (HideFlags)52, val31, 512101, true); GameObject val72 = UPool.MyPool.AddObject("喷射器1", val.LoadAsset<GameObject>("sdfhggiseu"), true, (HideFlags)52, val31, 512102, true); GameObject val73 = UPool.MyPool.AddObject("测试服装3", val.LoadAsset<GameObject>("jiao1"), true, (HideFlags)52, val31, 512103, true); GameObject val74 = UPool.MyPool.AddObject("测试服装4", val.LoadAsset<GameObject>("huwed1"), true, (HideFlags)52, val31, 512104, true); GameObject val75 = UPool.MyPool.AddObject("测试服装5", val.LoadAsset<GameObject>("tou1"), true, (HideFlags)52, val31, 512105, true); GameObject val76 = UPool.MyPool.AddObject("测试服装6", val.LoadAsset<GameObject>("zhongjiqiangdcxzsda"), true, (HideFlags)52, val31, 512106, true); GameObject val77 = UPool.MyPool.AddObject("霓虹脖套粗1", val.LoadAsset<GameObject>("霓虹脖套1"), true, (HideFlags)52, val31, 512107, true); GameObject val78 = UPool.MyPool.AddObject("黑色现代护腿1", val.LoadAsset<GameObject>("ghjmnbfgch"), true, (HideFlags)52, val31, 512108, true); GameObject val79 = UPool.MyPool.AddObject("霓虹脖套细1", val.LoadAsset<GameObject>("霓虹脖套2"), true, (HideFlags)52, val31, 512109, true); GameObject val80 = UPool.MyPool.AddObject("霓虹袖套短1", val.LoadAsset<GameObject>("霓虹胳膊4"), true, (HideFlags)52, val31, 512110, true); GameObject val81 = UPool.MyPool.AddObject("霓虹袖套长1", val.LoadAsset<GameObject>("霓虹胳膊5"), true, (HideFlags)52, val31, 512111, true); GameObject val82 = UPool.MyPool.AddObject("霓虹黑风衣1", val.LoadAsset<GameObject>("霓虹乌萨黑1"), true, (HideFlags)52, val31, 512112, true); GameObject val83 = UPool.MyPool.AddObject("霓虹武士甲1", val.LoadAsset<GameObject>("霓虹武士套装1"), true, (HideFlags)52, val31, 512113, true); GameObject val84 = UPool.MyPool.AddObject("霓虹公用鞋1", val.LoadAsset<GameObject>("合适的协助1"), true, (HideFlags)52, val31, 512114, true); GameObject val85 = UPool.MyPool.AddObject("霓虹装甲护腿1", val.LoadAsset<GameObject>("庄家护腿3r"), true, (HideFlags)52, val31, 512115, true); GameObject val86 = UPool.MyPool.AddObject("霓虹头盔2345", val.LoadAsset<GameObject>("暴恐机动队头盔321"), true, (HideFlags)52, val31, 512116, true); GameObject val87 = UPool.MyPool.AddObject("霓虹头盔2678", val.LoadAsset<GameObject>("头盔3243245"), true, (HideFlags)52, val31, 512117, true); GameObject val88 = UPool.MyPool.AddObject("霓虹hi加3", val.LoadAsset<GameObject>("护甲1243"), true, (HideFlags)52, val31, 512118, true); GameObject val89 = UPool.MyPool.AddObject("霓虹hRGSDFGRT", val.LoadAsset<GameObject>("霓虹共用毛23"), true, (HideFlags)52, val31, 512119, true); GameObject val90 = UPool.MyPool.AddObject("霓虹测试服34", val.LoadAsset<GameObject>("fghaesdryj"), true, (HideFlags)52, val31, 512120, true); val.LoadAsset<GameObject>("siwangxiaoguo").AddComponent<烧血风扇>(); GameObject val91 = val.LoadAsset<GameObject>("nengliangpaofd"); val91.AddComponent<持续烧血效果>().cd = 0.1f; GameObject val92 = val.LoadAsset<GameObject>("chuansonmsdnxs"); val92.AddComponent<向前传送效果i>().传送距离 = 70f; val61.AddComponent<粒子该345>().redmaterial = (Material[])(object)new Material[1] { new Material(val.LoadAsset<Material>("redt1")) }; val61.GetComponentInChildren<粒子该345>().bullmaterial = (Material[])(object)new Material[1] { new Material(val.LoadAsset<Material>("bullt1")) }; val62.AddComponent<网格改色>().redmaterials = redmaterials; val62.GetComponentInChildren<网格改色>().bullmasss = bullmasss; GameObject val93 = val.LoadAsset<GameObject>("leitaucfid"); GameObject val94 = val.LoadAsset<GameObject>("qiongdidfgbdse"); GameObject val95 = val.LoadAsset<GameObject>("jiamyilefdsdf"); Transform transform = val95.transform; transform.localScale *= 1.5f; ((Component)val94.transform.Find("leidiahsdf")).gameObject.AddComponent<粒子害脚本>().gameObject1 = gameObject2; val62.AddComponent<生成擂台12332>().擂台模型 = val93; val62.GetComponentInChildren<生成擂台12332>().爆炸 = val.LoadAsset<GameObject>("leitaibaixc"); val62.GetComponentInChildren<AddForce>().force.y = 0.75f; val62.GetComponentInChildren<AddForce>().force.z *= 1.5f; val62.GetComponentInChildren<Compensation>().rangePow = 1f; val93.AddComponent<网格改色>().redmaterials = redmaterials2; val93.GetComponentInChildren<网格改色>().bullmasss = bullmasss2; val93.GetComponentInChildren<AudioSource>().spread = 15f; val93.GetComponentInChildren<AudioSource>().spatialBlend = 0.95f; val95.AddComponent<网格改色>().redmaterials = redmaterials2; val95.GetComponentInChildren<网格改色>().bullmasss = bullmasss2; val.LoadAsset<GameObject>("zuizhonglengjingzidan").AddComponent<最终冷静丢啊>(); val.LoadAsset<GameObject>("zuizhonglengjingzidan").AddComponent<粒子害脚本>().gameObject1 = gameObject; val63.GetComponentInChildren<Compensation>().rangePow = 0f; val63.GetComponentInChildren<ProjectileHit>().damage = 12f; val64.GetComponentInChildren<Compensation>().rangePow = 0f; val64.GetComponentInChildren<RemoveAfterSeconds>().seconds = 0.02f; ((Component)val66.transform.Find("toghdfifd")).gameObject.AddComponent<粒子该345子对象>().redmaterial = (Material[])(object)new Material[1] { new Material(val.LoadAsset<Material>("redt1")) }; ((Component)val66.transform.Find("toghdfifd")).gameObject.GetComponentInChildren<粒子该345子对象>().bullmaterial = (Material[])(object)new Material[1] { new Material(val.LoadAsset<Material>("bullt1")) }; val63.AddComponent<粒子该345t拖尾>().redtartymaterial = val.LoadAsset<Material>("redt1"); val63.GetComponentInChildren<粒子该345t拖尾>().bulltarymaterial = val.LoadAsset<Material>("bullt1"); val64.AddComponent<粒子该345>().redmaterial = (Material[])(object)new Material[1] { new Material(val.LoadAsset<Material>("redt1")) }; val64.GetComponentInChildren<粒子该345>().bullmaterial = (Material[])(object)new Material[1] { new Material(val.LoadAsset<Material>("bullt1")) }; Explosion componentInChildren = val67.GetComponentInChildren<Explosion>(); componentInChildren.force *= 2f; GameObject val96 = UPool.MyPool.AddObject("激光风暴45", val.LoadAsset<GameObject>("zuizhonglengjingzidan"), true, (HideFlags)52, val31, 512121, true); GameObject 物体 = val.LoadAsset<GameObject>("chuansongbaoz"); val50.AddComponent<武器跟随4756>(); val50.GetComponentInChildren<RangeWeapon>().ObjectToSpawn = val66; val51.GetComponentInChildren<RangeWeapon>().ObjectToSpawn = val61; ((Weapon)val51.GetComponentInChildren<RangeWeapon>()).maxRange = 99999f; ((Component)val52.transform.Find("W_AKSU").Find("dfsvxcdv")).gameObject.AddComponent<最终棱镜颜色材质>(); val53.GetComponentInChildren<RangeWeapon>().ObjectToSpawn = val62; RangeWeapon componentInChildren2 = val53.GetComponentInChildren<RangeWeapon>(); ((Weapon)componentInChildren2).maxRange = ((Weapon)componentInChildren2).maxRange * 1.5f; ((Weapon)val53.GetComponentInChildren<RangeWeapon>()).internalCooldown = 15f; ((Weapon)val54.GetComponentInChildren<MeleeWeapon>()).maxRange = 9999f; MeleeWeapon componentInChildren3 = val54.GetComponentInChildren<MeleeWeapon>(); componentInChildren3.curveForce *= 10f; Transform transform2 = val56.transform; transform2.localScale *= 1.3f; val56.GetComponentInChildren<CollisionWeapon>().onImpactForce = 5E+12f; val56.GetComponentInChildren<CollisionWeapon>().massCap = 1.4E+12f; val56.GetComponentInChildren<MeleeWeapon>().forceCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0.1f, 2f), new Keyframe(0.2f, 0f) }); ((Weapon)val56.GetComponentInChildren<MeleeWeapon>()).maxRange = 5f; val58.GetComponentInChildren<RangeWeapon>().magSize = 5; val58.GetComponentInChildren<RangeWeapon>().ObjectToSpawn = val64; val55.GetComponentInChildren<RangeWeapon>().ObjectToSpawn = val63; val49.AddComponent<dd秒后趋势>().计时器 = 7f; TeamColor[] componentsInChildren = val49.GetComponentsInChildren<TeamColor>(); foreach (TeamColor val97 in componentsInChildren) { val97.redMaterial = val.LoadAsset<Material>("redt2"); val97.blueMaterial = val.LoadAsset<Material>("bullt2"); } val68.AddComponent<dd秒后趋势>().计时器 = 7f; val69.AddComponent<生成物体2435>().物体1 = val94; val71.AddComponent<半血生成物体2435>().物体1 = val95; val70.AddComponent<生成物体2435>().物体1 = 物体; val70.GetComponentInChildren<生成物体2435>().rggdfr = new Vector3(0f, 1f, 0f); val47.UnitBase = unitBase; val47.RightWeapon = rightWeapon; val47.health = 9000f; val40.UnitBase = unitBase2; val40.RightWeapon = val50; val40.health = 890f; val43.RightWeapon = val51; val43.m_props = (GameObject[])(object)new GameObject[6] { val86, val85, val79, val81, val82, val84 }; val42.UnitBase = unitBase3; val42.RightWeapon = val53; val46.RightWeapon = val52; val46.m_props = (GameObject[])(object)new GameObject[5] { val78, val80, val82, val84, val89 }; val46.health = 650f; val48.RightWeapon = val54; val48.LeftWeapon = val54; val48.health = 9999999f; val48.UnitBase = val49; val39.health = 400f; val39.RightWeapon = val55; val39.m_props = (GameObject[])(object)new GameObject[6] { val88, val78, val80, val82, val84, val89 }; val41.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[1] { val69 }; val41.RightWeapon = (GameObject)SLMALoader.SDic["weapons"]["Neon_TeslaCannon"]; val41.m_props = (GameObject[])(object)new GameObject[6] { val76, val78, val80, val82, val84, val86 }; val41.health = 450f; val44.RightWeapon = val56; val44.LeftWeapon = val56; val44.health = 2000f; val44.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[1] { val71 }; val44.m_props = (GameObject[])(object)new GameObject[4] { val72, val73, val74, val75 }; val44.sizeMultiplier = 1.3f; val44.massMultiplier *= 7f; val35.RightWeapon = val58; val35.m_props = (GameObject[])(object)new GameObject[7] { val85, val79, val81, val82, val84, val88, val87 }; val35.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[1] { (GameObject)SLMALoader.SDic["moves"]["Shogun_Dodge"] }; val38.RightWeapon = rightWeapon2; val38.m_props = (GameObject[])(object)new GameObject[7] { val86, val85, val79, val81, val82, val84, val88 }; val36.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[1] { val70 }; val36.RightWeapon = rightWeapon6; val36.LeftWeapon = leftWeapon; val36.health = 1200f; val36.m_props = (GameObject[])(object)new GameObject[7] { val86, val85, val79, val81, val82, val84, val88 }; val34.RightWeapon = rightWeapon3; val34.m_props = (GameObject[])(object)new GameObject[7] { val89, val78, val77, val81, val83, val82, val84 }; val34.health = 110f; val34.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[1] { (GameObject)SLMALoader.SDic["moves"]["BlockNeon"] }; val37.massMultiplier *= 9f; val37.RightWeapon = rightWeapon4; val37.sizeMultiplier *= 1.4f; val37.health = 1499f; val37.m_props = (GameObject[])(object)new GameObject[7] { val89, val78, val79, val81, val83, val82, val84 }; val45.RightWeapon = rightWeapon5; val45.health = 900f; val45.massMultiplier *= 60f; val45.m_props = (GameObject[])(object)new GameObject[6] { val86, val78, val79, val81, val82, val84 }; val62.GetComponentInChildren<生成擂台12332>().unit4 = val48; Main212.int1(); } public static Sprite 直接获取图标(AssetBundle assetBundle34, string ssdwd = "") { return assetBundle34.LoadAsset<Sprite>(ssdwd); } } public static class Utilities { private static readonly string[] sanitizationFilter; private static readonly Dictionary<GearType, string[]> boneDictionary; public static readonly Quaternion blenderToUnity; public static readonly string rootPath; public static Dictionary<string, string> language; public static readonly ContentDatabase fullDatabase; public static readonly LandfallContentDatabase database; public static Explosion[] explosions; public static UnitEffectBase[] effects; public static Sprite[] sprites; public static readonly ModExplosion unitSpawner; public static readonly ModFaction baseFaction; static Utilities() { //IL_0236: 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_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Expected O, but got Unknown //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) sanitizationFilter = new string[33] { "Icon_Legacy_", "Icons_128x128_", "Icons_", "Icon_", "CP_", "P_", "E_", " Prefabs_VB", " Effects_VB", "_1", "_2", "_3", " (1)", " (2)", " (3)", " (4)", " (5)", " (6)", "B_", "Move_", "Leg_", "1_", "12_", "15_", "6__", "7_", "14_", "2_", "8_", "10_", "16_", "5_", "3_" }; boneDictionary = new Dictionary<GearType, string[]> { { (GearType)0, new string[1] { "M_Head" } }, { (GearType)1, new string[1] { "M_Neck" } }, { (GearType)2, new string[2] { "M_Shoulder_Right", "M_Shoulder_Left" } }, { (GearType)3, new string[1] { "M_Torso" } }, { (GearType)4, new string[2] { "M_Arm_Right", "M_Arm_Left" } }, { (GearType)5, new string[2] { "M_Wrist_Right", "M_Wrist_Left" } }, { (GearType)7, new string[1] { "M_Waist" } }, { (GearType)8, new string[2] { "M_Leg_Right", "M_Leg_Left" } }, { (GearType)9, new string[2] { "M_Foot_Right", "M_Foot_Left" } } }; blenderToUnity = Quaternion.Euler(-90f, 0f, 0f); rootPath = Directory.GetParent(Assembly.GetExecutingAssembly().Location)?.ToString(); language = Localizer.GetLanguage((Language)0); fullDatabase = ContentDatabase.Instance(); database = ContentDatabase.Instance().LandfallContentDatabase; explosions = Resources.FindObjectsOfTypeAll<Explosion>(); effects = Resources.FindObjectsOfTypeAll<UnitEffectBase>(); sprites = Resources.FindObjectsOfTypeAll<Sprite>(); unitSpawner = new ModExplosion(Mod.PoolObject(new GameObject("UnitSpawner", new Type[1] { typeof(UnitSpawner) }))); List<string> source = (from z in (from z in language group z by z.Value into z where z.Count() > 1 select z).SelectMany((IGrouping<string, KeyValuePair<string, string>> z) => z) select z.Key).ToList(); Dictionary<string, int> dictionary = new Dictionary<string, int>(); foreach (string item in source.Where((string v) => language[v] != null && language[v] != string.Empty)) { if (!dictionary.ContainsKey(language[item])) { dictionary.Add(language[item], 1); continue; } dictionary[language[item]]++; language[item] = language[item] + " " + dictionary[language[item]]; } Faction val = Object.Instantiate<Faction>(GetFaction("Medieval")); val.Entity.GenerateNewID(); val.Entity.Name = "Base Faction"; val.Units = Array.Empty<UnitBlueprint>(); val.index = database.GetFactions().ToList().Count; val.m_FactionColor = HexColor("#888888"); val.m_displayFaction = false; AddFactionToDatabase(val); baseFaction = new ModFaction(val); if (Mod.DEV_MODE) { string text = Path.Combine(rootPath, "MFDPrints"); if (!Directory.Exists(text)) { Directory.CreateDirectory(text); } string contents = string.Join(Environment.NewLine, from GameObject weapon in database.GetWeapons() where (Object)(object)weapon != (Object)null select GetProperName(((CharacterItem)weapon.GetComponentInChildren<WeaponItem>()).Entity.Name)); File.WriteAllText(Path.Combine(text, "weapons.txt"), contents); string contents2 = string.Join(Environment.NewLine, from GameObject unitBase in database.GetUnitBases() where (Object)(object)unitBase != (Object)null select GetProperName(unitBase.GetComponentInChildren<Unit>().Entity.Name)); File.WriteAllText(Path.Combine(text, "bases.txt"), contents2); string contents3 = string.Join(Environment.NewLine, from GameObject clothing in database.GetCharacterProps() where (Object)(object)clothing != (Object)null select GetProperName(((CharacterItem)clothing.GetComponentInChildren<PropItem>()).Entity.Name)); File.WriteAllText(Path.Combine(text, "clothing.txt"), contents3); string contents4 = string.Join(Environment.NewLine, from IDatabaseEntity unit in database.GetUnitBlueprints() select GetProperName(unit.Entity.Name)); File.WriteAllText(Path.Combine(text, "unit.txt"), contents4); string contents5 = string.Join(Environment.NewLine, from IDatabaseEntity faction in database.GetFactions() select GetProperName(faction.Entity.Name)); File.WriteAllText(Path.Combine(text, "factions.txt"), contents5); string contents6 = string.Join(Environment.NewLine, from Explosion explosion in explosions where (Object)(object)explosion != (Object)null select GetProperName(((Object)((Component)explosion).gameObject).name)); File.WriteAllText(Path.Combine(text, "explosions.txt"), contents6); string contents7 = string.Join(Environment.NewLine, from UnitEffectBase effect in effects where (Object)(object)effect != (Object)null select GetProperName(((Object)((Component)effect).gameObject).name)); File.WriteAllText(Path.Combine(text, "effects.txt"), contents7); string contents8 = string.Join(Environment.NewLine, from GameObject projectile in database.GetProjectiles() select GetProperName(projectile.GetComponentInChildren<ProjectileEntity>().Entity.Name)); File.WriteAllText(Path.Combine(text, "projectiles.txt"), contents8); string contents9 = string.Join(Environment.NewLine, from GameObject move in database.GetCombatMoves() select GetProperName(((CharacterItem)move.GetComponentInChildren<SpecialAbility>()).Entity.Name)); File.WriteAllText(Path.Combine(text, "moves.txt"), contents9); string contents10 = string.Join(Environment.NewLine, from FactionIcon icon in fullDatabase.GetFactionIcons() select GetProperName(icon.Entity.Name)); File.WriteAllText(Path.Combine(text, "icons.txt"), contents10); string contents11 = string.Join(Environment.NewLine, from Sprite icon in Resources.FindObjectsOfTypeAll<Sprite>() select GetProperName(((Object)icon).name)); File.WriteAllText(Path.Combine(text, "iconsExtra.txt"), contents11); } } public static object CallMethod(this object o, string methodName, params object[] args) { MethodInfo method = o.GetType().GetMethod(methodName, (BindingFlags)(-1)); if (method != null) { return method.Invoke(o, args); } Debug.Log((object)("Call Method " + methodName + " nulled")); return null; } public static object GetField<T>(this T instance, string fieldName, BindingFlags flags = (BindingFlags)(-1)) { FieldInfo field = typeof(T).GetField(fieldName, flags); try { field.GetValue(instance); } catch { Debug.Log((object)$"(GetField) Failed to get field '{fieldName}' for object '{typeof(T)}'. Try using manual BindingFlags."); } return field.GetValue(instance); } public static void SetField<T>(this T instance, string fieldName, object newValue, BindingFlags flags = (BindingFlags)(-1)) { FieldInfo field = typeof(T).GetField(fieldName, flags); Debug.Log((object)field); try { field.SetValue(instance, newValue); } catch { Debug.Log((object)$"(SetField) Failed to set field '{fieldName}' for object '{typeof(T)}'. Try using manual BindingFlags."); } } public static Transform SetHideFlagsChildren(this Transform t, HideFlags hf = 52) { //IL_0017: 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) if (Object.op_Implicit((Object)(object)((Component)t).gameObject)) { ((Object)((Component)t).gameObject).hideFlags = hf; } if (t.childCount > 0) { for (int i = 0; i < t.childCount; i++) { t.GetChild(i).SetHideFlagsChildren(hf); } } return t; } public static Sprite CreateSprite(string path) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_005c: 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) if (string.IsNullOrEmpty(path)) { return null; } if (!File.Exists(path)) { return null; } byte[] array = File.ReadAllBytes(path); Texture2D val = new Texture2D(1, 1); ImageConversion.LoadImage(val, array); ((Texture)val).filterMode = (FilterMode)0; return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0f, 0f), 1f); } public static bool NullCheck(this object self, string flag = "Object") { Debug.Log((object)("[NULLCHECK] " + flag + " is " + ((self == null) ? "NULL" : "REAL") + "!")); return self == null; } public static T GetResourcesObj<T>(string obj) { Object[] source = Resources.FindObjectsOfTypeAll(typeof(T)); return (T)(object)((IEnumerable<Object>)source).FirstOrDefault((Func<Object, bool>)((Object x) => x.name.Contains(obj))); } public static string IncrementName(string name) { return name.Contains(";") ? (name.Split(new char[1] { ';' })[0] + int.Parse(name.Split(new char[1] { ';' })[1]) + 1) : (name + ";1"); } public static void ForEach<T>(this IEnumerable<T> collection, Action<T> action) { foreach (T item in collection) { action(item); } } public static void ForEach<T>(this T[] array, Action<T> action) { foreach (T obj in array) { action(obj); } } public static Dictionary<V, U> Reverse<U, V>(this Dictionary<U, V> self) { Dictionary<V, U> dictionary = new Dictionary<V, U>(); foreach (U key in self.Keys) { dictionary[self[key]] = key; } return dictionary; } public static Color HexColor(string hexCode) { //IL_002c: 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) hexCode = (hexCode.StartsWith("#") ? hexCode : ("#" + hexCode)).ToUpper(); Color result = default(Color); ColorUtility.TryParseHtmlString(hexCode, ref result); return result; } public static T FindVanillaObject<T>(IEnumerable<T> source, string name, Func<T, string> getName) { return source.FirstOrDefault((T o) => name == GetProperName(getName(o))); } public static string GetProperName(string name) { string text = null; if (language.ContainsKey(name)) { text = language[name]; } else { text = name; string[] array = sanitizationFilter; foreach (string oldValue in array) { text = text.Replace(oldValue, ""); } } return text; } public static string DeepString(this GameObject self) { string text = "\nGameObject '" + ((Object)self).name + "':\n{\n\tComponents:\n\t{\n"; text = string.Concat(text, string.Concat(from Component component in self.GetComponents<Component>() select "\t\t" + ((object)component).GetType().Name + "\n")); text += "\t}\n"; if (self.transform.childCount > 0) { text += "\tChildren:\n\t{\n"; text = string.Concat(text, string.Concat(from Transform child in (IEnumerable)self.transform select ((Component)child).gameObject.DeepString().Replace("\n", "\n\t\t"))); text += "\n\t}\n"; } return text + "}\n"; } public static void PlaceMeshOnBone(SkinnedMeshRenderer renderer, GameObject mesh, GearType gearType) { //IL_0006: 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_006b: Unknown result type (might be due to invalid IL or missing references) string text = boneDictionary[gearType][0]; Transform[] bones = renderer.bones; foreach (Transform val in bones) { if (((Object)val).name == text) { mesh.transform.parent = ((Component)val).transform; mesh.transform.localPosition = Vector3.zero; mesh.transform.localRotation = Quaternion.Euler(-90f, 0f, 0f); } } } public static void SetMeshRenderers(GameObject gameObject, bool enabled) { Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(); for (int i = 0; i < compo