示例#1
0
    public virtual bool TryPickUp(AttachmentCarrier attachmentCarrier)
    {
        if (IsCarried)
        {
            return(false);
        }

        IsCarried               = true;
        transform.parent        = attachmentCarrier.transform;
        transform.localPosition = Vector3.zero;
        return(true);
    }
示例#2
0
    public bool TryPickUp(AttachmentCarrier attachmentCarrier)
    {
        if (IsCarried)
        {
            return(false);
        }

        foreach (var attachable in attachables)
        {
            attachable.OnDetach();
        }

        attachedTo.attachedThing = null;
        attachedTo              = null;
        transform.parent        = attachmentCarrier.transform;
        transform.localPosition = Vector3.zero;

        return(true);
    }
示例#3
0
 public abstract bool TryPutDown(AttachmentCarrier attachmentCarrier);