Exemple #1
0
    private bool TryHandleShortPressAction(GameObject inteactiveObject)
    {
        if (!CanHandleShortPressAction(inteactiveObject))
        {
            return(false);
        }

        if ((carryingItem == null) || (inteactiveObject != null && inteactiveObject.GetComponent <BuildingBase>() != null))
        {
            InteractiveObject item = inteactiveObject.GetComponent <InteractiveObject>();
            interactingItem = item;
            return(item.InteractAction(this));
        }

        return(carryingItem.DefaultShortPressAction(this));
    }