Esempio n. 1
0
        public static void AddDelegates(BloonManager bloonManager)
        {
            foreach (Mod mod in ModLoader.Mods)
                foreach (Type type in mod.Code.GetTypes())
                    if (type.IsSubclassOf(typeof(GlobalBloon)))
                    {
                        GlobalBloon global = Activator.CreateInstance(type) as GlobalBloon;

                        bloonManager.OnBloonLeaked.delegates.Add(new Il2CppSystem.Delegate(new IntPtr(global.OnBloonLeaked() *));
                        bloonManager.OnBloonDegrade.delegates.Add(global.OnBloonDegrade());
                        bloonManager.OnBloonSpawned.delegates.Add(global.OnBloonSpawned());
                    }
        }
Esempio n. 2
0
 public static void PostCtor(BloonManager __instance) => BloonHooks.AddDelegates(__instance);