コード例 #1
0
    void FinishView()
    {
        canFinish = false;
        isViewing = false;
        UIManager.instance.SetBackImage(false);

        if (currentItem.inventoryItem)
        {
            inventory.AddItem(currentItem);
            audioPlayer.PlayAudio(writingSound);
            currentInteractable.CollectItem.Invoke();
        }
        if (currentItem.grabbable)
        {
            currentInteractable.transform.rotation = originRotation;
            StartCoroutine(MovingObject(currentInteractable, originPosition));
        }

        if (currentItem.requiredItem)
        {
            inventory.AddRequiredItens(currentItem);
        }

        OnFinishView.Invoke();
    }