Beispiel #1
0
    private void OnIngredientPickedUp(object data)
    {
        SO_UIMinionSlot ingredientSlot = (SO_UIMinionSlot)data;

        if (ingredientSlot != _UISlotData)
        {
            return;
        }
        _CollectedIngredientEvent.Invoke();
    }
Beispiel #2
0
    private void OnCollectedIngredient(object data)
    {
        SO_UIMinionSlot slot = (SO_UIMinionSlot)data;

        if (State == CookingStationState.AVAILABLE || State == CookingStationState.NOT_VISIBLE_TO_LOCAL_PLAYER)
        {
            if (CheckIfTheIngredientsInInventoryAreCompatible())
            {
                State = CookingStationState.AVAILABLE;
                _CompatibleIngredientCollectedEvent.Invoke();
            }
            else
            {
                State = CookingStationState.NOT_VISIBLE_TO_LOCAL_PLAYER;
            }
        }
        _CookingStationUI.UpdateUI();
    }