Beispiel #1
0
    //When the object is let go, stop dragging it
    private void OnMouseUp()
    {
        OnDropped?.Invoke(this);
        xzabb.ClearCheckAgainst();

        isPickedUp = false;

        if (prospectivePL != currentPL)
        {
            prospectivePL.PlacePickUpable(this);
            currentPL.RemovePickUpable(this);
            currentPL = prospectivePL;
        }
        else
        {
            transform.localPosition = Vector3.zero;
        }
    }