void Update() { if (GameHandler.inventory.items.Contains(item1) && GameHandler.inventory.items.Contains(item2)) { ifEvent.Invoke(); } }
private void OnMouseUpAsButton() { if (!locked) { ifEvent.Invoke(); } }
void Update() { bool runEvent = defaultItem && GameHandler.inventory.hiddenItems.Contains(item); runEvent |= !defaultItem && GameHandler.inventory.items.Contains(item); if (runEvent) { GameHandler.persistencyManager.SetHasItem(gameObject, true); enabled = false; ifEvent.Invoke(); } }