void Update()
 {
     if (GameHandler.inventory.items.Contains(item1) && GameHandler.inventory.items.Contains(item2))
     {
         ifEvent.Invoke();
     }
 }
예제 #2
0
 private void OnMouseUpAsButton()
 {
     if (!locked)
     {
         ifEvent.Invoke();
     }
 }
예제 #3
0
    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();
        }
    }