public static void AddItemCollectedListener(UnityAction listener) { itemCollectedListener = listener; if (itemCollectedInvoker != null) { itemCollectedInvoker.AddItemCollectedListener(listener); } }
/// <summary> /// This event is being used to update the UI when an Item (scrap) /// is collected. Will update the text of the specific item collected /// </summary> /// <param name="invoker"></param> public static void AddItemCollectedInvoker(ItemDrop invoker) { itemCollectedInvoker = invoker; if (itemCollectedListener != null) { invoker.AddItemCollectedListener(itemCollectedListener); } }