示例#1
0
    private void OnBeginDrag()
    {
        if (dragger.dragItem != null)
        {
            return;
        }
        GameObject copy = Instantiate(gameObject, transform.position, Quaternion.identity, action.transform.parent.parent.parent.parent);

        copy.GetComponent <Image>().raycastTarget = false;

        dragger.SetDragItem(copy);
    }
示例#2
0
    private void OnBeginDrag()
    {
        if (dragger.dragItem != null)
        {
            return;
        }
        Debug.Log("BeginDrag");
        GameObject copy = Instantiate(gameObject, transform.position, Quaternion.identity, action.transform.parent.parent.parent.parent);

        copy.GetComponent <RecipeHolder>().picture.raycastTarget = false;
        copy.transform.SetParent(canvas.transform);
        SetDescription();
        dragger.SetDragItem(copy);
        GameController.instance.audio.MakeSound(onSelectSound);
        if (anim != null)
        {
            anim.Play("CraftRecipe_Select");
        }
    }