/// <summary> /// Called after the class has been constructed. /// </summary> public override void Initialize() { //Assign the Instance to the instantiated mod. Instance = this; Log("Initializing"); //Here we are hooking into the AttackHook so we can modify the damage for the attack. ModHooks.Instance.AttackHook += OnAttack; //Here want to hook into the AfterAttackHook to do something at the end of the attack animation. ModHooks.Instance.AfterAttackHook += OnAfterAttack; Log("Initialized"); }
/// <summary> /// Called after the class has been constructed. /// </summary> public override void Initialize() { //Assign the Instance to the instantiated mod. Instance = this; UnityEngine.SceneManagement.SceneManager.activeSceneChanged += OnSceneChanged; ab = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "scene")); ab2 = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "assetsofbundle")); Log("Initializing"); ModHooks.Instance.NewGameHook += NewGame; ModHooks.Instance.SavegameLoadHook += SaveGameLoad; Log("Initialized"); }