Decompiled source of SWIP v2.3.0
SWIP.dll
Decompiled 2 days 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.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using ClassesManagerReborn; using HarmonyLib; using Microsoft.CodeAnalysis; using ModdingUtils.Utils; using RarityLib.Utils; using SWIP.Cards; using SWIP.Effects; using TMPro; using UnboundLib; using UnboundLib.Cards; using UnboundLib.Utils.UI; using UnityEngine; using UnityEngine.Events; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("SWIP")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+344d58e4154feef2bc48726946a618d093f589f1")] [assembly: AssemblyProduct("SWIP")] [assembly: AssemblyTitle("SWIP")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SWIP { public static class CardRegistry { private static readonly Dictionary<string, CardInfo> cards = new Dictionary<string, CardInfo>(); public static IReadOnlyDictionary<string, CardInfo> All => cards; public static void Register(string title, CardInfo cardInfo) { cards[title] = cardInfo; } public static CardInfo Get(string title) { cards.TryGetValue(title, out var value); return value; } public static bool TryGet(string title, out CardInfo info) { return cards.TryGetValue(title, out info); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.sam.rounds.swip", "SWIP", "2.0.0")] [BepInProcess("Rounds.exe")] public class Plugin : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__7_0; public static Action<CardInfo> <>9__7_2; public static Action<CardInfo> <>9__7_3; public static Action<CardInfo> <>9__7_4; public static Action<CardInfo> <>9__7_5; public static Action<CardInfo> <>9__7_6; public static Action<CardInfo> <>9__7_7; public static Action<CardInfo> <>9__7_8; public static Action<CardInfo> <>9__7_9; public static Action<CardInfo> <>9__7_10; public static Action<CardInfo> <>9__7_11; public static Action<CardInfo> <>9__7_12; public static Action<CardInfo> <>9__7_13; public static Action<CardInfo> <>9__7_14; public static Action<CardInfo> <>9__7_15; public static Action<CardInfo> <>9__7_16; public static Action<CardInfo> <>9__7_17; public static Action<CardInfo> <>9__7_18; public static Action<CardInfo> <>9__7_19; public static Action<CardInfo> <>9__7_20; public static Action<CardInfo> <>9__7_21; public static Action<CardInfo> <>9__7_22; public static Action<CardInfo> <>9__7_23; public static Action<CardInfo> <>9__7_24; public static Action<CardInfo> <>9__7_25; public static Action<CardInfo> <>9__7_26; public static Action<CardInfo> <>9__7_27; public static Action<CardInfo> <>9__7_28; public static Action<CardInfo> <>9__7_29; public static Action<CardInfo> <>9__7_30; public static Action<CardInfo> <>9__7_31; public static Action<CardInfo> <>9__7_32; public static Action<CardInfo> <>9__7_33; public static Action<CardInfo> <>9__7_34; public static Action<CardInfo> <>9__7_35; public static Action<CardInfo> <>9__7_36; public static Action<CardInfo> <>9__7_37; public static Action<CardInfo> <>9__7_38; public static Action<CardInfo> <>9__7_39; public static Action<CardInfo> <>9__7_40; public static Action<CardInfo> <>9__7_41; public static Action<CardInfo> <>9__7_42; public static Action<CardInfo> <>9__7_43; public static Action<CardInfo> <>9__7_44; public static Action<CardInfo> <>9__7_45; public static Action<CardInfo> <>9__7_46; public static Action<CardInfo> <>9__7_47; public static Action<CardInfo> <>9__7_48; public static Action<CardInfo> <>9__7_49; public static Action<CardInfo> <>9__7_50; public static Action<CardInfo> <>9__7_51; public static Action<CardInfo> <>9__7_52; public static Action<CardInfo> <>9__7_53; public static Action<CardInfo> <>9__7_54; public static Action<CardInfo> <>9__7_55; public static Action<CardInfo> <>9__7_56; public static Action<CardInfo> <>9__7_57; public static Action<CardInfo> <>9__7_58; public static Action<CardInfo> <>9__7_59; public static Action<CardInfo> <>9__7_60; public static Action<CardInfo> <>9__7_61; public static Action<CardInfo> <>9__7_62; public static Action<CardInfo> <>9__7_63; public static Action<CardInfo> <>9__7_64; public static Action<CardInfo> <>9__7_65; public static Action<CardInfo> <>9__7_66; public static Action<CardInfo> <>9__7_67; public static Action<CardInfo> <>9__7_68; public static Action<CardInfo> <>9__7_69; public static Action<CardInfo> <>9__7_70; public static Action<CardInfo> <>9__7_71; public static Action<CardInfo> <>9__7_72; public static Action<CardInfo> <>9__7_73; public static Action<CardInfo> <>9__7_74; public static Action<CardInfo> <>9__7_75; public static Action<CardInfo> <>9__7_76; public static Action<CardInfo> <>9__7_77; public static Action<CardInfo> <>9__7_78; public static Action<CardInfo> <>9__7_79; public static Action<CardInfo> <>9__7_80; public static Action<CardInfo> <>9__7_81; public static Action<CardInfo> <>9__7_82; public static Action<CardInfo> <>9__7_83; public static Action<CardInfo> <>9__7_84; public static Action<CardInfo> <>9__7_85; public static Action<CardInfo> <>9__7_86; public static Action<CardInfo> <>9__7_87; public static Action<CardInfo> <>9__7_88; public static Action<CardInfo> <>9__7_89; public static Action<CardInfo> <>9__7_90; public static Action<CardInfo> <>9__7_91; public static Action<CardInfo> <>9__7_92; public static Action<CardInfo> <>9__7_93; public static Action<CardInfo> <>9__7_94; public static Action<CardInfo> <>9__7_95; public static Action<CardInfo> <>9__7_96; public static Action<CardInfo> <>9__7_97; public static Action<CardInfo> <>9__7_98; public static Action<CardInfo> <>9__7_99; public static Action<CardInfo> <>9__7_100; public static Action<CardInfo> <>9__7_101; public static Action<CardInfo> <>9__7_102; public static Action<CardInfo> <>9__7_103; internal void <Start>b__7_0() { } internal void <Start>b__7_2(CardInfo ci) { CardRegistry.Register("SaucyEnchiladas Entry", ci); } internal void <Start>b__7_3(CardInfo ci) { CardRegistry.Register("ASourFruit Entry", ci); } internal void <Start>b__7_4(CardInfo ci) { CardRegistry.Register("Synogence Entry", ci); } internal void <Start>b__7_5(CardInfo ci) { CardRegistry.Register("Smoke Bomb", ci); } internal void <Start>b__7_6(CardInfo ci) { CardRegistry.Register("Salsa Verde", ci); } internal void <Start>b__7_7(CardInfo ci) { CardRegistry.Register("Corrosive Spray", ci); } internal void <Start>b__7_8(CardInfo ci) { CardRegistry.Register("Noxious Fumes", ci); } internal void <Start>b__7_9(CardInfo ci) { CardRegistry.Register("Acid Rain", ci); } internal void <Start>b__7_10(CardInfo ci) { CardRegistry.Register("Gas Leak", ci); } internal void <Start>b__7_11(CardInfo ci) { CardRegistry.Register("Toxic Relationship", ci); } internal void <Start>b__7_12(CardInfo ci) { CardRegistry.Register("Healing Mist", ci); } internal void <Start>b__7_13(CardInfo ci) { CardRegistry.Register("Extra Spicy", ci); } internal void <Start>b__7_14(CardInfo ci) { CardRegistry.Register("Second Wind", ci); } internal void <Start>b__7_15(CardInfo ci) { CardRegistry.Register("Miasma", ci); } internal void <Start>b__7_16(CardInfo ci) { CardRegistry.Register("Special Sauce", ci); } internal void <Start>b__7_17(CardInfo ci) { CardRegistry.Register("The Enchilada Treatment", ci); } internal void <Start>b__7_18(CardInfo ci) { CardRegistry.Register("Hot Ones Challenge", ci); } internal void <Start>b__7_19(CardInfo ci) { CardRegistry.Register("Biohazard", ci); } internal void <Start>b__7_20(CardInfo ci) { CardRegistry.Register("Plague Doctor", ci); } internal void <Start>b__7_21(CardInfo ci) { CardRegistry.Register("Chemical Warfare", ci); } internal void <Start>b__7_22(CardInfo ci) { CardRegistry.Register("Life Drain", ci); } internal void <Start>b__7_23(CardInfo ci) { CardRegistry.Register("Contagion", ci); } internal void <Start>b__7_24(CardInfo ci) { CardRegistry.Register("Dead Zone", ci); } internal void <Start>b__7_25(CardInfo ci) { CardRegistry.Register("Pandemic", ci); } internal void <Start>b__7_26(CardInfo ci) { CardRegistry.Register("Eternal Mist", ci); } internal void <Start>b__7_27(CardInfo ci) { CardRegistry.Register("Rubber Bullets", ci); } internal void <Start>b__7_28(CardInfo ci) { CardRegistry.Register("Sour Punch", ci); } internal void <Start>b__7_29(CardInfo ci) { CardRegistry.Register("Fruit Salad", ci); } internal void <Start>b__7_30(CardInfo ci) { CardRegistry.Register("Sour Patch", ci); } internal void <Start>b__7_31(CardInfo ci) { CardRegistry.Register("Citric Acid", ci); } internal void <Start>b__7_32(CardInfo ci) { CardRegistry.Register("One Punch", ci); } internal void <Start>b__7_33(CardInfo ci) { CardRegistry.Register("Pinball", ci); } internal void <Start>b__7_34(CardInfo ci) { CardRegistry.Register("No U", ci); } internal void <Start>b__7_35(CardInfo ci) { CardRegistry.Register("Snowball Effect", ci); } internal void <Start>b__7_36(CardInfo ci) { CardRegistry.Register("Agent Orange", ci); } internal void <Start>b__7_37(CardInfo ci) { CardRegistry.Register("Zyklon B", ci); } internal void <Start>b__7_38(CardInfo ci) { CardRegistry.Register("Chain Reaction", ci); } internal void <Start>b__7_39(CardInfo ci) { CardRegistry.Register("Bounce House", ci); } internal void <Start>b__7_40(CardInfo ci) { CardRegistry.Register("Scorched Earth", ci); } internal void <Start>b__7_41(CardInfo ci) { CardRegistry.Register("Ricochet Rush", ci); } internal void <Start>b__7_42(CardInfo ci) { CardRegistry.Register("Nuclear Option", ci); } internal void <Start>b__7_43(CardInfo ci) { CardRegistry.Register("Cluster Bomb", ci); } internal void <Start>b__7_44(CardInfo ci) { CardRegistry.Register("Seismic Impact", ci); } internal void <Start>b__7_45(CardInfo ci) { CardRegistry.Register("Volatile Payload", ci); } internal void <Start>b__7_46(CardInfo ci) { CardRegistry.Register("Aftershock", ci); } internal void <Start>b__7_47(CardInfo ci) { CardRegistry.Register("Singularity", ci); } internal void <Start>b__7_48(CardInfo ci) { CardRegistry.Register("Perpetual Motion", ci); } internal void <Start>b__7_49(CardInfo ci) { CardRegistry.Register("Arsonist", ci); } internal void <Start>b__7_50(CardInfo ci) { CardRegistry.Register("Lemon Zest", ci); } internal void <Start>b__7_51(CardInfo ci) { CardRegistry.Register("Trail Blazer", ci); } internal void <Start>b__7_52(CardInfo ci) { CardRegistry.Register("The Algorithm", ci); } internal void <Start>b__7_53(CardInfo ci) { CardRegistry.Register("Synapse Fire", ci); } internal void <Start>b__7_54(CardInfo ci) { CardRegistry.Register("Firewall", ci); } internal void <Start>b__7_55(CardInfo ci) { CardRegistry.Register("Ghost Pepper", ci); } internal void <Start>b__7_56(CardInfo ci) { CardRegistry.Register("Protocol Override", ci); } internal void <Start>b__7_57(CardInfo ci) { CardRegistry.Register("Buffer Overflow", ci); } internal void <Start>b__7_58(CardInfo ci) { CardRegistry.Register("Recursive Loop", ci); } internal void <Start>b__7_59(CardInfo ci) { CardRegistry.Register("Holy Light", ci); } internal void <Start>b__7_60(CardInfo ci) { CardRegistry.Register("Frostbite", ci); } internal void <Start>b__7_61(CardInfo ci) { CardRegistry.Register("Core Stability", ci); } internal void <Start>b__7_62(CardInfo ci) { CardRegistry.Register("Laser Precision", ci); } internal void <Start>b__7_63(CardInfo ci) { CardRegistry.Register("Napalm", ci); } internal void <Start>b__7_64(CardInfo ci) { CardRegistry.Register("Thermal Shock", ci); } internal void <Start>b__7_65(CardInfo ci) { CardRegistry.Register("Cauterize", ci); } internal void <Start>b__7_66(CardInfo ci) { CardRegistry.Register("Permafrost", ci); } internal void <Start>b__7_67(CardInfo ci) { CardRegistry.Register("Glacial Armor", ci); } internal void <Start>b__7_68(CardInfo ci) { CardRegistry.Register("Inferno", ci); } internal void <Start>b__7_69(CardInfo ci) { CardRegistry.Register("Absolute Zero", ci); } internal void <Start>b__7_70(CardInfo ci) { CardRegistry.Register("Supernova", ci); } internal void <Start>b__7_71(CardInfo ci) { CardRegistry.Register("Welcome to the Park", ci); } internal void <Start>b__7_72(CardInfo ci) { CardRegistry.Register("Controller Throw", ci); } internal void <Start>b__7_73(CardInfo ci) { CardRegistry.Register("Lil Bro Energy", ci); } internal void <Start>b__7_74(CardInfo ci) { CardRegistry.Register("Big Bro Energy", ci); } internal void <Start>b__7_75(CardInfo ci) { CardRegistry.Register("Vitamin C", ci); } internal void <Start>b__7_76(CardInfo ci) { CardRegistry.Register("Adrenaline", ci); } internal void <Start>b__7_77(CardInfo ci) { CardRegistry.Register("Sugar Rush", ci); } internal void <Start>b__7_78(CardInfo ci) { CardRegistry.Register("Rage Quit", ci); } internal void <Start>b__7_79(CardInfo ci) { CardRegistry.Register("Snack Break", ci); } internal void <Start>b__7_80(CardInfo ci) { CardRegistry.Register("Ammo Hoarder", ci); } internal void <Start>b__7_81(CardInfo ci) { CardRegistry.Register("Thick Skin", ci); } internal void <Start>b__7_82(CardInfo ci) { CardRegistry.Register("Glass Cannon", ci); } internal void <Start>b__7_83(CardInfo ci) { CardRegistry.Register("Couch Cushion Fort", ci); } internal void <Start>b__7_84(CardInfo ci) { CardRegistry.Register("Wild Card", ci); } internal void <Start>b__7_85(CardInfo ci) { CardRegistry.Register("Smite", ci); } internal void <Start>b__7_86(CardInfo ci) { CardRegistry.Register("Come Here Bro", ci); } internal void <Start>b__7_87(CardInfo ci) { CardRegistry.Register("Scorched Sky", ci); } internal void <Start>b__7_88(CardInfo ci) { CardRegistry.Register("Mom Said My Turn", ci); } internal void <Start>b__7_89(CardInfo ci) { CardRegistry.Register("Brotherly Love", ci); } internal void <Start>b__7_90(CardInfo ci) { CardRegistry.Register("Divine Judgment", ci); } internal void <Start>b__7_91(CardInfo ci) { CardRegistry.Register("Carpet Bomb", ci); } internal void <Start>b__7_92(CardInfo ci) { CardRegistry.Register("Satellite Uplink", ci); } internal void <Start>b__7_93(CardInfo ci) { CardRegistry.Register("Drone Swarm", ci); } internal void <Start>b__7_94(CardInfo ci) { CardRegistry.Register("Underdog", ci); } internal void <Start>b__7_95(CardInfo ci) { CardRegistry.Register("Momentum", ci); } internal void <Start>b__7_96(CardInfo ci) { CardRegistry.Register("Berserker", ci); } internal void <Start>b__7_97(CardInfo ci) { CardRegistry.Register("Extra Life", ci); } internal void <Start>b__7_98(CardInfo ci) { CardRegistry.Register("Last Stand", ci); } internal void <Start>b__7_99(CardInfo ci) { CardRegistry.Register("Nullifier", ci); } internal void <Start>b__7_100(CardInfo ci) { CardRegistry.Register("The Final Boss", ci); } internal void <Start>b__7_101(CardInfo ci) { CardRegistry.Register("Yay It's My Turn!", ci); } internal void <Start>b__7_102(CardInfo ci) { CardRegistry.Register("Sharing is Caring", ci); } internal void <Start>b__7_103(CardInfo ci) { CardRegistry.Register("Orbital Test", ci); } } private const string ModId = "com.sam.rounds.swip"; private const string ModName = "SWIP"; private const string Version = "2.0.0"; public static bool UseClasses; private static ConfigEntry<bool> cfgUseClasses; private static bool cmrPresent; private void Awake() { //IL_0005: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) new Harmony("com.sam.rounds.swip").PatchAll(); RarityUtils.AddRarity("Epic", 0.08f, new Color(0.6f, 0.2f, 0.8f), new Color(0.4f, 0.1f, 0.5f)); RarityUtils.AddRarity("Legendary", 0.05f, new Color(1f, 0.84f, 0f), new Color(0.8f, 0.6f, 0f)); RarityUtils.AddRarity("Mythic", 0.02f, new Color(1f, 0.2f, 0.8f), new Color(0.6f, 0.1f, 0.5f)); cmrPresent = Chainloader.PluginInfos.ContainsKey("root.classes.manager.reborn"); cfgUseClasses = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "UseClasses", cmrPresent, "Enable class gating (requires ClassesManagerReborn). When false, all cards are a flat pool."); if (cfgUseClasses.Value && !cmrPresent) { ((BaseUnityPlugin)this).Logger.LogWarning((object)"[SWIP] UseClasses enabled but ClassesManagerReborn not installed. Forcing to false."); cfgUseClasses.Value = false; } UseClasses = cfgUseClasses.Value; ((BaseUnityPlugin)this).Logger.LogInfo((object)$"[SWIP] UseClasses = {UseClasses} (CMR present: {cmrPresent})"); } private void Start() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown Unbound.RegisterClientSideMod("com.sam.rounds.swip"); object obj = <>c.<>9__7_0; if (obj == null) { UnityAction val = delegate { }; <>c.<>9__7_0 = val; obj = (object)val; } Unbound.RegisterMenu("SWIP", (UnityAction)obj, (Action<GameObject>)delegate(GameObject menu) { MenuHandler.CreateToggle(UseClasses, "Use Classes (requires restart)", menu, (UnityAction<bool>)delegate(bool value) { if (value && !cmrPresent) { ((BaseUnityPlugin)this).Logger.LogWarning((object)"[SWIP] ClassesManagerReborn not installed — can't enable classes."); } else { UseClasses = value; cfgUseClasses.Value = value; } }, 60, true, (Color?)null, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); }, (GameObject)null, false); CustomCard.BuildCard<SaucyEnchiladasEntry>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("SaucyEnchiladas Entry", ci); }); CustomCard.BuildCard<ASourFruitEntry>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("ASourFruit Entry", ci); }); CustomCard.BuildCard<SynogenceEntry>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Synogence Entry", ci); }); CustomCard.BuildCard<SmokeBomb>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Smoke Bomb", ci); }); CustomCard.BuildCard<SalsaVerde>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Salsa Verde", ci); }); CustomCard.BuildCard<CorrosiveSpray>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Corrosive Spray", ci); }); CustomCard.BuildCard<NoxiousFumes>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Noxious Fumes", ci); }); CustomCard.BuildCard<AcidRain>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Acid Rain", ci); }); CustomCard.BuildCard<GasLeak>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Gas Leak", ci); }); CustomCard.BuildCard<ToxicRelationship>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Toxic Relationship", ci); }); CustomCard.BuildCard<HealingMist>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Healing Mist", ci); }); CustomCard.BuildCard<ExtraSpicy>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Extra Spicy", ci); }); CustomCard.BuildCard<SecondWind>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Second Wind", ci); }); CustomCard.BuildCard<Miasma>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Miasma", ci); }); CustomCard.BuildCard<SpecialSauce>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Special Sauce", ci); }); CustomCard.BuildCard<EnchiladaTreatment>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("The Enchilada Treatment", ci); }); CustomCard.BuildCard<HotOnesChallenge>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Hot Ones Challenge", ci); }); CustomCard.BuildCard<Biohazard>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Biohazard", ci); }); CustomCard.BuildCard<PlagueDoctor>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Plague Doctor", ci); }); CustomCard.BuildCard<ChemicalWarfare>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Chemical Warfare", ci); }); CustomCard.BuildCard<LifeDrain>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Life Drain", ci); }); CustomCard.BuildCard<Contagion>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Contagion", ci); }); CustomCard.BuildCard<DeadZone>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Dead Zone", ci); }); CustomCard.BuildCard<Pandemic>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Pandemic", ci); }); CustomCard.BuildCard<EternalMist>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Eternal Mist", ci); }); CustomCard.BuildCard<RubberBullets>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Rubber Bullets", ci); }); CustomCard.BuildCard<SourPunch>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Sour Punch", ci); }); CustomCard.BuildCard<FruitSalad>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Fruit Salad", ci); }); CustomCard.BuildCard<SourPatch>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Sour Patch", ci); }); CustomCard.BuildCard<CitricAcid>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Citric Acid", ci); }); CustomCard.BuildCard<OnePunchDan>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("One Punch", ci); }); CustomCard.BuildCard<Pinball>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Pinball", ci); }); CustomCard.BuildCard<NoU>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("No U", ci); }); CustomCard.BuildCard<SnowballEffectCard>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Snowball Effect", ci); }); CustomCard.BuildCard<AgentOrange>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Agent Orange", ci); }); CustomCard.BuildCard<ZyklonB>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Zyklon B", ci); }); CustomCard.BuildCard<ChainReaction>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Chain Reaction", ci); }); CustomCard.BuildCard<BounceHouse>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Bounce House", ci); }); CustomCard.BuildCard<ScorchedEarth>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Scorched Earth", ci); }); CustomCard.BuildCard<RicochetRush>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Ricochet Rush", ci); }); CustomCard.BuildCard<NuclearOption>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Nuclear Option", ci); }); CustomCard.BuildCard<ClusterBomb>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Cluster Bomb", ci); }); CustomCard.BuildCard<SeismicImpact>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Seismic Impact", ci); }); CustomCard.BuildCard<VolatilePayload>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Volatile Payload", ci); }); CustomCard.BuildCard<Aftershock>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Aftershock", ci); }); CustomCard.BuildCard<Singularity>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Singularity", ci); }); CustomCard.BuildCard<PerpetualMotion>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Perpetual Motion", ci); }); CustomCard.BuildCard<Arsonist>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Arsonist", ci); }); CustomCard.BuildCard<LemonZest>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Lemon Zest", ci); }); CustomCard.BuildCard<TrailBlazer>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Trail Blazer", ci); }); CustomCard.BuildCard<TheAlgorithm>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("The Algorithm", ci); }); CustomCard.BuildCard<SynapseFire>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Synapse Fire", ci); }); CustomCard.BuildCard<Firewall>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Firewall", ci); }); CustomCard.BuildCard<GhostPepper>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Ghost Pepper", ci); }); CustomCard.BuildCard<ProtocolOverride>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Protocol Override", ci); }); CustomCard.BuildCard<BufferOverflow>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Buffer Overflow", ci); }); CustomCard.BuildCard<RecursiveLoop>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Recursive Loop", ci); }); CustomCard.BuildCard<HolyLight>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Holy Light", ci); }); CustomCard.BuildCard<Frostbite>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Frostbite", ci); }); CustomCard.BuildCard<CoreStability>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Core Stability", ci); }); CustomCard.BuildCard<LaserPrecision>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Laser Precision", ci); }); CustomCard.BuildCard<Napalm>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Napalm", ci); }); CustomCard.BuildCard<ThermalShock>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Thermal Shock", ci); }); CustomCard.BuildCard<Cauterize>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Cauterize", ci); }); CustomCard.BuildCard<Permafrost>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Permafrost", ci); }); CustomCard.BuildCard<GlacialArmor>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Glacial Armor", ci); }); CustomCard.BuildCard<Inferno>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Inferno", ci); }); CustomCard.BuildCard<AbsoluteZero>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Absolute Zero", ci); }); CustomCard.BuildCard<Supernova>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Supernova", ci); }); CustomCard.BuildCard<WelcomeCard>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Welcome to the Park", ci); }); CustomCard.BuildCard<ControllerThrow>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Controller Throw", ci); }); CustomCard.BuildCard<LilBroEnergy>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Lil Bro Energy", ci); }); CustomCard.BuildCard<BigBroEnergy>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Big Bro Energy", ci); }); CustomCard.BuildCard<VitaminC>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Vitamin C", ci); }); CustomCard.BuildCard<Adrenaline>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Adrenaline", ci); }); CustomCard.BuildCard<SugarRush>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Sugar Rush", ci); }); CustomCard.BuildCard<RageQuit>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Rage Quit", ci); }); CustomCard.BuildCard<SnackBreak>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Snack Break", ci); }); CustomCard.BuildCard<AmmoHoarder>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Ammo Hoarder", ci); }); CustomCard.BuildCard<ThickSkin>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Thick Skin", ci); }); CustomCard.BuildCard<GlassCannon>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Glass Cannon", ci); }); CustomCard.BuildCard<CouchCushionFort>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Couch Cushion Fort", ci); }); CustomCard.BuildCard<WildCard>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Wild Card", ci); }); CustomCard.BuildCard<Smite>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Smite", ci); }); CustomCard.BuildCard<ComeHereBro>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Come Here Bro", ci); }); CustomCard.BuildCard<ScorchedSky>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Scorched Sky", ci); }); CustomCard.BuildCard<MomSaidMyTurn>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Mom Said My Turn", ci); }); CustomCard.BuildCard<BrotherlyLove>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Brotherly Love", ci); }); CustomCard.BuildCard<DivineJudgment>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Divine Judgment", ci); }); CustomCard.BuildCard<CarpetBomb>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Carpet Bomb", ci); }); CustomCard.BuildCard<SatelliteUplink>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Satellite Uplink", ci); }); CustomCard.BuildCard<DroneSwarm>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Drone Swarm", ci); }); CustomCard.BuildCard<Underdog>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Underdog", ci); }); CustomCard.BuildCard<MomentumCard>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Momentum", ci); }); CustomCard.BuildCard<Berserker>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Berserker", ci); }); CustomCard.BuildCard<ExtraLife>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Extra Life", ci); }); CustomCard.BuildCard<LastStand>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Last Stand", ci); }); CustomCard.BuildCard<Nullifier>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Nullifier", ci); }); CustomCard.BuildCard<TheFinalBoss>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("The Final Boss", ci); }); CustomCard.BuildCard<YayMyTurn>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Yay It's My Turn!", ci); }); CustomCard.BuildCard<SharingIsCaring>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Sharing is Caring", ci); }); CustomCard.BuildCard<OrbitalTest>((Action<CardInfo>)delegate(CardInfo ci) { CardRegistry.Register("Orbital Test", ci); }); ((BaseUnityPlugin)this).Logger.LogInfo((object)string.Format("{0} v{1} loaded! {2} cards registered across 3 classes.", "SWIP", "2.0.0", CardRegistry.All.Count)); } } } namespace SWIP.Effects { public class BurnDamageEffect : MonoBehaviour { public float damagePerSecond = 5f; public float duration = 3f; private float timer; private HealthHandler healthHandler; private LineRenderer fireVisual; private float flickerTimer; private void Start() { timer = duration; Player component = ((Component)this).GetComponent<Player>(); if ((Object)(object)component != (Object)null) { healthHandler = component.data.healthHandler; } CreateVisual(); } private void CreateVisual() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("BurnVisual"); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; fireVisual = val.AddComponent<LineRenderer>(); fireVisual.useWorldSpace = false; fireVisual.startWidth = 0.12f; fireVisual.endWidth = 0.12f; fireVisual.loop = true; ((Renderer)fireVisual).material = new Material(Shader.Find("Sprites/Default")); fireVisual.startColor = new Color(1f, 0.4f, 0f, 0.6f); fireVisual.endColor = new Color(1f, 0.1f, 0f, 0.6f); int positionCount = 24; fireVisual.positionCount = positionCount; UpdateFireShape(1f); } private void UpdateFireShape(float scale) { //IL_0084: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)fireVisual == (Object)null)) { int positionCount = fireVisual.positionCount; float num = 1.2f * scale; for (int i = 0; i < positionCount; i++) { float num2 = (float)i / (float)positionCount * MathF.PI * 2f; float num3 = 1f + Mathf.Sin(num2 * 5f + flickerTimer * 8f) * 0.2f; float num4 = num * num3; fireVisual.SetPosition(i, new Vector3(Mathf.Cos(num2) * num4, Mathf.Sin(num2) * num4, 0f)); } } } private void Update() { //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)healthHandler == (Object)null) { CleanupVisual(); Object.Destroy((Object)(object)this); return; } timer -= Time.deltaTime; if (timer <= 0f) { CleanupVisual(); Object.Destroy((Object)(object)this); return; } flickerTimer += Time.deltaTime; UpdateFireShape(1f); if ((Object)(object)fireVisual != (Object)null) { float num = Mathf.Clamp01(timer / duration) * 0.6f; fireVisual.startColor = new Color(1f, 0.4f, 0f, num); fireVisual.endColor = new Color(1f, 0.1f, 0f, num); } ((Damagable)healthHandler).TakeDamage(Vector2.up * damagePerSecond * Time.deltaTime, Vector2.op_Implicit(((Component)this).transform.position), (GameObject)null, (Player)null, true, false); } private void CleanupVisual() { if ((Object)(object)fireVisual != (Object)null) { Object.Destroy((Object)(object)((Component)fireVisual).gameObject); } } private void OnDestroy() { CleanupVisual(); } } public class BurnEffect : MonoBehaviour { public float burnDPS = 5f; public float burnDuration = 3f; private ProjectileHit projectileHit; private Player owner; private void Start() { projectileHit = ((Component)this).GetComponentInParent<ProjectileHit>(); if ((Object)(object)projectileHit == (Object)null) { projectileHit = ((Component)this).GetComponent<ProjectileHit>(); } if ((Object)(object)projectileHit != (Object)null) { owner = projectileHit.ownPlayer; projectileHit.AddHitAction((Action)ApplyBurn); } } private void ApplyBurn() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)this).transform.position), 3f); for (int i = 0; i < array.Length; i++) { Player componentInParent = ((Component)array[i]).GetComponentInParent<Player>(); if ((Object)(object)componentInParent != (Object)null && !componentInParent.data.dead && (Object)(object)componentInParent != (Object)(object)owner) { BurnDamageEffect burnDamageEffect = ((Component)componentInParent).gameObject.AddComponent<BurnDamageEffect>(); burnDamageEffect.damagePerSecond = burnDPS; burnDamageEffect.duration = burnDuration; } } } } public class BurnEffectSpawner : ProjectileEffectSpawner { public float burnDPS = 5f; public float burnDuration = 3f; protected override void ApplyToProjectile(GameObject projectile) { BurnEffect burnEffect = projectile.AddComponent<BurnEffect>(); burnEffect.burnDPS = burnDPS; burnEffect.burnDuration = burnDuration; } } public class CloudEffect : MonoBehaviour { public float cloudRadius = 3f; public float cloudDuration = 4f; public float damagePerSecond; public float healPerSecond; public float slowAmount; public Color outerColor = new Color(0.2f, 0.8f, 0.2f, 0.5f); public Color innerColor = new Color(0.3f, 0.9f, 0.3f, 0.35f); public bool affectsOwner; public bool spawnOnBounce; public bool scaleWithDamage; private ProjectileHit projectileHit; private Vector3 lastPosition; private Vector3 lastDirection; private bool hasDirection; private float bounceCooldown; private void Start() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) projectileHit = ((Component)this).GetComponentInParent<ProjectileHit>(); if ((Object)(object)projectileHit == (Object)null) { projectileHit = ((Component)this).GetComponent<ProjectileHit>(); } if ((Object)(object)projectileHit != (Object)null) { projectileHit.AddHitAction((Action)SpawnCloud); } lastPosition = ((Component)this).transform.position; } private void FixedUpdate() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) if (!spawnOnBounce) { return; } if (bounceCooldown > 0f) { bounceCooldown -= Time.fixedDeltaTime; } Vector3 position = ((Component)this).transform.position; Vector3 val = position - lastPosition; if (((Vector3)(ref val)).sqrMagnitude > 0.01f) { Vector3 normalized = ((Vector3)(ref val)).normalized; if (hasDirection && bounceCooldown <= 0f && Vector3.Dot(lastDirection, normalized) < 0.5f) { bounceCooldown = 0.15f; SpawnCloud(); } lastDirection = normalized; hasDirection = true; } lastPosition = position; } private void SpawnCloud() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Zone"); val.transform.position = ((Component)this).transform.position; ZoneBehaviour zoneBehaviour = val.AddComponent<ZoneBehaviour>(); zoneBehaviour.radius = cloudRadius; zoneBehaviour.duration = cloudDuration; zoneBehaviour.outerColor = outerColor; zoneBehaviour.innerColor = innerColor; zoneBehaviour.affectsOwner = affectsOwner; float num = 1f; if (scaleWithDamage && (Object)(object)projectileHit != (Object)null) { num = projectileHit.damage / 55f; } zoneBehaviour.damagePerSecond = damagePerSecond * num; zoneBehaviour.healPerSecond = healPerSecond * num; zoneBehaviour.slowAmount = slowAmount; } } public class CloudEffectSpawner : ProjectileEffectSpawner { public float cloudRadius = 3f; public float cloudDuration = 4f; public float damagePerSecond; public float healPerSecond; public float slowAmount; public Color outerColor = new Color(0.2f, 0.8f, 0.2f, 0.5f); public Color innerColor = new Color(0.3f, 0.9f, 0.3f, 0.35f); public bool affectsOwner; public bool spawnOnBounce; public bool scaleWithDamage; protected override void ApplyToProjectile(GameObject projectile) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) CloudEffect cloudEffect = projectile.AddComponent<CloudEffect>(); cloudEffect.cloudRadius = cloudRadius; cloudEffect.cloudDuration = cloudDuration; cloudEffect.damagePerSecond = damagePerSecond; cloudEffect.healPerSecond = healPerSecond; cloudEffect.slowAmount = slowAmount; cloudEffect.outerColor = outerColor; cloudEffect.innerColor = innerColor; cloudEffect.affectsOwner = affectsOwner; cloudEffect.spawnOnBounce = spawnOnBounce; cloudEffect.scaleWithDamage = scaleWithDamage; } } public class ExplodeOnBounceEffect : MonoBehaviour { public float explosionDamage = 20f; public float explosionRange = 2f; public float explosionForce = 800f; private Vector3 lastPosition; private Vector3 lastDirection; private bool hasDirection; private float bounceCooldown; private void Start() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) lastPosition = ((Component)this).transform.position; } private void FixedUpdate() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) if (bounceCooldown > 0f) { bounceCooldown -= Time.fixedDeltaTime; } Vector3 position = ((Component)this).transform.position; Vector3 val = position - lastPosition; if (((Vector3)(ref val)).sqrMagnitude > 0.01f) { Vector3 normalized = ((Vector3)(ref val)).normalized; if (hasDirection && bounceCooldown <= 0f && Vector3.Dot(lastDirection, normalized) < 0.5f) { bounceCooldown = 0.15f; SWIPExplosion.Spawn(((Component)this).transform.position, explosionDamage, explosionRange, explosionForce); } lastDirection = normalized; hasDirection = true; } lastPosition = position; } } public class ExplodeOnBounceSpawner : ProjectileEffectSpawner { public float explosionDamage = 20f; public float explosionRange = 2f; public float explosionForce = 800f; protected override void ApplyToProjectile(GameObject projectile) { ExplodeOnBounceEffect explodeOnBounceEffect = projectile.AddComponent<ExplodeOnBounceEffect>(); explodeOnBounceEffect.explosionDamage = explosionDamage; explodeOnBounceEffect.explosionRange = explosionRange; explodeOnBounceEffect.explosionForce = explosionForce; } } public class ExplodingBulletEffect : MonoBehaviour { public float explosionDamage = 55f; public float explosionRange = 3f; public float explosionForce = 2000f; private void Start() { ProjectileHit val = ((Component)this).GetComponentInParent<ProjectileHit>(); if ((Object)(object)val == (Object)null) { val = ((Component)this).GetComponent<ProjectileHit>(); } if ((Object)(object)val != (Object)null) { val.AddHitAction((Action)Explode); } } private void Explode() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) SWIPExplosion.Spawn(((Component)this).transform.position, explosionDamage, explosionRange, explosionForce); } } public class ExplodingBulletSpawner : ProjectileEffectSpawner { public float explosionDamage = 55f; public float explosionRange = 3f; public float explosionForce = 2000f; protected override void ApplyToProjectile(GameObject projectile) { ExplodingBulletEffect explodingBulletEffect = projectile.AddComponent<ExplodingBulletEffect>(); explodingBulletEffect.explosionDamage = explosionDamage; explodingBulletEffect.explosionRange = explosionRange; explodingBulletEffect.explosionForce = explosionForce; } } public class FreezeDamageEffect : MonoBehaviour { public float slowPercent = 0.5f; public float duration = 3f; private float timer; private Rigidbody2D rb; private LineRenderer iceVisual; private float flickerTimer; private void Start() { timer = duration; Player component = ((Component)this).GetComponent<Player>(); if ((Object)(object)component != (Object)null) { rb = ((Component)component).GetComponent<Rigidbody2D>(); } CreateVisual(); } private void CreateVisual() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("FreezeVisual"); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; iceVisual = val.AddComponent<LineRenderer>(); iceVisual.useWorldSpace = false; iceVisual.startWidth = 0.1f; iceVisual.endWidth = 0.1f; iceVisual.loop = true; ((Renderer)iceVisual).material = new Material(Shader.Find("Sprites/Default")); iceVisual.startColor = new Color(0.3f, 0.6f, 1f, 0.6f); iceVisual.endColor = new Color(0.5f, 0.8f, 1f, 0.6f); int positionCount = 6; iceVisual.positionCount = positionCount; UpdateIceShape(1f); } private void UpdateIceShape(float scale) { //IL_0080: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)iceVisual == (Object)null)) { int positionCount = iceVisual.positionCount; float num = 1.2f * scale; for (int i = 0; i < positionCount; i++) { float num2 = (float)i / (float)positionCount * MathF.PI * 2f; float num3 = num * (1f + Mathf.Sin(num2 * 3f + flickerTimer * 2f) * 0.05f); iceVisual.SetPosition(i, new Vector3(Mathf.Cos(num2) * num3, Mathf.Sin(num2) * num3, 0f)); } } } private void FixedUpdate() { //IL_00d2: 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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)rb == (Object)null) { CleanupVisual(); Object.Destroy((Object)(object)this); return; } timer -= Time.fixedDeltaTime; if (timer <= 0f) { CleanupVisual(); Object.Destroy((Object)(object)this); return; } flickerTimer += Time.fixedDeltaTime; UpdateIceShape(1f); if ((Object)(object)iceVisual != (Object)null) { float num = Mathf.Clamp01(timer / duration) * 0.6f; iceVisual.startColor = new Color(0.3f, 0.6f, 1f, num); iceVisual.endColor = new Color(0.5f, 0.8f, 1f, num); } Rigidbody2D obj = rb; obj.velocity *= 1f - slowPercent * Time.fixedDeltaTime; } private void CleanupVisual() { if ((Object)(object)iceVisual != (Object)null) { Object.Destroy((Object)(object)((Component)iceVisual).gameObject); } } private void OnDestroy() { CleanupVisual(); } } public class FreezeEffect : MonoBehaviour { public float slowPercent = 0.5f; public float freezeDuration = 3f; private ProjectileHit projectileHit; private Player owner; private void Start() { projectileHit = ((Component)this).GetComponentInParent<ProjectileHit>(); if ((Object)(object)projectileHit == (Object)null) { projectileHit = ((Component)this).GetComponent<ProjectileHit>(); } if ((Object)(object)projectileHit != (Object)null) { owner = projectileHit.ownPlayer; projectileHit.AddHitAction((Action)ApplyFreeze); } } private void ApplyFreeze() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)this).transform.position), 3f); for (int i = 0; i < array.Length; i++) { Player componentInParent = ((Component)array[i]).GetComponentInParent<Player>(); if ((Object)(object)componentInParent != (Object)null && !componentInParent.data.dead && (Object)(object)componentInParent != (Object)(object)owner) { FreezeDamageEffect freezeDamageEffect = ((Component)componentInParent).gameObject.AddComponent<FreezeDamageEffect>(); freezeDamageEffect.slowPercent = slowPercent; freezeDamageEffect.duration = freezeDuration; } } } } public class FreezeEffectSpawner : ProjectileEffectSpawner { public float slowPercent = 0.5f; public float freezeDuration = 3f; protected override void ApplyToProjectile(GameObject projectile) { FreezeEffect freezeEffect = projectile.AddComponent<FreezeEffect>(); freezeEffect.slowPercent = slowPercent; freezeEffect.freezeDuration = freezeDuration; } } public class GravityAuraEffect : MonoBehaviour { public float radius = 15f; public float strength = 8f; private Player owner; private LineRenderer auraVisual; private float pulseTimer; private void Start() { owner = ((Component)this).GetComponentInParent<Player>(); CreateVisual(); } private void CreateVisual() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("GravityAuraVisual"); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; auraVisual = val.AddComponent<LineRenderer>(); auraVisual.useWorldSpace = false; auraVisual.startWidth = 0.08f; auraVisual.endWidth = 0.08f; auraVisual.loop = true; ((Renderer)auraVisual).material = new Material(Shader.Find("Sprites/Default")); auraVisual.startColor = new Color(0.6f, 0.2f, 0.8f, 0.3f); auraVisual.endColor = new Color(0.6f, 0.2f, 0.8f, 0.3f); int positionCount = 40; auraVisual.positionCount = positionCount; UpdateCircle(radius); } private void UpdateCircle(float r) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)auraVisual == (Object)null)) { int positionCount = auraVisual.positionCount; for (int i = 0; i < positionCount; i++) { float num = (float)i / (float)positionCount * MathF.PI * 2f; auraVisual.SetPosition(i, new Vector3(Mathf.Cos(num) * r, Mathf.Sin(num) * r, 0f)); } } } private void FixedUpdate() { //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_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_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)owner == (Object)null) { return; } pulseTimer += Time.fixedDeltaTime; float num = 1f + Mathf.Sin(pulseTimer * 2f) * 0.05f; UpdateCircle(radius * num); float num2 = 0.2f + Mathf.Sin(pulseTimer * 3f) * 0.1f; if ((Object)(object)auraVisual != (Object)null) { Color val = default(Color); ((Color)(ref val))..ctor(0.6f, 0.2f, 0.8f, num2); auraVisual.startColor = val; auraVisual.endColor = val; } List<Player> players = PlayerManager.instance.players; for (int i = 0; i < players.Count; i++) { Player val2 = players[i]; if (!((Object)(object)val2 == (Object)(object)owner) && !val2.data.dead) { Vector2 val3 = Vector2.op_Implicit(((Component)owner).transform.position) - Vector2.op_Implicit(((Component)val2).transform.position); float magnitude = ((Vector2)(ref val3)).magnitude; if (!(magnitude > radius) && !(magnitude < 0.5f)) { _ = strength; _ = magnitude / radius; Vector2 normalized = ((Vector2)(ref val3)).normalized; float num3 = strength * (1f - magnitude / radius) * Time.fixedDeltaTime; Transform transform = ((Component)val2).transform; transform.position += Vector2.op_Implicit(normalized * num3); } } } } private void OnDestroy() { if ((Object)(object)auraVisual != (Object)null) { Object.Destroy((Object)(object)((Component)auraVisual).gameObject); } } } public class GrowOnBounceEffect : MonoBehaviour { public float growthFactor = 1.5f; private ProjectileHit projectileHit; private Vector3 lastPosition; private Vector3 lastDirection; private bool hasDirection; private float bounceCooldown; private void Start() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) projectileHit = ((Component)this).GetComponentInParent<ProjectileHit>(); if ((Object)(object)projectileHit == (Object)null) { projectileHit = ((Component)this).GetComponent<ProjectileHit>(); } lastPosition = ((Component)this).transform.position; } private void FixedUpdate() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) if (bounceCooldown > 0f) { bounceCooldown -= Time.fixedDeltaTime; } Vector3 position = ((Component)this).transform.position; Vector3 val = position - lastPosition; if (((Vector3)(ref val)).sqrMagnitude > 0.01f) { Vector3 normalized = ((Vector3)(ref val)).normalized; if (hasDirection && bounceCooldown <= 0f && Vector3.Dot(lastDirection, normalized) < 0.7f) { bounceCooldown = 0.15f; Transform transform = ((Component)this).transform; transform.localScale *= growthFactor; if ((Object)(object)projectileHit != (Object)null) { ProjectileHit obj = projectileHit; obj.damage *= growthFactor; } } lastDirection = normalized; hasDirection = true; } lastPosition = position; } } public class GrowOnBounceSpawner : ProjectileEffectSpawner { public float growthFactor = 1.5f; protected override void ApplyToProjectile(GameObject projectile) { projectile.AddComponent<GrowOnBounceEffect>().growthFactor = growthFactor; } } public class HealingMistEffect : MonoBehaviour { public float cloudRadius = 3f; public float cloudDuration = 5f; public float healPerSecond = 15f; public Color outerColor = new Color(0.3f, 0.9f, 0.5f, 0.5f); public Color innerColor = new Color(0.5f, 1f, 0.7f, 0.35f); private Player player; private Block block; private void Start() { player = ((Component)this).GetComponentInParent<Player>(); if (!((Object)(object)player == (Object)null)) { block = ((Component)player).GetComponent<Block>(); if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(obj.BlockAction, new Action<BlockTriggerType>(OnBlock)); } } } private void OnBlock(BlockTriggerType triggerType) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { GameObject val = new GameObject("HealingMist"); val.transform.position = ((Component)player).transform.position; ZoneBehaviour zoneBehaviour = val.AddComponent<ZoneBehaviour>(); zoneBehaviour.radius = cloudRadius; zoneBehaviour.duration = cloudDuration; zoneBehaviour.healPerSecond = healPerSecond; zoneBehaviour.outerColor = outerColor; zoneBehaviour.innerColor = innerColor; } } private void OnDestroy() { if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(obj.BlockAction, new Action<BlockTriggerType>(OnBlock)); } } } public class LaserBeamEffect : MonoBehaviour { public float laserDamage = 55f; public float laserRange = 100f; public float beamDuration = 0.3f; public float beamWidth = 0.5f; public Color beamColor = new Color(1f, 0.2f, 0.2f, 0.9f); public Color beamCoreColor = new Color(1f, 1f, 1f, 1f); private Gun gun; private Player player; private bool hooked; private void Start() { player = ((Component)this).GetComponentInParent<Player>(); TryHookGun(); } private void Update() { if (!hooked) { TryHookGun(); } } private void TryHookGun() { if (!((Object)(object)player == (Object)null)) { Gun val = null; Holding component = ((Component)player).GetComponent<Holding>(); if ((Object)(object)component != (Object)null && (Object)(object)component.holdable != (Object)null) { val = ((Component)component.holdable).GetComponent<Gun>(); } if ((Object)(object)val == (Object)null) { val = ((Component)player).GetComponentInChildren<Gun>(); } if ((Object)(object)val != (Object)null) { gun = val; Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShoot)); hooked = true; } } } private void OnShoot(GameObject projectile) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown //IL_0145: 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_0161: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Expected O, but got Unknown //IL_0193: 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_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_0226: 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_0242: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Expected O, but got Unknown //IL_024f: 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_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Expected O, but got Unknown //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null) { return; } Vector3 position = ((Component)gun).transform.position; Vector3 val = ((Component)gun).transform.forward; MoveTransform component = projectile.GetComponent<MoveTransform>(); if ((Object)(object)component != (Object)null) { val = ((Vector3)(ref component.velocity)).normalized; } Vector2 val2 = Vector2.op_Implicit(position); Vector2 val3 = Vector2.op_Implicit(val); RaycastHit2D val4 = Physics2D.Raycast(val2, val3, laserRange); Vector3 val5 = Vector2.op_Implicit(val2 + val3 * laserRange); if ((Object)(object)((RaycastHit2D)(ref val4)).collider != (Object)null) { val5 = Vector2.op_Implicit(((RaycastHit2D)(ref val4)).point); Player componentInParent = ((Component)((RaycastHit2D)(ref val4)).collider).GetComponentInParent<Player>(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)player && !componentInParent.data.dead) { ((Damagable)componentInParent.data.healthHandler).TakeDamage(Vector2.up * laserDamage, ((RaycastHit2D)(ref val4)).point, (GameObject)null, (Player)null, true, false); } } GameObject val6 = new GameObject("LaserBeam"); LineRenderer val7 = val6.AddComponent<LineRenderer>(); val7.startWidth = beamWidth * 2.5f; val7.endWidth = beamWidth * 2.5f; val7.positionCount = 2; val7.SetPosition(0, position); val7.SetPosition(1, val5); ((Renderer)val7).material = new Material(Shader.Find("Sprites/Default")); val7.startColor = new Color(beamColor.r, beamColor.g, beamColor.b, 0.15f); val7.endColor = new Color(beamColor.r, beamColor.g, beamColor.b, 0.1f); ((Renderer)val7).sortingOrder = 9; GameObject val8 = new GameObject("LaserMain"); val8.transform.SetParent(val6.transform); LineRenderer val9 = val8.AddComponent<LineRenderer>(); val9.startWidth = beamWidth; val9.endWidth = beamWidth * 0.9f; val9.positionCount = 2; val9.SetPosition(0, position); val9.SetPosition(1, val5); ((Renderer)val9).material = new Material(Shader.Find("Sprites/Default")); val9.startColor = beamColor; val9.endColor = new Color(beamColor.r, beamColor.g, beamColor.b, beamColor.a * 0.7f); ((Renderer)val9).sortingOrder = 10; GameObject val10 = new GameObject("LaserCore"); val10.transform.SetParent(val6.transform); LineRenderer val11 = val10.AddComponent<LineRenderer>(); val11.startWidth = beamWidth * 0.35f; val11.endWidth = beamWidth * 0.25f; val11.positionCount = 2; val11.SetPosition(0, position); val11.SetPosition(1, val5); ((Renderer)val11).material = new Material(Shader.Find("Sprites/Default")); val11.startColor = beamCoreColor; val11.endColor = new Color(1f, 1f, 1f, 0.8f); ((Renderer)val11).sortingOrder = 11; LaserFader laserFader = val6.AddComponent<LaserFader>(); laserFader.duration = beamDuration; laserFader.glowRenderer = val7; laserFader.outerRenderer = val9; laserFader.innerRenderer = val11; } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShoot)); } } } public class LaserFader : MonoBehaviour { public float duration = 0.3f; public LineRenderer glowRenderer; public LineRenderer outerRenderer; public LineRenderer innerRenderer; private float timer; private void Start() { timer = duration; } private void Update() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0107: 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_015b: Unknown result type (might be due to invalid IL or missing references) timer -= Time.deltaTime; if (timer <= 0f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } float num = timer / duration; if ((Object)(object)glowRenderer != (Object)null) { Color startColor = glowRenderer.startColor; glowRenderer.startColor = new Color(startColor.r, startColor.g, startColor.b, num * 0.15f); glowRenderer.endColor = new Color(startColor.r, startColor.g, startColor.b, num * 0.1f); } if ((Object)(object)outerRenderer != (Object)null) { Color startColor2 = outerRenderer.startColor; outerRenderer.startColor = new Color(startColor2.r, startColor2.g, startColor2.b, num * 0.9f); outerRenderer.endColor = new Color(startColor2.r, startColor2.g, startColor2.b, num * 0.6f); } if ((Object)(object)innerRenderer != (Object)null) { innerRenderer.startColor = new Color(1f, 1f, 1f, num); innerRenderer.endColor = new Color(1f, 1f, 1f, num * 0.8f); } } } public class MissileBarrageEffect : MonoBehaviour { public int missileCount = 3; public float missileDamage = 25f; public float missileSpeed = 20f; public float missileLifetime = 5f; public float explosionRange = 2.5f; public float explosionForce = 1500f; private Gun gun; private Player player; private bool hooked; private int lastShotFrame = -1; private void Start() { player = ((Component)this).GetComponentInParent<Player>(); TryHookGun(); } private void Update() { if (!hooked) { TryHookGun(); } } private void TryHookGun() { if (!((Object)(object)player == (Object)null)) { Gun val = null; Holding component = ((Component)player).GetComponent<Holding>(); if ((Object)(object)component != (Object)null && (Object)(object)component.holdable != (Object)null) { val = ((Component)component.holdable).GetComponent<Gun>(); } if ((Object)(object)val == (Object)null) { val = ((Component)player).GetComponentInChildren<Gun>(); } if ((Object)(object)val != (Object)null) { gun = val; Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShoot)); hooked = true; } } } private void OnShoot(GameObject projectile) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: 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_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null) { return; } int frameCount = Time.frameCount; if (frameCount != lastShotFrame) { lastShotFrame = frameCount; for (int i = 0; i < missileCount; i++) { GameObject val = new GameObject("Missile"); val.transform.position = ((Component)player).transform.position + new Vector3(Random.Range(-1f, 1f), Random.Range(0.5f, 2f), 0f); Rigidbody2D obj = val.AddComponent<Rigidbody2D>(); obj.gravityScale = 0f; obj.mass = 0.1f; obj.collisionDetectionMode = (CollisionDetectionMode2D)1; CircleCollider2D obj2 = val.AddComponent<CircleCollider2D>(); obj2.radius = 0.15f; ((Collider2D)obj2).isTrigger = true; LineRenderer obj3 = val.AddComponent<LineRenderer>(); obj3.useWorldSpace = false; obj3.startWidth = 0.12f; obj3.endWidth = 0.04f; obj3.positionCount = 2; obj3.SetPosition(0, Vector3.zero); obj3.SetPosition(1, new Vector3(0f, -0.3f, 0f)); ((Renderer)obj3).material = new Material(Shader.Find("Sprites/Default")); obj3.startColor = new Color(1f, 0.9f, 0.7f, 1f); obj3.endColor = new Color(1f, 0.5f, 0.1f, 0.9f); ((Renderer)obj3).sortingOrder = 5; GameObject val2 = new GameObject("Exhaust"); val2.transform.SetParent(val.transform); val2.transform.localPosition = Vector3.zero; TrailRenderer obj4 = val2.AddComponent<TrailRenderer>(); obj4.time = 0.4f; obj4.startWidth = 0.12f; obj4.endWidth = 0f; ((Renderer)obj4).material = new Material(Shader.Find("Sprites/Default")); obj4.startColor = new Color(1f, 0.4f, 0f, 0.7f); obj4.endColor = new Color(1f, 0.2f, 0f, 0f); ((Renderer)obj4).sortingOrder = 4; obj4.minVertexDistance = 0.1f; MissileHomingBehaviour missileHomingBehaviour = val.AddComponent<MissileHomingBehaviour>(); missileHomingBehaviour.owner = player; missileHomingBehaviour.speed = missileSpeed; missileHomingBehaviour.damage = missileDamage; missileHomingBehaviour.lifetime = missileLifetime; missileHomingBehaviour.explosionRange = explosionRange; missileHomingBehaviour.explosionForce = explosionForce; } } } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShoot)); } } } public class MissileHomingBehaviour : MonoBehaviour { public Player owner; public float speed = 15f; public float damage = 25f; public float lifetime = 5f; public float explosionRange = 2.5f; public float explosionForce = 1500f; public float steerStrength = 10f; public float hitRadius = 1.5f; public float graceTime = 0.3f; private float timer; private float graceTimer; private bool exploded; private Rigidbody2D rb; private LineRenderer lr; private void Start() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) timer = lifetime; graceTimer = graceTime; rb = ((Component)this).GetComponent<Rigidbody2D>(); lr = ((Component)this).GetComponent<LineRenderer>(); if ((Object)(object)rb != (Object)null) { rb.velocity = Vector2.up * speed * 0.5f; } } private void FixedUpdate() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) timer -= Time.fixedDeltaTime; if (graceTimer > 0f) { graceTimer -= Time.fixedDeltaTime; } if (timer <= 0f) { Explode(); return; } Player val = FindClosestEnemy(); if ((Object)(object)val == (Object)null || (Object)(object)rb == (Object)null) { return; } Vector2 val2 = Vector2.op_Implicit(((Component)val).transform.position) - Vector2.op_Implicit(((Component)this).transform.position); Vector2 normalized = ((Vector2)(ref val2)).normalized; Rigidbody2D obj = rb; val2 = rb.velocity; obj.velocity = Vector2.Lerp(((Vector2)(ref val2)).normalized, normalized, Time.fixedDeltaTime * steerStrength) * speed; if ((Object)(object)lr != (Object)null) { val2 = rb.velocity; if (((Vector2)(ref val2)).sqrMagnitude > 0.1f) { val2 = rb.velocity; Vector3 val3 = Vector2.op_Implicit(-((Vector2)(ref val2)).normalized) * 0.4f; lr.SetPosition(1, val3); } } if (Vector2.Distance(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(((Component)val).transform.position)) < hitRadius) { Explode(); } } private void OnTriggerEnter2D(Collider2D other) { if ((Object)(object)((Component)other).GetComponent<MissileHomingBehaviour>() != (Object)null) { return; } Player componentInParent = ((Component)other).GetComponentInParent<Player>(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)owner != (Object)null && componentInParent.teamID == owner.teamID) { return; } if (graceTimer > 0f) { ProjectileHit val = ((Component)other).GetComponent<ProjectileHit>(); if ((Object)(object)val == (Object)null) { val = ((Component)other).GetComponentInParent<ProjectileHit>(); } if ((Object)(object)val != (Object)null) { return; } } Explode(); } private void Explode() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) if (exploded) { return; } exploded = true; Vector3 position = ((Component)this).transform.position; SWIPExplosion.Spawn(position, damage, explosionRange, explosionForce, owner, SWIPExplosion.MissileColors); if ((Object)(object)owner != (Object)null) { CloudEffectSpawner[] componentsInChildren = ((Component)owner).GetComponentsInChildren<CloudEffectSpawner>(); foreach (CloudEffectSpawner cloudEffectSpawner in componentsInChildren) { GameObject val = new GameObject("Zone"); val.transform.position = position; ZoneBehaviour zoneBehaviour = val.AddComponent<ZoneBehaviour>(); zoneBehaviour.radius = cloudEffectSpawner.cloudRadius; zoneBehaviour.duration = cloudEffectSpawner.cloudDuration; zoneBehaviour.damagePerSecond = cloudEffectSpawner.damagePerSecond; zoneBehaviour.healPerSecond = cloudEffectSpawner.healPerSecond; zoneBehaviour.slowAmount = cloudEffectSpawner.slowAmount; zoneBehaviour.outerColor = cloudEffectSpawner.outerColor; zoneBehaviour.innerColor = cloudEffectSpawner.innerColor; zoneBehaviour.owner = owner; zoneBehaviour.affectsOwner = cloudEffectSpawner.affectsOwner; } } Object.Destroy((Object)(object)((Component)this).gameObject); } private Player FindClosestEnemy() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) Player result = null; float num = float.MaxValue; foreach (Player player in PlayerManager.instance.players) { if (!((Object)(object)player == (Object)(object)owner) && !player.data.dead && (!((Object)(object)owner != (Object)null) || player.teamID != owner.teamID)) { float num2 = Vector2.Distance(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(((Component)player).transform.position)); if (num2 < num) { num = num2; result = player; } } } return result; } } public class SatelliteLaserEffect : MonoBehaviour { public float laserDamage = 70f; public float laserWidth = 0.8f; private Player player; private Block block; private bool blockHooked; private void Start() { player = ((Component)this).GetComponentInParent<Player>(); if ((Object)(object)player != (Object)null) { TryHookBlock(); } } private void Update() { if (!blockHooked) { TryHookBlock(); } } private void TryHookBlock() { if (!((Object)(object)player == (Object)null)) { Block val = ((Component)player).GetComponent<Block>(); if ((Object)(object)val == (Object)null) { val = ((Component)player).GetComponentInChildren<Block>(); } if ((Object)(object)val != (Object)null) { block = val; Block obj = block; obj.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(obj.BlockAction, new Action<BlockTriggerType>(OnBlock)); blockHooked = true; } } } private void OnBlock(BlockTriggerType triggerType) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { FireLaser(((Component)player).transform.position.x); } } private void FireLaser(float targetX) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) float num = 30f; if ((Object)(object)Camera.main != (Object)null) { num = Camera.main.ViewportToWorldPoint(new Vector3(0.5f, 1f, 0f)).y + 5f; } Vector2 val = new Vector2(targetX, num); float bottomY = num; RaycastHit2D[] array = Physics2D.RaycastAll(val, Vector2.down, num * 2f); Array.Sort(array, (RaycastHit2D a, RaycastHit2D b) => ((RaycastHit2D)(ref a)).distance.CompareTo(((RaycastHit2D)(ref b)).distance)); bool flag = false; RaycastHit2D[] array2 = array; for (int i = 0; i < array2.Length; i++) { RaycastHit2D val2 = array2[i]; if (flag) { break; } if ((Object)(object)((Component)((RaycastHit2D)(ref val2)).collider).GetComponent<ProjectileHit>() != (Object)null || (Object)(object)((Component)((RaycastHit2D)(ref val2)).collider).GetComponentInParent<ProjectileHit>() != (Object)null) { continue; } Player componentInParent = ((Component)((RaycastHit2D)(ref val2)).collider).GetComponentInParent<Player>(); if ((Object)(object)componentInParent != (Object)null) { if (!((Object)(object)componentInParent == (Object)(object)player) && componentInParent.teamID != player.teamID && !componentInParent.data.dead) { ((Damagable)componentInParent.data.healthHandler).TakeDamage(Vector2.down * laserDamage, ((RaycastHit2D)(ref val2)).point, (GameObject)null, (Player)null, true, false); } continue; } Damagable component = ((Component)((RaycastHit2D)(ref val2)).collider).GetComponent<Damagable>(); if ((Object)(object)component != (Object)null) { component.CallTakeDamage(Vector2.down * laserDamage * 2f, ((RaycastHit2D)(ref val2)).point, (GameObject)null, (Player)null, true); continue; } bottomY = ((RaycastHit2D)(ref val2)).point.y; flag = true; } if (!flag) { float num2 = -30f; if ((Object)(object)Camera.main != (Object)null) { num2 = Camera.main.ViewportToWorldPoint(new Vector3(0.5f, 0f, 0f)).y - 5f; } bottomY = num2; } GameObject val3 = new GameObject("SatelliteLaser"); val3.transform.position = new Vector3(targetX, 0f, 0f); SatelliteLaserVisual satelliteLaserVisual = val3.AddComponent<SatelliteLaserVisual>(); satelliteLaserVisual.topY = num; satelliteLaserVisual.bottomY = bottomY; satelliteLaserVisual.laserWidth = laserWidth; satelliteLaserVisual.targetX = targetX; } private void OnDestroy() { if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(obj.BlockAction, new Action<BlockTriggerType>(OnBlock)); } } } public class SatelliteLaserVisual : MonoBehaviour { public float topY; public float bottomY; public float laserWidth = 0.8f; public float targetX; public float duration = 0.15f; private float timer; private LineRenderer beam; private LineRenderer glow; private void Start() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Expected O, but got Unknown //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) beam = ((Component)this).gameObject.AddComponent<LineRenderer>(); beam.useWorldSpace = true; beam.startWidth = laserWidth; beam.endWidth = laserWidth * 0.6f; beam.positionCount = 2; beam.SetPosition(0, new Vector3(targetX, topY, 0f)); beam.SetPosition(1, new Vector3(targetX, bottomY, 0f)); ((Renderer)beam).material = new Material(Shader.Find("Sprites/Default")); beam.startColor = new Color(1f, 0.15f, 0.05f, 1f); beam.endColor = new Color(0.8f, 0.05f, 0f, 0.8f); ((Renderer)beam).sortingOrder = 12; GameObject val = new GameObject("Glow"); val.transform.SetParent(((Component)this).transform); glow = val.AddComponent<LineRenderer>(); glow.useWorldSpace = true; glow.startWidth = laserWidth * 2f; glow.endWidth = laserWidth * 1.5f; glow.positionCount = 2; glow.SetPosition(0, new Vector3(targetX, topY, 0f)); glow.SetPosition(1, new Vector3(targetX, bottomY, 0f)); ((Renderer)glow).material = new Material(Shader.Find("Sprites/Default")); glow.startColor = new Color(1f, 0.2f, 0.1f, 0.25f); glow.endColor = new Color(0.8f, 0.1f, 0f, 0.1f); ((Renderer)glow).sortingOrder = 11; } private void Update() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) timer += Time.deltaTime; float num = timer / duration; if (num >= 1f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } float num2 = 1f - num; beam.startColor = new Color(1f, 0.15f, 0.05f, num2); beam.endColor = new Color(0.8f, 0.05f, 0f, 0.8f * num2); glow.startColor = new Color(1f, 0.2f, 0.1f, 0.25f * num2); glow.endColor = new Color(0.8f, 0.1f, 0f, 0.1f * num2); } } public abstract class ProjectileEffectSpawner : MonoBehaviour { private Gun gun; private bool hooked; private void Start() { TryHookGun(); } private void Update() { if (!hooked) { TryHookGun(); } } private void TryHookGun() { Player componentInParent = ((Component)this).GetComponentInParent<Player>(); if (!((Object)(object)componentInParent == (Object)null)) { Gun val = null; Holding component = ((Component)componentInParent).GetComponent<Holding>(); if ((Object)(object)component != (Object)null && (Object)(object)component.holdable != (Object)null) { val = ((Component)component.holdable).GetComponent<Gun>(); } if ((Object)(object)val == (Object)null) { val = ((Component)componentInParent).GetComponentInChildren<Gun>(); } if ((Object)(object)val != (Object)null) { gun = val; Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnProjectileSpawned)); hooked = true; } } } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnProjectileSpawned)); } } private void OnProjectileSpawned(GameObject projectile) { ApplyToProjectile(projectile); } protected abstract void ApplyToProjectile(GameObject projectile); } public class ScorchedSkySpawner : MonoBehaviour { public int projectileCount = 5; public float spreadWidth = 6f; public float fallSpeed = 40f; public float projectileDamage = 25f; public float explosionRange = 2f; public float explosionForce = 1500f; public int bounces; private Gun gun; private Player player; private bool hooked; private void Start() { player = ((Component)this).GetComponentInParent<Player>(); TryHookGun(); } private void Update() { if (!hooked) {