private void CheckItemExists(int arg1) { for (int i = 0; i < itemIDEvents.Count; i++) { CheckItemIDEvent check = itemIDEvents[i]; CheckItemID(check); } }
private void CheckItemID(CheckItemIDEvent check) { if (check.Check(itemManager)) { check.onContainItem.Invoke(); } else { check.onNotContainItem.Invoke(); } }
private void CheckIsEquipped(vEquipArea arg0, vItem arg1) { for (int i = 0; i < itemIDEvents.Count; i++) { CheckItemIDEvent check = itemIDEvents[i]; CheckItemID(check); } for (int i = 0; i < itemTypeEvents.Count; i++) { CheckItemTypeEvent check = itemTypeEvents[i]; CheckItemType(check); } }
public void CheckOnTrigger(Collider collider) { if (collider != null) { itemManager = collider.gameObject.GetComponent <vItemManager>(); if (itemManager) { for (int i = 0; i < itemIDEvents.Count; i++) { CheckItemIDEvent check = itemIDEvents[i]; CheckItemID(check); } } } }
private void CheckItemID(CheckItemIDEvent check) { bool _isEquipped = check._itemsID.Exists(t => itemManager.ItemIsEquipped(t)); if (_isEquipped != check.isEquipped) { check.isEquipped = _isEquipped; if (check.isEquipped) { check.onIsItemEquipped.Invoke(); } else { check.onIsItemUnequipped.Invoke(); } } }