Decompiled source of Yokosoo v1.11.1
BepInEx\plugins\HollowPurple\HollowPurple.dll
Decompiled 8 hours 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.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text; using BepInEx; using BepInEx.Configuration; using CardChoiceSpawnUniqueCardPatch.CustomCategories; using ExitGames.Client.Photon; using HarmonyLib; using HollowPurple.Abilities; using HollowPurple.Audio; using HollowPurple.Camera; using HollowPurple.Cards; using HollowPurple.Classes; using HollowPurple.Combat; using HollowPurple.Config; using HollowPurple.Diagnostics; using HollowPurple.Networking; using HollowPurple.Projectiles; using HollowPurple.Upgrades; using HollowPurple.VFX; using InControl; using ModdingUtils.Utils; using Photon.Pun; using Photon.Realtime; using UnboundLib; using UnboundLib.Cards; using UnboundLib.GameModes; using UnityEngine; using UnityEngine.Rendering; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("Hollow Purple for ROUNDS")] [assembly: AssemblyDescription("Original procedural ultimate ability for the old-rounds-for-mods branch")] [assembly: AssemblyFileVersion("1.5.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.6.1", FrameworkDisplayName = "")] [assembly: AssemblyVersion("1.5.0.0")] namespace HollowPurple { [BepInPlugin("fr.flofl.rounds.hollowpurple", "Hollow Purple", "1.11.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInProcess("Rounds.exe")] public sealed class Plugin : BaseUnityPlugin { public const string Id = "fr.flofl.rounds.hollowpurple"; public const string Version = "1.11.1"; private Harmony harmony; public static Plugin Instance { get; private set; } public HollowPurpleConfig Settings { get; private set; } public HollowPurpleNetwork Network { get; private set; } public EffectPool Effects { get; private set; } public HollowPurpleAudioController Audio { get; private set; } private void Awake() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown Instance = this; Settings = new HollowPurpleConfig(((BaseUnityPlugin)this).Config); harmony = new Harmony("fr.flofl.rounds.hollowpurple"); harmony.PatchAll(typeof(Plugin).Assembly); } private void Start() { Audio = ((Component)this).gameObject.AddComponent<HollowPurpleAudioController>(); Audio.Initialize(); Effects = ((Component)this).gameObject.AddComponent<EffectPool>(); Effects.Initialize(); Network = ((Component)this).gameObject.AddComponent<HollowPurpleNetwork>(); GameModeManager.AddHook("BattleStart", (Func<IGameModeHandler, IEnumerator>)BattleStart); GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)End); GameModeManager.AddHook("GameEnd", (Func<IGameModeHandler, IEnumerator>)End); GameModeManager.AddHook("PickStart", (Func<IGameModeHandler, IEnumerator>)End); CustomCard.BuildCard<GojoClassCard>((Action<CardInfo>)delegate(CardInfo card) { SorcererClasses.GojoClassCard = card; }); CustomCard.BuildCard<SukunaClassCard>((Action<CardInfo>)delegate(CardInfo card) { SorcererClasses.SukunaClassCard = card; }); CustomCard.BuildCard<YhwachClassCard>((Action<CardInfo>)delegate(CardInfo card) { SorcererClasses.YhwachClassCard = card; }); CustomCard.BuildCard<GokuClassCard>((Action<CardInfo>)delegate(CardInfo card) { SorcererClasses.GokuClassCard = card; }); CustomCard.BuildCard<AizenClassCard>((Action<CardInfo>)delegate(CardInfo card) { SorcererClasses.AizenClassCard = card; }); CustomCard.BuildCard<HollowPurpleCard>((Action<CardInfo>)delegate(CardInfo card) { HollowPurpleCard.Registered = card; ((BaseUnityPlugin)this).Logger.LogInfo((object)("Carte enregistree : " + card.cardName)); }); CustomCard.BuildCard<HollowPurpleAmplification1>((Action<CardInfo>)delegate(CardInfo card) { HollowPurpleUpgradeCard.Register(1, card); }); CustomCard.BuildCard<HollowPurpleAmplification2>((Action<CardInfo>)delegate(CardInfo card) { HollowPurpleUpgradeCard.Register(2, card); }); CustomCard.BuildCard<HollowPurpleAmplification3>((Action<CardInfo>)delegate(CardInfo card) { HollowPurpleUpgradeCard.Register(3, card); }); CustomCard.BuildCard<HollowPurpleAmplification4>((Action<CardInfo>)delegate(CardInfo card) { HollowPurpleUpgradeCard.Register(4, card); }); CustomCard.BuildCard<HollowPurpleAmplification5>((Action<CardInfo>)delegate(CardInfo card) { HollowPurpleUpgradeCard.Register(5, card); }); CustomCard.BuildCard<BlueCard>((Action<CardInfo>)delegate(CardInfo card) { GojoCard.Registered[0] = card; }); CustomCard.BuildCard<RedCard>((Action<CardInfo>)delegate(CardInfo card) { GojoCard.Registered[1] = card; }); CustomCard.BuildCard<InfinityCard>((Action<CardInfo>)delegate(CardInfo card) { GojoCard.Registered[2] = card; }); CustomCard.BuildCard<SixEyesCard>((Action<CardInfo>)delegate(CardInfo card) { GojoCard.Registered[3] = card; }); CustomCard.BuildCard<DismantleCard>((Action<CardInfo>)delegate(CardInfo card) { SukunaCard.Registered[0] = card; }); CustomCard.BuildCard<CleaveCard>((Action<CardInfo>)delegate(CardInfo card) { SukunaCard.Registered[1] = card; }); CustomCard.BuildCard<FireArrowCard>((Action<CardInfo>)delegate(CardInfo card) { SukunaCard.Registered[2] = card; }); CustomCard.BuildCard<ShrineCard>((Action<CardInfo>)delegate(CardInfo card) { SukunaCard.Registered[3] = card; }); CustomCard.BuildCard<AlmightyCard>((Action<CardInfo>)delegate(CardInfo card) { YhwachCard.Registered[0] = card; }); CustomCard.BuildCard<AuswahlenCard>((Action<CardInfo>)delegate(CardInfo card) { YhwachCard.Registered[1] = card; }); CustomCard.BuildCard<SanktAltarCard>((Action<CardInfo>)delegate(CardInfo card) { YhwachCard.Registered[2] = card; }); CustomCard.BuildCard<HeiligPfeilCard>((Action<CardInfo>)delegate(CardInfo card) { YhwachCard.Registered[3] = card; }); CustomCard.BuildCard<SuperSaiyanCard>((Action<CardInfo>)delegate(CardInfo card) { GokuCard.Registered[0] = card; }); CustomCard.BuildCard<KamehamehaCard>((Action<CardInfo>)delegate(CardInfo card) { GokuCard.Registered[1] = card; }); CustomCard.BuildCard<SpiritBombCard>((Action<CardInfo>)delegate(CardInfo card) { GokuCard.Registered[2] = card; }); CustomCard.BuildCard<DragonFistCard>((Action<CardInfo>)delegate(CardInfo card) { GokuCard.Registered[3] = card; }); CustomCard.BuildCard<KyokaSuigetsuCard>((Action<CardInfo>)delegate(CardInfo card) { AizenCard.Registered[0] = card; }); CustomCard.BuildCard<KurohitsugiCard>((Action<CardInfo>)delegate(CardInfo card) { AizenCard.Registered[1] = card; }); CustomCard.BuildCard<HogyokuEvolutionCard>((Action<CardInfo>)delegate(CardInfo card) { AizenCard.Registered[2] = card; }); CustomCard.BuildCard<FragorCard>((Action<CardInfo>)delegate(CardInfo card) { AizenCard.Registered[3] = card; }); CustomCard.BuildCard<CaffeineCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[0] = card; }); CustomCard.BuildCard<TrainCannonCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[1] = card; }); CustomCard.BuildCard<PopcornCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[2] = card; }); CustomCard.BuildCard<PlanetBulletCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[3] = card; }); CustomCard.BuildCard<DiscountLaserCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[4] = card; }); CustomCard.BuildCard<HellBoomerangCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[5] = card; }); CustomCard.BuildCard<PinballCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[6] = card; }); CustomCard.BuildCard<WallGhostCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[7] = card; }); CustomCard.BuildCard<RainbowCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[8] = card; }); CustomCard.BuildCard<LeadSnakeCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[9] = card; }); CustomCard.BuildCard<StickyBulletCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[10] = card; }); CustomCard.BuildCard<AntiBlockCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[11] = card; }); CustomCard.BuildCard<SkeletonCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[12] = card; }); CustomCard.BuildCard<VampireCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[13] = card; }); CustomCard.BuildCard<MutantCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[14] = card; }); CustomCard.BuildCard<ExtraLifeCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[15] = card; }); CustomCard.BuildCard<GlassCannonCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[16] = card; }); CustomCard.BuildCard<FridgeCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[17] = card; }); CustomCard.BuildCard<KangarooCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[18] = card; }); CustomCard.BuildCard<TurboBlockCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[19] = card; }); CustomCard.BuildCard<BlockPartyCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[20] = card; }); CustomCard.BuildCard<DoctorShieldCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[21] = card; }); CustomCard.BuildCard<PocketRageCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[22] = card; }); CustomCard.BuildCard<HotBloodCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[23] = card; }); CustomCard.BuildCard<MagicMagazineCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[24] = card; }); CustomCard.BuildCard<TaxBulletCard>((Action<CardInfo>)delegate(CardInfo card) { WildCard.Registered[25] = card; }); ((BaseUnityPlugin)this).Logger.LogInfo((object)("Hollow Purple 1.11.1 / Unity " + Application.unityVersion)); SmokeTestRunner.TryStart(((Component)this).gameObject); } private IEnumerator BattleStart(IGameModeHandler handler) { Effects.Prewarm((Object.op_Implicit((Object)(object)PlayerManager.instance) ? PlayerManager.instance.players.Count : 2) + 4); Network.OpenBattle(); yield break; } private IEnumerator End(IGameModeHandler handler) { Network.CloseBattle(); Audio.StopAll(); yield break; } private void Update() { if (Object.op_Implicit((Object)(object)Network) && !(GameModeManager.CurrentHandlerID != "Sandbox")) { bool flag = Object.op_Implicit((Object)(object)GameManager.instance) && GameManager.instance.isPlaying && GameManager.instance.battleOngoing && Object.op_Implicit((Object)(object)GM_Test.instance) && ((Component)GM_Test.instance).gameObject.activeInHierarchy; if (flag && !Network.BattleOpen) { Network.OpenBattle(); } else if (!flag && Network.BattleOpen) { Network.CloseBattle(); } } } public void Log(string message) { ((BaseUnityPlugin)this).Logger.LogInfo((object)message); } public void Warn(string message) { ((BaseUnityPlugin)this).Logger.LogWarning((object)message); } private void OnDestroy() { GameModeManager.RemoveHook("BattleStart", (Func<IGameModeHandler, IEnumerator>)BattleStart); GameModeManager.RemoveHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)End); GameModeManager.RemoveHook("GameEnd", (Func<IGameModeHandler, IEnumerator>)End); GameModeManager.RemoveHook("PickStart", (Func<IGameModeHandler, IEnumerator>)End); if (Object.op_Implicit((Object)(object)Network)) { Network.CloseBattle(); } if (harmony != null) { harmony.UnpatchSelf(); } } } } namespace HollowPurple.VFX { public sealed class AizenVfx : MonoBehaviour { private TechniqueGeometry geometry; private SpriteRenderer panel; private SpriteRenderer glow; private EnergyDetail detail; private float started; private float duration; private AizenSpell spell; private Player owner; public static AizenVfx Create(Player owner, AizenSpell spell, Vector2 position, float duration) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_002d: 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_003e: 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_00f0: Unknown result type (might be due to invalid IL or missing references) VisualAssets.Initialize(); GameObject val = new GameObject("Aizen_" + spell.ToString() + "_VFX"); val.transform.position = new Vector3(position.x, position.y, -1f); val.layer = (Object.op_Implicit((Object)(object)owner) ? ((Component)owner).gameObject.layer : 0); AizenVfx aizenVfx = val.AddComponent<AizenVfx>(); aizenVfx.owner = owner; aizenVfx.spell = spell; aizenVfx.duration = duration; aizenVfx.started = Time.realtimeSinceStartup; aizenVfx.geometry = new TechniqueGeometry(val.transform, 140, 224); aizenVfx.detail = new EnergyDetail(val.transform); Texture2D whiteTexture = Texture2D.whiteTexture; aizenVfx.panel = VisualAssets.Sprite(val.transform, "BlackCoffin", Sprite.Create(whiteTexture, new Rect(0f, 0f, (float)((Texture)whiteTexture).width, (float)((Texture)whiteTexture).height), Vector2.one * 0.5f, (float)((Texture)whiteTexture).width), 220); ((Renderer)aizenVfx.panel).sharedMaterial = VisualAssets.AlphaMaterial; ((Renderer)aizenVfx.panel).enabled = false; aizenVfx.glow = VisualAssets.Sprite(val.transform, "Reiatsu", VisualAssets.Glow, 219); return aizenVfx; } private void OnDestroy() { if (Object.op_Implicit((Object)(object)panel) && Object.op_Implicit((Object)(object)panel.sprite)) { Object.Destroy((Object)(object)panel.sprite); } } private void Update() { //IL_0078: 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_0135: 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_01c1: 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_01f7: 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_0220: 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_0282: 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: 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_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: 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_03f7: 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_0408: Unknown result type (might be due to invalid IL or missing references) //IL_06d8: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_0704: Unknown result type (might be due to invalid IL or missing references) //IL_0709: Unknown result type (might be due to invalid IL or missing references) //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Unknown result type (might be due to invalid IL or missing references) //IL_0721: Unknown result type (might be due to invalid IL or missing references) //IL_0728: Unknown result type (might be due to invalid IL or missing references) //IL_072d: Unknown result type (might be due to invalid IL or missing references) //IL_0732: Unknown result type (might be due to invalid IL or missing references) //IL_0739: Unknown result type (might be due to invalid IL or missing references) //IL_073b: Unknown result type (might be due to invalid IL or missing references) //IL_0742: Unknown result type (might be due to invalid IL or missing references) //IL_0747: Unknown result type (might be due to invalid IL or missing references) //IL_074c: Unknown result type (might be due to invalid IL or missing references) //IL_0753: Unknown result type (might be due to invalid IL or missing references) //IL_0755: Unknown result type (might be due to invalid IL or missing references) //IL_075c: Unknown result type (might be due to invalid IL or missing references) //IL_0761: Unknown result type (might be due to invalid IL or missing references) //IL_0766: Unknown result type (might be due to invalid IL or missing references) //IL_076d: Unknown result type (might be due to invalid IL or missing references) //IL_076f: Unknown result type (might be due to invalid IL or missing references) //IL_0776: Unknown result type (might be due to invalid IL or missing references) //IL_077b: Unknown result type (might be due to invalid IL or missing references) //IL_0780: Unknown result type (might be due to invalid IL or missing references) //IL_0787: Unknown result type (might be due to invalid IL or missing references) //IL_0789: Unknown result type (might be due to invalid IL or missing references) //IL_0790: Unknown result type (might be due to invalid IL or missing references) //IL_0795: Unknown result type (might be due to invalid IL or missing references) //IL_079a: Unknown result type (might be due to invalid IL or missing references) //IL_07aa: Unknown result type (might be due to invalid IL or missing references) //IL_07b8: Unknown result type (might be due to invalid IL or missing references) //IL_07bd: Unknown result type (might be due to invalid IL or missing references) //IL_07c4: Unknown result type (might be due to invalid IL or missing references) //IL_07c8: Unknown result type (might be due to invalid IL or missing references) //IL_07d2: Unknown result type (might be due to invalid IL or missing references) //IL_07d7: Unknown result type (might be due to invalid IL or missing references) //IL_07de: Unknown result type (might be due to invalid IL or missing references) //IL_07e3: Unknown result type (might be due to invalid IL or missing references) //IL_07e8: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07fd: Unknown result type (might be due to invalid IL or missing references) //IL_0802: Unknown result type (might be due to invalid IL or missing references) //IL_0809: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_081a: Unknown result type (might be due to invalid IL or missing references) //IL_081c: Unknown result type (might be due to invalid IL or missing references) //IL_0606: Unknown result type (might be due to invalid IL or missing references) //IL_0623: Unknown result type (might be due to invalid IL or missing references) //IL_0628: Unknown result type (might be due to invalid IL or missing references) //IL_063e: Unknown result type (might be due to invalid IL or missing references) //IL_0643: Unknown result type (might be due to invalid IL or missing references) //IL_0659: Unknown result type (might be due to invalid IL or missing references) //IL_065e: Unknown result type (might be due to invalid IL or missing references) //IL_0674: Unknown result type (might be due to invalid IL or missing references) //IL_0679: Unknown result type (might be due to invalid IL or missing references) //IL_068f: Unknown result type (might be due to invalid IL or missing references) //IL_0694: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0416: 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_0343: 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_0427: 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_0430: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_0451: 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_045a: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0464: 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_046d: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Unknown result type (might be due to invalid IL or missing references) //IL_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_048e: 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_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04aa: 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_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04bd: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Unknown result type (might be due to invalid IL or missing references) //IL_0555: Unknown result type (might be due to invalid IL or missing references) //IL_0566: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_0587: Unknown result type (might be due to invalid IL or missing references) //IL_058c: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05d4: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)Plugin.Instance) || !Plugin.Instance.Network.BattleOpen) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } float num = (Time.realtimeSinceStartup - started) / duration; if (num >= 1f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } if (spell == AizenSpell.HogyokuEvolution && Object.op_Implicit((Object)(object)owner)) { ((Component)this).transform.position = ((Component)owner).transform.position; } float num2 = Mathf.Clamp01(num / 0.08f) * Mathf.Clamp01((1f - num) / 0.22f); Color val = default(Color); ((Color)(ref val))..ctor(0.65f, 0.12f, 1f, num2); Color val2 = default(Color); ((Color)(ref val2))..ctor(0.85f, 0.65f, 1f, num2); detail.Draw(Time.realtimeSinceStartup - started, (spell == AizenSpell.HogyokuEvolution) ? 28 : 55, val2, num2 * 0.75f, (spell != AizenSpell.Kurohitsugi) ? ((spell != AizenSpell.HogyokuEvolution) ? 1 : 2) : 0); geometry.Begin(); ((Renderer)panel).enabled = false; VisualAssets.Draw(glow, Vector3.zero, 65f, new Color(0.25f, 0.01f, 0.55f), num2 * 0.2f); if (spell == AizenSpell.Kurohitsugi) { float num3 = Mathf.SmoothStep(0f, 1f, Mathf.Clamp01(num / 0.24f)); float num4 = 68f * num3; float num5 = 95f * num3; ((Renderer)panel).enabled = true; ((Component)panel).transform.localScale = new Vector3(num4, num5, 1f); panel.color = new Color(0.008f, 0.001f, 0.018f, num2 * 0.76f); geometry.Box(Vector3.zero, num4, num5, val, 0.45f); geometry.Box(new Vector3(6f, 7f, 0f), num4, num5, val2, 0.18f); for (int i = 0; i < 18; i++) { float num6 = -43 + i * 5; float num7 = Mathf.Clamp01((num - 0.2f - (float)i * 0.006f) / 0.2f); geometry.Arrow(new Vector3(Mathf.Lerp(-65f, 20f, num7), num6, 0f), Vector3.right, 24f, val2, 0.32f); geometry.Arrow(new Vector3(Mathf.Lerp(65f, -20f, num7), num6 + 2f, 0f), Vector3.left, 24f, val, 0.5f); } for (int j = 0; j < 8; j++) { geometry.Segment(new Vector3((0f - num4) / 2f + (float)j * num4 / 7f, (0f - num5) / 2f, 0f), new Vector3((0f - num4) / 2f + (float)j * num4 / 7f, num5 / 2f, 0f), new Color(0.3f, 0.025f, 0.6f, num2 * 0.6f), 0.12f); } } else if (spell == AizenSpell.KyokaSuigetsu) { Vector3 val3 = default(Vector3); for (int k = 0; k < 26; k++) { float num8 = (float)k * 2.39996f; ((Vector3)(ref val3))..ctor(Mathf.Cos(num8), Mathf.Sin(num8), 0f); Vector3 val4 = val3 * ((float)(10 + k % 6 * 7) + Mathf.Max(0f, num - 0.35f) * 55f); Vector3 val5 = new Vector3(0f - val3.y, val3.x, 0f) * (float)(3 + k % 4); geometry.Path((k % 2 == 0) ? val2 : val, 0.25f, val4 - val3 * 8f, val4 + val5, val4 + val3 * 11f, val4 - val5 * 0.5f, val4 - val3 * 8f); geometry.Segment(val4 - val3 * 8f, val4 + val3 * 11f, new Color(0.3f, 0.85f, 1f, num2 * 0.6f), 0.12f); } } else if (spell == AizenSpell.HogyokuEvolution) { for (int l = -1; l <= 1; l += 2) { for (int m = 0; m < 20; m++) { float num9 = (float)l * (10f + (float)m * 1.5f); float num10 = 18f - (float)m * 1.7f; geometry.Path((m % 3 == 0) ? val2 : val, 0.35f, Vector3.zero, new Vector3(num9 * 0.7f, num10 * 0.6f, 0f), new Vector3(num9 + Mathf.Sin(Time.realtimeSinceStartup * 2f) * 3f, num10, 0f), new Vector3(num9 * 1.35f, num10 - 12f, 0f)); } } geometry.Path(val2, 1f, new Vector3(0f, 5f, 0f), new Vector3(3f, 0f, 0f), new Vector3(0f, -5f, 0f), new Vector3(-3f, 0f, 0f), new Vector3(0f, 5f, 0f)); } else { Vector3 val6 = default(Vector3); Vector3 val7 = default(Vector3); for (int n = 0; n < 12; n++) { float num11 = (float)n * (float)Math.PI / 6f; ((Vector3)(ref val6))..ctor(Mathf.Cos(num11), Mathf.Sin(num11), 0f); ((Vector3)(ref val7))..ctor(0f - val6.y, val6.x, 0f); float num12 = 12f + num * 70f; Vector3 val8 = val6 * num12; geometry.Path(val, 1.2f, val8 - val6 * 9f, val8 + val7 * 5f, val8 + val6 * 9f, val8 - val7 * 5f, val8 - val6 * 9f); geometry.Path(val2, 0.45f, Vector3.zero, val6 * num12 * 0.35f + val7 * 6f, val6 * num12 * 0.65f - val7 * 6f, val8); } } geometry.End(); } } public sealed class ChargeVfx { private readonly Orb blue; private readonly Orb red; private readonly Orb purple; private readonly SpriteRenderer ring; private readonly SpriteRenderer lens; private readonly ProceduralLightning lightning; private readonly EnergyDetail detail; public Vector3 BluePosition { get; private set; } public Vector3 RedPosition { get; private set; } public ChargeVfx(Transform root) { blue = new Orb(root, "Blue"); red = new Orb(root, "Red"); purple = new Orb(root, "Fusion"); ring = VisualAssets.Sprite(root, "FusionOrbit", VisualAssets.Ring, 215); lens = VisualAssets.Sprite(root, "OpticalConcentration", VisualAssets.Noise, 209); lightning = new ProceduralLightning(root, 12); detail = new EnergyDetail(root); } public void Draw(float progress, float time, int seed, int arcs, float scale = 1f) { //IL_002e: 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_009e: 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_016a: 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: 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_021f: 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_025b: 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_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: 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_02e9: 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_0349: 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_0369: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) float num = progress * 1.5f; detail.Draw(time, (3.6f - progress * 1.2f) * scale, (progress < 0.45f) ? VisualAssets.Blue : VisualAssets.Magenta, Mathf.Clamp01(progress * 5f), 0); float num2 = Mathf.SmoothStep(0f, 1f, Mathf.InverseLerp(0.7f, 1.19f, num)); float num3 = Mathf.Lerp(1.35f, 0f, num2) * scale; float num4 = Mathf.Sin(num * 6f) * 0.3f * scale; BluePosition = new Vector3(0f - num3, 0.6f + num4, 0f); RedPosition = new Vector3(num3, 0.6f - num4, 0f); float num5 = Mathf.SmoothStep(0f, 1f, num / 0.3f) * (0.65f + 0.05f * Mathf.Sin(time * 34f)); float num6 = Mathf.SmoothStep(0f, 1f, (num - 0.35f) / 0.3f) * (0.72f + 0.1f * Mathf.Pow(Mathf.Max(0f, Mathf.Sin(time * 22f)), 4f)); float opacity = 1f - Mathf.SmoothStep(0f, 1f, Mathf.InverseLerp(1.06f, 1.25f, num)); blue.Draw(BluePosition, num5 * (1f - num2 * 0.65f) * scale, VisualAssets.Blue, opacity, time, hot: false); red.Draw(RedPosition, num6 * (1f - num2 * 0.65f) * scale, VisualAssets.Red, opacity, 0f - time, hot: false); float num7 = Mathf.SmoothStep(0f, 1f, Mathf.InverseLerp(1.05f, 1.35f, num)); float num8 = 1f + 0.3f * Mathf.Sin(Mathf.Clamp01((num - 1.13f) / 0.22f) * (float)Math.PI); purple.Draw(new Vector3(0f, 0.6f, 0f), (0.4f + num7 * 1.1f) * num8 * scale, VisualAssets.Purple, num7, time); VisualAssets.Draw(ring, new Vector3(0f, 0.6f, 0f), (1.7f + num7 * 2.5f) * scale, VisualAssets.Magenta, num7 * 0.65f, time * 120f); ((Component)ring).transform.localScale = new Vector3(((Component)ring).transform.localScale.x, ((Component)ring).transform.localScale.y * 0.38f, 1f); VisualAssets.Draw(lens, new Vector3(0f, 0.6f, 0f), (4f + Mathf.Sin(time * 18f) * 0.3f) * scale, VisualAssets.Purple, num7 * 0.18f, (0f - time) * 55f); lightning.Draw((Vector3)((num7 > 0.5f) ? new Vector3(0f, 0.6f, 0f) : BluePosition), (0.8f + num7) * scale, (num7 > 0.5f) ? VisualAssets.Magenta : VisualAssets.Blue, 0.7f, time, seed, arcs); } public void Hide() { blue.Hide(); red.Hide(); purple.Hide(); SpriteRenderer obj = ring; bool enabled = (((Renderer)lens).enabled = false); ((Renderer)obj).enabled = enabled; lightning.Hide(); detail.Hide(); } } internal sealed class EnergyDetail { private readonly SpriteRenderer[] sparks = (SpriteRenderer[])(object)new SpriteRenderer[24]; private readonly SpriteRenderer wave; private readonly SpriteRenderer echo; public EnergyDetail(Transform root) { VisualAssets.Initialize(); for (int i = 0; i < sparks.Length; i++) { sparks[i] = VisualAssets.Sprite(root, "EnergyFilament_" + i, VisualAssets.Spark, 228); } wave = VisualAssets.Sprite(root, "PressureFront", VisualAssets.Ring, 218); echo = VisualAssets.Sprite(root, "PressureEcho", VisualAssets.Noise, 217); Hide(); } public void Draw(float time, float radius, Color tint, float opacity, int motion) { //IL_01e7: 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_0223: 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_00e6: 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_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_0144: 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_0156: 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) int num = 6 + (int)Plugin.Instance.Settings.Quality.Value * 6; radius = Mathf.Max(0.3f, radius); for (int i = 0; i < sparks.Length; i++) { SpriteRenderer val = sparks[i]; if (i >= num || opacity <= 0.001f) { ((Renderer)val).enabled = false; continue; } float num2 = Mathf.Repeat(time * ((motion == 2) ? 0.55f : 0.8f) + (float)i * 0.618034f, 1f); float num3 = (float)i * 2.39996f + motion switch { 3 => time * 0.65f, 0 => num2 * 1.8f, _ => 0f, }; float num4 = motion switch { 3 => 0.72f + 0.18f * Mathf.Sin(time + (float)i), 0 => 1f - num2, _ => num2, }; Vector3 position = new Vector3(Mathf.Cos(num3), Mathf.Sin(num3), 0f) * radius * num4; if (motion == 2) { ((Vector3)(ref position))..ctor(Mathf.Sin((float)i * 7.13f) * radius * 0.7f, (num2 * 1.5f - 0.4f) * radius, 0f); } float opacity2 = Mathf.Sin(num2 * (float)Math.PI) * opacity; VisualAssets.Draw(val, position, 1f, Color.Lerp(tint, Color.white, 0.35f), opacity2, (motion == 2) ? 90f : (num3 * 57.29578f + (float)((motion == 0) ? 45 : 0))); ((Component)val).transform.localScale = new Vector3(radius * (0.07f + num2 * 0.12f), radius * 0.075f, 1f); } float num5 = Mathf.Repeat(time * 0.65f, 1f); float num6 = ((motion == 0) ? (1f - num5) : num5); VisualAssets.Draw(wave, Vector3.zero, radius * (1.1f + num6 * 1.5f), tint, opacity * 0.22f * Mathf.Sin(num5 * (float)Math.PI), time * 18f); VisualAssets.Draw(echo, Vector3.zero, radius * 1.8f, tint, opacity * 0.1f, (0f - time) * 32f); } public void Hide() { for (int i = 0; i < sparks.Length; i++) { ((Renderer)sparks[i]).enabled = false; } SpriteRenderer obj = wave; bool enabled = (((Renderer)echo).enabled = false); ((Renderer)obj).enabled = enabled; } } public sealed class GojoVfx : MonoBehaviour { private Orb orb; private EnergyDetail detail; private SpriteRenderer ring; private SpriteRenderer inner; private GojoSpell spell; private float burstAt = -1f; private bool isInfinity; private SpriteRenderer barrier; private SpriteRenderer fill; private static Sprite hexRingSprite; private static Sprite hexFillSprite; public void Burst(Vector2 position) { //IL_0011: 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_0022: Unknown result type (might be due to invalid IL or missing references) burstAt = Time.realtimeSinceStartup; ((Component)this).transform.position = new Vector3(position.x, position.y, -1f); if (orb != null) { orb.Hide(); } } private void Update() { //IL_0055: 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_0086: 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_00cb: Unknown result type (might be due to invalid IL or missing references) if (!isInfinity && !(burstAt < 0f)) { float num = (Time.realtimeSinceStartup - burstAt) / 0.4f; if (num >= 1f || !Plugin.Instance.Network.BattleOpen) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } VisualAssets.Draw(ring, Vector3.zero, Mathf.Lerp(1f, 10f, num), VisualAssets.Red, 1f - num); VisualAssets.Draw(inner, Vector3.zero, Mathf.Lerp(1f, 7f, num), VisualAssets.Red, (1f - num) * 0.65f); detail.Draw(num, 3f + num * 8f, VisualAssets.Red, 1f - num, 1); } } public static GojoVfx Create(Player owner, GojoSpell spell, Vector2 position) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_007f: 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) VisualAssets.Initialize(); GameObject val = new GameObject("Gojo_" + spell); GojoVfx gojoVfx = val.AddComponent<GojoVfx>(); gojoVfx.detail = new EnergyDetail(val.transform); gojoVfx.spell = spell; gojoVfx.isInfinity = spell == GojoSpell.Infinity; if (gojoVfx.isInfinity) { gojoVfx.CreateInfinityAura(); Plugin.Instance.Audio.Play("InfinityBloom", -41000 - (Object.op_Implicit((Object)(object)owner) ? owner.playerID : 0), position, 0, loop: false, 0.5f); } else { gojoVfx.orb = new Orb(val.transform, spell.ToString()); gojoVfx.ring = VisualAssets.Sprite(val.transform, "Field", VisualAssets.Ring, 211); gojoVfx.inner = VisualAssets.Sprite(val.transform, "Flow", VisualAssets.Noise, 212); } int layer = (Object.op_Implicit((Object)(object)owner) ? ((Component)owner).gameObject.layer : 0); Transform[] componentsInChildren = val.GetComponentsInChildren<Transform>(); for (int i = 0; i < componentsInChildren.Length; i++) { ((Component)componentsInChildren[i]).gameObject.layer = layer; } if (!gojoVfx.isInfinity) { gojoVfx.Draw(position, 0f, (spell == GojoSpell.Blue) ? 22f : 1f); } return gojoVfx; } private void CreateInfinityAura() { if ((Object)(object)hexRingSprite == (Object)null) { hexRingSprite = CreateHexRingTexture(128); } if ((Object)(object)hexFillSprite == (Object)null) { hexFillSprite = CreateHexFillTexture(128); } Transform transform = ((Component)this).transform; barrier = CreateSprite(transform, "Barrier", hexRingSprite, -10); fill = CreateSprite(transform, "Fill", hexFillSprite, -11); } private static SpriteRenderer CreateSprite(Transform parent, string name, Sprite sprite, int order) { //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) GameObject val = new GameObject(name); val.transform.SetParent(parent, false); SpriteRenderer obj = val.AddComponent<SpriteRenderer>(); obj.sprite = sprite; ((Renderer)obj).sharedMaterial = VisualAssets.AlphaMaterial; ((Renderer)obj).sortingOrder = order; return obj; } public void Draw(Vector2 position, float age, float radius) { //IL_0006: 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_0017: 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_0030: 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_004f: 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_01c6: 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_00a4: 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_010b: 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_016d: 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) ((Component)this).transform.position = new Vector3(position.x, position.y, -1f); float realtimeSinceStartup = Time.realtimeSinceStartup; Color val = ((spell == GojoSpell.Red) ? VisualAssets.Red : VisualAssets.Blue); detail.Draw(realtimeSinceStartup, Mathf.Max(radius, 2f), val, isInfinity ? 0.5f : 0.85f, isInfinity ? 3 : ((spell != GojoSpell.Blue) ? 1 : 0)); if (!isInfinity) { if (spell == GojoSpell.Infinity) { orb.Hide(); } else { orb.Draw(Vector3.zero, (spell == GojoSpell.Blue) ? Mathf.Clamp(radius * 0.18f, 1.2f, 5f) : Mathf.Max(1.2f, radius * 0.4f), val, 1f, realtimeSinceStartup, spell == GojoSpell.Red); } float num = radius * 2f / 0.77f; VisualAssets.Draw(ring, Vector3.zero, num, val, (spell == GojoSpell.Blue) ? 0.25f : 0.65f, realtimeSinceStartup * 35f); float num2 = ((spell == GojoSpell.Blue) ? (1f - Mathf.Repeat(age * 1.6f, 1f)) : (0.8f + 0.1f * Mathf.Sin(realtimeSinceStartup * 4f))); VisualAssets.Draw(inner, Vector3.zero, num * num2, val, 0.3f, (0f - realtimeSinceStartup) * 70f); } else { float num3 = radius * 2f / 0.77f; float num4 = 1f + 0.04f * Mathf.Sin(realtimeSinceStartup * 3f); VisualAssets.Draw(fill, Vector3.zero, num3 * 1.05f * num4, val, 0.12f); VisualAssets.Draw(barrier, Vector3.zero, num3 * num4, val, 0.5f + 0.1f * Mathf.Sin(realtimeSinceStartup * 2f), realtimeSinceStartup * 12f); } } private static Sprite CreateHexRingTexture(int size) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0009: 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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_01b4: 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_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) Texture2D val = new Texture2D(size, size, (TextureFormat)4, false) { name = "Gojo_HexRing", wrapMode = (TextureWrapMode)1, filterMode = (FilterMode)1 }; Color[] array = (Color[])(object)new Color[size * size]; for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { float num = ((float)j + 0.5f) / (float)size * 2f - 1f; float num2 = ((float)i + 0.5f) / (float)size * 2f - 1f; float num3 = Mathf.Sqrt(num * num + num2 * num2); float num4 = Mathf.Abs(Mathf.Sin(num * 14f)); float num5 = Mathf.Abs(Mathf.Sin((num * 0.5f + num2 * 0.866f) * 14f)); float num6 = Mathf.Abs(Mathf.Sin((num * 0.5f - num2 * 0.866f) * 14f)); float num7 = Mathf.Min(num4, Mathf.Min(num5, num6)); float num8 = Mathf.Exp((0f - num7) * num7 * 200f); float num9 = Mathf.Abs(num3 - 0.82f); float num10 = Mathf.Exp((0f - num9) * num9 * 180f); float num11 = Mathf.Clamp01((1f - num3) * 2.5f) * Mathf.Clamp01((num3 - 0.15f) * 4f); float num12 = Mathf.Max(num8 * num10, num10 * 0.7f) * num11; array[i * size + j] = new Color(1f, 1f, 1f, num12 * 0.9f); } } val.SetPixels(array); val.Apply(false, true); Object.DontDestroyOnLoad((Object)(object)val); Sprite obj = Sprite.Create(val, new Rect(0f, 0f, (float)size, (float)size), new Vector2(0.5f, 0.5f), (float)size); ((Object)obj).name = "Gojo_HexRing"; Object.DontDestroyOnLoad((Object)(object)obj); return obj; } private static Sprite CreateHexFillTexture(int size) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0009: 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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_00e1: 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_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) Texture2D val = new Texture2D(size, size, (TextureFormat)4, false) { name = "Gojo_HexFill", wrapMode = (TextureWrapMode)1, filterMode = (FilterMode)1 }; Color[] array = (Color[])(object)new Color[size * size]; for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { float num = ((float)j + 0.5f) / (float)size * 2f - 1f; float num2 = ((float)i + 0.5f) / (float)size * 2f - 1f; float num3 = Mathf.Sqrt(num * num + num2 * num2); float num4 = Mathf.Exp((0f - num3) * num3 * 2.5f); array[i * size + j] = new Color(1f, 1f, 1f, num4); } } val.SetPixels(array); val.Apply(false, true); Object.DontDestroyOnLoad((Object)(object)val); Sprite obj = Sprite.Create(val, new Rect(0f, 0f, (float)size, (float)size), new Vector2(0.5f, 0.5f), (float)size); ((Object)obj).name = "Gojo_HexFill"; Object.DontDestroyOnLoad((Object)(object)obj); return obj; } } public sealed class GokuVfx : MonoBehaviour { private SpriteRenderer sky; private SpriteRenderer core; private SpriteRenderer rings; private SpriteRenderer beam; private SpriteRenderer beamCore; private SpriteRenderer shockwave; private SpriteRenderer blast; private SpriteRenderer[] sparks; private float started; private float duration; private GokuSpell spell; private Player owner; private TechniqueGeometry geometry; private EnergyDetail detail; private Vector3 direction; public static GokuVfx Create(Player owner, GokuSpell spell, Vector2 position, Vector2 aim, float duration) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_002d: 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_003e: 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_009b: 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_023a: 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_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_0257: 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) VisualAssets.Initialize(); GameObject val = new GameObject("Goku_" + spell.ToString() + "_VFX"); val.transform.position = new Vector3(position.x, position.y, -1f); GokuVfx gokuVfx = val.AddComponent<GokuVfx>(); gokuVfx.owner = owner; gokuVfx.spell = spell; gokuVfx.started = Time.realtimeSinceStartup; gokuVfx.duration = duration; val.layer = (Object.op_Implicit((Object)(object)owner) ? ((Component)owner).gameObject.layer : 0); gokuVfx.direction = ((((Vector2)(ref aim)).sqrMagnitude > 0.001f) ? Vector2.op_Implicit(((Vector2)(ref aim)).normalized) : Vector3.right); gokuVfx.geometry = new TechniqueGeometry(val.transform, 100, 227); gokuVfx.detail = new EnergyDetail(val.transform); gokuVfx.sky = VisualAssets.Sprite(val.transform, "SaiyanSky", VisualAssets.Glow, 218); ((Renderer)gokuVfx.sky).sharedMaterial = VisualAssets.AlphaMaterial; gokuVfx.core = VisualAssets.Sprite(val.transform, "SaiyanCore", VisualAssets.Glow, 223); gokuVfx.rings = VisualAssets.Sprite(val.transform, "SaiyanRings", VisualAssets.Ring, 221); gokuVfx.beam = VisualAssets.Sprite(val.transform, "KamehamehaBeam", VisualAssets.Glow, 222); gokuVfx.beamCore = VisualAssets.Sprite(val.transform, "KamehamehaCore", VisualAssets.Core, 224); gokuVfx.shockwave = VisualAssets.Sprite(val.transform, "AtomicShockwave", VisualAssets.Ring, 225); gokuVfx.blast = VisualAssets.Sprite(val.transform, "AtomicFireball", VisualAssets.Noise, 226); gokuVfx.sparks = (SpriteRenderer[])(object)new SpriteRenderer[32]; for (int i = 0; i < gokuVfx.sparks.Length; i++) { gokuVfx.sparks[i] = VisualAssets.Sprite(val.transform, "SaiyanSpark_" + i, VisualAssets.Core, 220); } Transform transform = ((Component)gokuVfx.beam).transform; Quaternion localRotation = (((Component)gokuVfx.beamCore).transform.localRotation = Quaternion.Euler(0f, 0f, Mathf.Atan2(aim.y, aim.x) * 57.29578f)); transform.localRotation = localRotation; int layer = (Object.op_Implicit((Object)(object)owner) ? ((Component)owner).gameObject.layer : 0); Transform[] componentsInChildren = val.GetComponentsInChildren<Transform>(); for (int j = 0; j < componentsInChildren.Length; j++) { ((Component)componentsInChildren[j]).gameObject.layer = layer; } return gokuVfx; } private void Update() { //IL_0077: 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_00df: 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_0125: 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_018a: 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_01a2: 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_01ca: 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_0204: 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_02b6: 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_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: 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_0323: 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_0341: 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_035e: 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_0389: Unknown result type (might be due to invalid IL or missing references) //IL_038e: 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_05ff: Unknown result type (might be due to invalid IL or missing references) //IL_0624: Unknown result type (might be due to invalid IL or missing references) //IL_0643: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: 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_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_0419: 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_041f: 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_042e: Unknown result type (might be due to invalid IL or missing references) //IL_0434: 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_0443: Unknown result type (might be due to invalid IL or missing references) //IL_0448: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_0491: 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_0497: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: 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_04ac: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_0701: Unknown result type (might be due to invalid IL or missing references) //IL_0722: Unknown result type (might be due to invalid IL or missing references) //IL_0727: Unknown result type (might be due to invalid IL or missing references) //IL_0743: Unknown result type (might be due to invalid IL or missing references) //IL_0748: Unknown result type (might be due to invalid IL or missing references) //IL_0758: Unknown result type (might be due to invalid IL or missing references) //IL_075d: Unknown result type (might be due to invalid IL or missing references) //IL_07b8: Unknown result type (might be due to invalid IL or missing references) //IL_07bd: Unknown result type (might be due to invalid IL or missing references) //IL_07bf: Unknown result type (might be due to invalid IL or missing references) //IL_0506: Unknown result type (might be due to invalid IL or missing references) //IL_0519: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Unknown result type (might be due to invalid IL or missing references) //IL_0529: 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_0533: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_0568: Unknown result type (might be due to invalid IL or missing references) //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_0572: 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_0587: Unknown result type (might be due to invalid IL or missing references) //IL_058c: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_059a: Unknown result type (might be due to invalid IL or missing references) //IL_08f2: Unknown result type (might be due to invalid IL or missing references) //IL_0910: Unknown result type (might be due to invalid IL or missing references) //IL_0915: Unknown result type (might be due to invalid IL or missing references) //IL_0931: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_094c: Unknown result type (might be due to invalid IL or missing references) //IL_0951: Unknown result type (might be due to invalid IL or missing references) //IL_096a: Unknown result type (might be due to invalid IL or missing references) //IL_096f: Unknown result type (might be due to invalid IL or missing references) //IL_0810: Unknown result type (might be due to invalid IL or missing references) //IL_081f: Unknown result type (might be due to invalid IL or missing references) //IL_0824: Unknown result type (might be due to invalid IL or missing references) //IL_0833: Unknown result type (might be due to invalid IL or missing references) //IL_0838: Unknown result type (might be due to invalid IL or missing references) //IL_0a50: Unknown result type (might be due to invalid IL or missing references) //IL_0a18: Unknown result type (might be due to invalid IL or missing references) //IL_0b6a: Unknown result type (might be due to invalid IL or missing references) //IL_0b82: Unknown result type (might be due to invalid IL or missing references) //IL_0b98: Unknown result type (might be due to invalid IL or missing references) //IL_0bab: Unknown result type (might be due to invalid IL or missing references) //IL_0bb1: Unknown result type (might be due to invalid IL or missing references) //IL_0bb7: Unknown result type (might be due to invalid IL or missing references) //IL_0be0: Unknown result type (might be due to invalid IL or missing references) //IL_0a68: Unknown result type (might be due to invalid IL or missing references) //IL_0a88: Unknown result type (might be due to invalid IL or missing references) //IL_0ab8: Unknown result type (might be due to invalid IL or missing references) //IL_0aee: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)Plugin.Instance) || !Plugin.Instance.Network.BattleOpen) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } float num = (Time.realtimeSinceStartup - started) / duration; if (num >= 1f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } if (spell == GokuSpell.SuperSaiyan && Object.op_Implicit((Object)(object)owner)) { ((Component)this).transform.position = ((Component)owner).transform.position; } float realtimeSinceStartup = Time.realtimeSinceStartup; float num2 = ((num < 0.08f) ? (num / 0.08f) : (1f - Mathf.InverseLerp(0.68f, 1f, num))); geometry.Begin(); Color val = ((spell == GokuSpell.SuperSaiyan || spell == GokuSpell.DragonFist) ? new Color(1f, 0.54f, 0.025f) : new Color(0.03f, 0.72f, 1f)); detail.Draw(realtimeSinceStartup - started, (spell == GokuSpell.Kamehameha) ? 12 : ((spell == GokuSpell.SuperSaiyan) ? 20 : 70), val, num2 * 0.85f, (spell == GokuSpell.SuperSaiyan) ? 2 : ((spell != GokuSpell.SpiritBomb) ? 1 : 0)); float num3 = ((spell == GokuSpell.SpiritBomb) ? 110 : ((spell == GokuSpell.Kamehameha) ? 36 : ((spell == GokuSpell.SuperSaiyan) ? 42 : 180))); VisualAssets.Draw(sky, Vector3.zero, num3 * 1.65f, new Color(val.r * 0.32f, val.g * 0.16f, val.b * 0.08f), num2 * 0.86f); VisualAssets.Draw(rings, Vector3.zero, num3 * (0.65f + 0.08f * Mathf.Sin(realtimeSinceStartup * 12f)), val, num2 * 0.82f, realtimeSinceStartup * 140f); VisualAssets.Draw(core, Vector3.zero, (spell == GokuSpell.SpiritBomb) ? (num3 * 0.62f) : ((spell == GokuSpell.DragonFist) ? (num3 * (0.13f + num * 0.48f)) : (num3 * 0.28f)), VisualAssets.White, num2); if (spell == GokuSpell.Kamehameha) { float num4 = Mathf.Clamp01((1f - num) / 0.24f); float num5 = 220f; float num6 = 6f; SpriteRenderer obj = beam; bool enabled = (((Renderer)beamCore).enabled = false); ((Renderer)obj).enabled = enabled; SpriteRenderer obj2 = sky; enabled = (((Renderer)rings).enabled = false); ((Renderer)obj2).enabled = enabled; Vector3 b = direction * num5; Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(0f - direction.y, direction.x, 0f); geometry.Segment(Vector3.zero, b, new Color(0.015f, 0.18f, 1f, num4 * 0.2f), num6 * 3.5f); geometry.Segment(Vector3.zero, b, new Color(0.02f, 0.55f, 1f, num4 * 0.6f), num6 * 2f); geometry.Segment(Vector3.zero, b, new Color(0.65f, 0.95f, 1f, num4), num6 * 0.7f); geometry.Segment(Vector3.zero, b, new Color(1f, 1f, 1f, num4), num6 * 0.22f); for (int i = 0; i < 14; i++) { float num7 = Mathf.Repeat(num * 4f + (float)i / 14f, 1f) * num5; Vector3 val3 = direction * num7; geometry.Path(new Color(0.1f, 0.7f, 1f, num4 * 0.8f), 0.22f, val3 - val2 * num6 * 1.2f - direction * 3f, val3 - val2 * num6 * 1.5f, val3 + val2 * num6 * 1.5f, val3 + val2 * num6 * 1.2f - direction * 3f); } for (int j = 0; j < 8; j++) { float num8 = (float)j * num5 / 8f; geometry.Path(new Color(0.6f, 0.85f, 1f, num4), 0.13f, direction * num8 + val2 * num6, direction * (num8 + 8f) + val2 * (num6 + Mathf.Sin(realtimeSinceStartup * 23f + (float)j) * 3f), direction * (num8 + 15f) + val2 * num6); } SpriteRenderer obj3 = shockwave; enabled = (((Renderer)blast).enabled = false); ((Renderer)obj3).enabled = enabled; } else if (spell == GokuSpell.DragonFist) { ((Renderer)core).enabled = false; float num9 = Mathf.Clamp01(num / 0.72f); VisualAssets.Draw(shockwave, Vector3.zero, num3 * (0.12f + num9 * 1.25f), new Color(1f, 0.18f, 0.015f), num2 * 0.92f, (0f - realtimeSinceStartup) * 95f); VisualAssets.Draw(blast, Vector3.zero, num3 * (0.11f + num9 * 0.72f), new Color(1f, 0.55f, 0.035f), num2 * 0.72f, realtimeSinceStartup * 55f); SpriteRenderer obj4 = beam; bool enabled = (((Renderer)beamCore).enabled = false); ((Renderer)obj4).enabled = enabled; Color c = default(Color); ((Color)(ref c))..ctor(1f, 0.55f, 0.05f, num2); Color c2 = default(Color); ((Color)(ref c2))..ctor(1f, 0.95f, 0.7f, num2); float num10 = Mathf.SmoothStep(0f, 1f, num) * 70f; Vector3 b2 = default(Vector3); for (int k = 0; k < 16; k++) { float num11 = ((float)k - 7.5f) * 1.3f; geometry.Path(c, 1.8f, new Vector3(num11 * 2f, 0f, 0f), new Vector3(num11 * 0.45f, num10 * 0.5f, 0f), new Vector3(num11, num10, 0f)); float num12 = (float)k * (float)Math.PI / 15f; ((Vector3)(ref b2))..ctor(Mathf.Cos(num12) * (25f + num * 50f), num10 + Mathf.Sin(num12) * 22f, 0f); geometry.Segment(new Vector3(num11, num10, 0f), b2, c, 3f); } Vector3 val4 = default(Vector3); for (int l = 0; l < 24; l++) { float num13 = (float)l * (float)Math.PI / 12f; ((Vector3)(ref val4))..ctor(Mathf.Cos(num13), Mathf.Sin(num13), 0f); geometry.Segment(val4 * (8f + num * 35f), val4 * (25f + num * 125f), c2, 0.3f); } } else { SpriteRenderer obj5 = beam; SpriteRenderer obj6 = beamCore; SpriteRenderer obj7 = shockwave; bool flag5 = (((Renderer)blast).enabled = false); bool flag7 = (((Renderer)obj7).enabled = flag5); bool enabled = (((Renderer)obj6).enabled = flag7); ((Renderer)obj5).enabled = enabled; } if (spell == GokuSpell.SuperSaiyan) { ((Renderer)rings).enabled = false; for (int m = 0; m < 24; m++) { float num14 = ((float)m - 11.5f) * 0.7f; float num15 = 7f + Mathf.Sin(realtimeSinceStartup * 11f + (float)m) * 3f; geometry.Path(new Color(1f, 0.75f, 0.06f, num2), 0.25f, new Vector3(num14, -6f, 0f), new Vector3(num14 * 1.4f, num15 * 0.4f, 0f), new Vector3(num14 * 0.65f, num15, 0f), new Vector3(num14 * 0.3f, 15f, 0f)); } } geometry.End(); for (int n = 0; n < sparks.Length; n++) { if (spell == GokuSpell.DragonFist) { float num16 = Mathf.SmoothStep(0f, 1f, num); sparks[n].sprite = VisualAssets.Noise; float num17 = (float)(n % 16) / 15f * (float)Math.PI; ((Component)sparks[n]).transform.localPosition = ((n < 16) ? new Vector3(Mathf.Cos(num17) * (25f + num16 * 50f), num16 * 70f + Mathf.Sin(num17) * 20f, 0f) : new Vector3(Mathf.Sin((float)(n * 5)) * 5f, (float)(n - 16) * num16 * 4.5f, 0f)); ((Component)sparks[n]).transform.localScale = Vector3.one * ((n < 16) ? (18f + num16 * 18f) : 12f); ((Component)sparks[n]).transform.localRotation = Quaternion.Euler(0f, 0f, (float)(n * 47) + realtimeSinceStartup * 25f); sparks[n].color = new Color(1f, (n < 16) ? 0.25f : 0.6f, 0.01f, num2 * 0.65f); } else { float num18 = (float)n * (float)Math.PI * 2f / (float)sparks.Length + realtimeSinceStartup * ((n % 2 == 0) ? 1.6f : (-1.2f)); float num19 = num3 * (0.12f + (float)(n % 5) * 0.065f); ((Component)sparks[n]).transform.localPosition = new Vector3(Mathf.Cos(num18) * num19, Mathf.Sin(num18) * num19, 0f); ((Component)sparks[n]).transform.localScale = Vector3.one * (0.11f + (float)(n % 4) * 0.055f); sparks[n].color = new Color(val.r, val.g, val.b, num2 * (0.35f + 0.65f * Mathf.Abs(Mathf.Sin(realtimeSinceStartup * 11f + (float)n)))); } } } } public sealed class EffectPool : MonoBehaviour { private readonly List<HollowPurpleVfxController> effects = new List<HollowPurpleVfxController>(16); private int serial; public int SlotCount => effects.Count; public int LiveParticles { get { int num = 0; for (int i = 0; i < effects.Count; i++) { num += effects[i].ParticleCount; } return num; } } public void Initialize() { VisualAssets.Initialize(); Prewarm(8); } public void Prewarm(int count) { //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_0036: Unknown result type (might be due to invalid IL or missing references) while (effects.Count < count) { GameObject val = new GameObject("HP_PooledAttack_" + effects.Count); val.transform.SetParent(((Component)this).transform, false); HollowPurpleVfxController hollowPurpleVfxController = val.AddComponent<HollowPurpleVfxController>(); hollowPurpleVfxController.Initialize(this); effects.Add(hollowPurpleVfxController); val.SetActive(false); } } public HollowPurpleVfxController Acquire(int player) { HollowPurpleVfxController hollowPurpleVfxController = null; for (int i = 0; i < effects.Count; i++) { if (!((Component)effects[i]).gameObject.activeSelf) { hollowPurpleVfxController = effects[i]; break; } } if (!Object.op_Implicit((Object)(object)hollowPurpleVfxController)) { for (int j = 0; j < effects.Count; j++) { if (effects[j].Tail) { hollowPurpleVfxController = effects[j]; hollowPurpleVfxController.Stop(); break; } } } if (!Object.op_Implicit((Object)(object)hollowPurpleVfxController)) { Prewarm(effects.Count + 1); hollowPurpleVfxController = effects[effects.Count - 1]; } hollowPurpleVfxController.Token = ++serial; ((Component)hollowPurpleVfxController).gameObject.SetActive(true); return hollowPurpleVfxController; } public bool CanEmit() { int num = 0; for (int i = 0; i < effects.Count; i++) { if (((Component)effects[i]).gameObject.activeSelf) { num += effects[i].ParticleCount; } } return num < Plugin.Instance.Settings.ParticleBudget * 4; } public void Clear() { for (int i = 0; i < effects.Count; i++) { effects[i].Stop(); } } } public sealed class HollowPurpleVfxController : MonoBehaviour { private EffectPool pool; private ChargeVfx charge; private ProjectileVfx projectile; private ImpactVfx impact; private ImpactVfx release; private Transform releaseRoot; private ParticleSystem particles; private Vector2 aim; private Vector2 releasePosition; private double started; private double launched; private double ended; private float chargeSeconds; private float emitRemainder; private float visualScale = 1f; private int upgradeLevel; private int mode; private int seed; private int audioStage; private uint random; private Renderer[] renderers; public int Token { get; internal set; } public bool Tail => mode >= 3; public int ParticleCount { get { if (!Object.op_Implicit((Object)(object)particles)) { return 0; } return particles.particleCount; } } private int Arcs => Mathf.Min(12, 2 + (int)Plugin.Instance.Settings.Quality.Value * 4 + upgradeLevel * 2); public void Initialize(EffectPool owner) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //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_00d5: 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_0103: 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_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_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_014d: 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_0175: 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_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_01a1: 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_01b5: Expected O, but got Unknown //IL_01b0: 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_01c5: 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_01d6: Expected O, but got Unknown //IL_01e0: 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_01ef: 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_0200: 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_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_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_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_025b: Unknown result type (might be due to invalid IL or missing references) pool = owner; charge = new ChargeVfx(((Component)this).transform); projectile = new ProjectileVfx(((Component)this).transform); impact = new ImpactVfx(((Component)this).transform); GameObject val = new GameObject("ReleaseAtShooter"); val.transform.SetParent(((Component)this).transform, false); releaseRoot = val.transform; release = new ImpactVfx(releaseRoot); GameObject val2 = new GameObject("EnergyFragments"); val2.transform.SetParent(((Component)this).transform, false); particles = val2.AddComponent<ParticleSystem>(); particles.Stop(true, (ParticleSystemStopBehavior)0); MainModule main = particles.main; ((MainModule)(ref main)).loop = true; ((MainModule)(ref main)).playOnAwake = false; ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1; ((MainModule)(ref main)).startSpeed = MinMaxCurve.op_Implicit(0f); ((MainModule)(ref main)).startSize = MinMaxCurve.op_Implicit(0.14f); ((MainModule)(ref main)).maxParticles = 1100; ((MainModule)(ref main)).startLifetime = MinMaxCurve.op_Implicit(0.5f); ((MainModule)(ref main)).gravityModifier = MinMaxCurve.op_Implicit(0f); EmissionModule emission = particles.emission; ((EmissionModule)(ref emission)).enabled = false; ShapeModule shape = particles.shape; ((ShapeModule)(ref shape)).enabled = false; SizeOverLifetimeModule sizeOverLifetime = particles.sizeOverLifetime; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).enabled = true; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).size = new MinMaxCurve(1f, new AnimationCurve((Keyframe[])(object)new Keyframe[3] { new Keyframe(0f, 0.2f), new Keyframe(0.15f, 1f), new Keyframe(1f, 0f) })); ColorOverLifetimeModule colorOverLifetime = particles.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val3 = new Gradient(); val3.SetKeys((GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey(Color.white, 0f), new GradientColorKey(Color.white, 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(0f, 0f), new GradientAlphaKey(1f, 0.08f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val3); ParticleSystemRenderer component = ((Component)particles).GetComponent<ParticleSystemRenderer>(); ((Renderer)component).sharedMaterial = VisualAssets.ParticleMaterial; component.renderMode = (ParticleSystemRenderMode)0; ((Renderer)component).sortingOrder = 218; renderers = ((Component)this).GetComponentsInChildren<Renderer>(true); Hide(); } public void MatchPlayerLayer(Player player) { int sortingLayerID = 0; int num = int.MinValue; Renderer[] componentsInChildren = ((Component)player).GetComponentsInChildren<Renderer>(); for (int i = 0; i < componentsInChildren.Length; i++) { int layerValueFromID = SortingLayer.GetLayerValueFromID(componentsInChildren[i].sortingLayerID); if (layerValueFromID > num) { num = layerValueFromID; sortingLayerID = componentsInChildren[i].sortingLayerID; } } for (int j = 0; j < renderers.Length; j++) { renderers[j].sortingLayerID = sortingLayerID; } } public void BeginCharge(Vector2 position, double time, float duration, int randomSeed, float scale = 1f, int level = 0) { //IL_0074: Unknown result type (might be due to invalid IL or missing references) Hide(); mode = 1; seed = randomSeed; random = (uint)(seed * 719 + 12345); started = time; chargeSeconds = duration; visualScale = Mathf.Clamp(scale, 1f, 4.5f); upgradeLevel = Mathf.Clamp(level, 0, 5); audioStage = 0; emitRemainder = 0f; SetPosition(position); particles.Clear(); particles.Play(); } public void Follow(Vector2 position, Vector2 direction) { //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_0009: Unknown result type (might be due to invalid IL or missing references) SetPosition(position); aim = direction; } public void FollowProjectile(Vector2 position, Vector2 direction) { //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_0009: Unknown result type (might be due to invalid IL or missing references) SetPosition(position); aim = direction; } private void SetPosition(Vector2 p) { //IL_0006: 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_0017: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.position = new Vector3(p.x, p.y, -1f); } public void Launch(Vector2 position, Vector2 direction, double time) { //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_0021: 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_006e: 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_0143: 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_015b: 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_012c: Unknown result type (might be due to invalid IL or missing references) charge.Hide(); mode = 2; launched = time; aim = direction; SetPosition(position); releasePosition = position; projectile.Start(visualScale); Plugin.Instance.Audio.StopTag(Token, 0.035f); Plugin.Instance.Audio.Play("Release", Token, position, 2, loop: false, 1f, (float)Math.Max(0.0, HollowPurpleNetwork.Now - time)); Plugin.Instance.Audio.Play("ProjectileLoop", Token, position, 1, loop: true, (upgradeLevel >= 5) ? 1.75f : 1f, 0f, (upgradeLevel >= 5) ? 0.45f : 1f); if (upgradeLevel >= 5) { Plugin.Instance.Audio.Play("Cataclysm", Token, position, 2, loop: false, 1.55f, 0f, 0.72f); Plugin.Instance.Audio.Play("Cataclysm", Token, position, 2, loop: false, 1.25f, 0f, 0.32f); } HollowPurpleCameraFeedback.Release(position, direction); Burst(35 + Arcs * 6, 8f, VisualAssets.Purple); } public void Impact(Vector2 position, double time) { //IL_0031: 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_0104: 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_0144: 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_00d8: Unknown result type (might be due to invalid IL or missing references) projectile.Hide(clearTrail: false); charge.Hide(); release.Hide(); mode = 3; ended = time; SetPosition(position); Plugin.Instance.Audio.StopTag(Token, 0.045f); Plugin.Instance.Audio.Play("Impact", Token, position, 2, loop: false, 1f, (float)Math.Max(0.0, HollowPurpleNetwork.Now - time)); if (upgradeLevel >= 5) { Plugin.Instance.Audio.Play("Cataclysm", Token, position, 2, loop: false, 1.8f, 0f, 0.58f); Plugin.Instance.Audio.Play("Cataclysm", Token, position, 2, loop: false, 1.4f, 0f, 0.28f); } Plugin.Instance.Audio.Play("Aftermath", Token, position, 2, loop: false, 0.65f, (float)Math.Max(0.0, HollowPurpleNetwork.Now - time)); HollowPurpleCameraFeedback.Impact(position); Burst(60 + Arcs * 10, 15f, VisualAssets.Magenta); } public void Fade(double time) { if (((Component)this).gameObject.activeSelf) { mode = 4; ended = time; charge.Hide(); projectile.Hide(clearTrail: false); impact.Hide(); release.Hide(); Plugin.Instance.Audio.StopTag(Token, 0.08f); } } private void Hide() { charge.Hide(); projectile.Hide(clearTrail: true); impact.Hide(); release.Hide(); } public void Stop() { if (charge != null) { Hide(); particles.Stop(true, (ParticleSystemStopBehavior)0); if (Object.op_Implicit((Object)(object)Plugin.Instance) && Object.op_Implicit((Object)(object)Plugin.Instance.Audio)) { Plugin.Instance.Audio.StopTag(Token, 0f); } mode = 0; ((Component)this).gameObject.SetActive(false); } } private float Random01() { random ^= random << 13; random ^= random >> 17; random ^= random << 5; return (float)(random & 0xFFFF) / 65535f; } private Vector2 RandomDirection() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) float num = Random01() * (float)Math.PI * 2f; return new Vector2(Mathf.Cos(num), Mathf.Sin(num)); } private void Emit(Vector2 position, Vector2 velocity, Color color, float lifetime, float size) { //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_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_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_0059: 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_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_008b: Unknown result type (might be due to invalid IL or missing references) if (ParticleCount < Plugin.Instance.Settings.ParticleBudget && pool.CanEmit()) { EmitParams val = default(EmitParams); ((EmitParams)(ref val)).position = new Vector3(position.x, position.y, -1f); ((EmitParams)(ref val)).velocity = Vector2.op_Implicit(velocity); ((EmitParams)(ref val)).startColor = Color32.op_Implicit(color); ((EmitParams)(ref val)).startLifetime = lifetime; ((EmitParams)(ref val)).startSize = size; ((EmitParams)(ref val)).randomSeed = random; EmitParams val2 = val; particles.Emit(val2, 1); } } private void Burst(int count, float speed, Color color) { //IL_000b: 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_0016: 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_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) for (int i = 0; i < count; i++) { Emit(Vector2.op_Implicit(((Component)this).transform.position), RandomDirection() * speed * (0.2f + Random01() * 0.8f), color, 0.2f + Random01() * 0.55f, 0.06f + Random01() * 0.28f); } } private void Update() { //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: 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) //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0432: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0442: 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_0458: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_0474: 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_0484: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_048e: 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_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_023b: 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_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_024d: 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_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_028b: 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_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029d: 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_021d: 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_02b5: 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) double now = HollowPurpleNetwork.Now; float num = (float)(now - started); if (mode == 1) { float num2 = Mathf.Clamp01(num / chargeSeconds); float num3 = num2 * 1.5f; charge.Draw(num2, num, seed, Arcs, visualScale); int num4 = ((num3 < 0.35f) ? 1 : ((num3 < 0.7f) ? 2 : ((num3 < 1.35f) ? 3 : 4))); if (num4 != audioStage) { audioStage = num4; string clipName = num4 switch { 3 => "Fusion", 2 => "RedCharge", 1 => "BlueCharge", _ => "PreRelease", }; float num5 = num4 switch { 3 => 0.7f, 2 => 0.35f, 1 => 0f, _ => 1.35f, }; if (num4 == 4) { Plugin.Instance.Audio.StopTag(Token, 0.02f); } Plugin.Instance.Audio.Play(clipName, Token, Vector2.op_Implicit(((Component)this).transform.position), 0, loop: false, 1f, Mathf.Max(0f, num3 - num5), 1.5f / chargeSeconds); } if (num3 >= 1.45f) { Plugin.Instance.Audio.StopTag(Token, 0.01f); } float num6 = (float)(50 + Arcs * 10) * ((num3 > 0.7f) ? 1.6f : 1f) * (1f + (float)upgradeLevel * 0.18f); emitRemainder += Mathf.Min(Time.unscaledDeltaTime, 0.1f) * num6; int num7 = (int)emitRemainder; emitRemainder -= num7; for (int i = 0; i < num7; i++) { bool flag = num3 > 0.35f && Random01() > 0.5f; Vector2 val = Vector2.op_Implicit(((Component)this).transform.position) + Vector2.op_Implicit((Vector3)((num3 > 1.05f) ? new Vector3(0f, 0.6f) : (flag ? charge.RedPosition : charge.BluePosition))); Vector2 val2 = RandomDirection() * (1.2f + Random01() * 2.2f) * visualScale; float num8 = 0.25f + Random01() * 0.2f; Emit(val + val2, -val2 / num8, (num3 > 1.05f) ? VisualAssets.Purple : (flag ? VisualAssets.Red : VisualAssets.Blue), num8, (0.05f + Random01() * 0.14f) * visualScale); } } else if (mode == 2) { float num9 = (float)(now - launched); projectile.Draw(num9, aim, seed, Arcs, visualScale); releaseRoot.position = new Vector3(releasePosition.x, releasePosition.y, -1f); if (num9 < 0.35f) { release.Draw(num9, Plugin.Instance.Settings.Flash.Value, seed, Arcs, release: true, visualScale); } else { release.Hide(); } Plugin.Instance.Audio.MoveTag(Token, Vector2.op_Implicit(((Component)this).transform.position)); emitRemainder += Mathf.Min(Time.unscaledDeltaTime, 0.1f) * (float)(80 + Arcs * 15) * (1f + (float)upgradeLevel * 0.18f); int num10 = (int)emitRemainder; emitRemainder -= num10; for (int j = 0; j < num10; j++) { Emit(Vector2.op_Implicit(((Component)this).transform.position) + RandomDirection() * 1.1f * visualScale, -aim * (5f + Random01() * 10f) + RandomDirection() * 2f, VisualAssets.Purple, 0.3f + Random01() * 0.35f, (0.08f + Random01() * 0.18f) * visualScale); } } else if (mode == 3) { float num11 = (float)(now - ended); impact.Draw(num11, Plugin.Instance.Settings.Flash.Value, seed, Arcs, release: false, visualScale); if (num11 >= 0.8f) { impact.Hide(); } if (num11 >= 1.6f) { Stop(); } } else if (mode == 4 && now - ended > 0.8) { Stop(); } } } public sealed class ImpactVfx { private readonly SpriteRenderer core; private readonly SpriteRenderer halo; private readonly SpriteRenderer[] rings = (SpriteRenderer[])(object)new SpriteRenderer[3]; private readonly ProceduralLightning lightning; private readonly EnergyDetail detail; public ImpactVfx(Transform root) { core = VisualAssets.Sprite(root, "ImpactWhite", VisualAssets.Glow, 230); halo = VisualAssets.Sprite(root, "ImpactAtmosphere", VisualAssets.Glow, 207); for (int i = 0; i < rings.Length; i++) { rings[i] = VisualAssets.Sprite(root, "Shockwave" + i, VisualAssets.Ring, 217 + i); } lightning = new ProceduralLightning(root, 16); detail = new EnergyDetail(root); } public void Draw(float age, float flash, int seed, int arcs, bool release, float amplification = 1f) { //IL_0048: 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_0070: 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_00ad: 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_016b: 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_011a: 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) float num = (release ? 0.5f : 1f) * amplification; float num2 = Mathf.Clamp01(1f - age / (release ? 0.35f : 0.8f)); detail.Draw(age, (3f + age * 18f) * num, VisualAssets.Magenta, num2 * num2, 1); VisualAssets.Draw(core, Vector3.zero, (float)(release ? 4 : 9) * num2 * amplification, VisualAssets.White, Mathf.Clamp01(1f - age / 0.045f) * flash); VisualAssets.Draw(halo, Vector3.zero, (3f + age * 12f) * num, VisualAssets.Purple, num2 * num2 * 0.55f); for (int i = 0; i < rings.Length; i++) { float num3 = Mathf.Max(0f, age - (float)i * 0.045f); VisualAssets.Draw(rings[i], Vector3.zero, (1f + (1f - Mathf.Exp((0f - num3) * (float)(6 - i))) * (float)(12 - i * 2)) * num, (i == 0) ? VisualAssets.White : VisualAssets.Magenta, (age < (float)i * 0.045f) ? 0f : (Mathf.Clamp01(1f - num3 / 0.5f) * 0.75f), i * 24); } lightning.Draw(Vector3.zero, (1.5f + age * 8f) * num, VisualAssets.Magenta, Mathf.Clamp01(1f - age / 0.3f), age, seed, arcs); } public void Hide() { SpriteRenderer obj = core; bool enabled = (((Renderer)halo).enabled = false); ((Renderer)obj).enabled = enabled; for (int i = 0; i < rings.Length; i++) { ((Renderer)rings[i]).enabled = false; } lightning.Hide(); detail.Hide(); } } public sealed class ProceduralLightning { private readonly LineRenderer[] lines; private readonly Vector3[] points = (Vector3[])(object)new Vector3[13]; public ProceduralLightning(Transform parent, int count) { //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) lines = (LineRenderer[])(object)new LineRenderer[count]; for (int i = 0; i < count; i++) { GameObject val = new GameObject("BranchedLightning_" + i); val.transform.SetParent(parent, false); LineRenderer val2 = val.AddComponent<LineRenderer>(); val2.useWorldSpace = false; val2.positionCount = points.Length; ((Renderer)val2).sharedMaterial = VisualAssets.LineMaterial; ((Renderer)val2).sortingOrder = 220; val2.numCapVertices = 1; ((Renderer)val2).enabled = false; lines[i] = val2; } } private static float Noise(int seed) { int num = seed ^ (seed << 13); int num2 = num ^ (num >>> 17); return (float)(uint)((num2 ^ (num2 << 5)) & 0xFFFF) / 32767.5f - 1f; } public void Draw(Vector3 center, float radius, Color color, float opacity, float time, int seed, int count) { //IL_0084: 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: 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)