Beispiel #1
0
        public void Start()
        {
            try
            {
                RuntimePatcher.AutoPatch();

                Plugin.Init();
                Events.Managers.GameManagerLoaded.Subscribe(OnGameManagerLoaded);

                EventSubscriber.SubscribeAll();
            }
            catch (Exception e)
            {
                Plugin.Log.Exception(e);
            }
        }
Beispiel #2
0
        public void Initialize(IManager manager, string ipcIdentifier)
        {
            Manager = manager;
            try
            {
                HarmonyInstance Harmony = HarmonyInstance.Create(MOD_ID);
                Harmony.PatchAll(Assembly.GetExecutingAssembly());

                Plugin.Init();
                Plugin.LoadCampaigns();

                EventSubscriber.SubscribeAll();
            }
            catch (Exception e)
            {
                Plugin.Log.Exception(e);
            }
        }