void Awake() { m_agent = GetComponent <NavMeshAgent>(); m_Rigidbodies = GetComponentsInChildren <Rigidbody>(); m_animator = GetComponent <Animator>(); m_BehaviourTree = GetComponent <BehaviorTree>(); inventory = GetComponent <IInventory>(); quickSlots = GetComponent <IQuickSlots>(); ToggleRagdoll(true); }
private void Awake() { if (m_WeaponInventory == null) { m_WeaponInventory = GetComponent <IQuickSlots>(); } //Setup the Weapon Watcher / Hooks m_WeaponInventory.onSelectionChanged += OnWeaponChanged; //weaponSlots.onSlotItemChanged //weaponSlots.onItemDropped // Maybe remove Inventory Stuff?? if (m_WeaponInventory is IInventory inventory) { //inventory.onItemAdded //inventory.onItemRemoved } }
public static void Postfix(uGUI_QuickSlots __instance) { if (QuickSlotsUpdateTarget == null || __instance == null) { return; } try { AccessTools .Method(typeof(uGUI_QuickSlots), "Init", new Type[] { typeof(IQuickSlots) }) .Invoke(__instance, new object[] { QuickSlotsUpdateTarget }); } catch (Exception ex) { Logger.Log("Exception during uGUI_QuickSlots_HarmonyPatch.PostFix"); throw ex; } finally { QuickSlotsUpdateTarget = null; } }