예제 #1
0
    protected void EnableWorkshop(bool state)
    {
        MTK_Interactable current = m_dropzone.catchedObject;

        OnWorkshopUpdateState(state, current);

        if (state)
        {
            m_sound.Post(gameObject);
            current.isDistanceGrabbable = false;
            current.IndexJointUsed      = 1;

            current.jointType.onJointBreak.AddListener(() => Destroy(m_confJoint));
            current.isGrabbable = false;

            m_catchedObjectJoint = current.jointType;

            StartCoroutine(AnimateWorkshop(2, () =>
            {
                current.isGrabbable = true;
                m_dropzone.EnableButton();
            }));
        }
        else
        {
            current.IndexJointUsed      = 0;
            current.isDistanceGrabbable = true;

            m_catchedObjectJoint = null;
        }
    }
예제 #2
0
 void EnableButton()
 {
     m_dropzone.EnableButton();
 }