Beispiel #1
0
    void SwitchObject()
    {
        MovableInteractable lSwitchObject = hooverObject.GetComponent <MovableInteractable>();

        holdingObject.PutObject(lSwitchObject.putLocation);
        lSwitchObject.putLocation = null;
        TakeObject(lSwitchObject);
    }
Beispiel #2
0
    void SwitchPosition(MovableInteractable pObject)
    {
        transform.position = pObject.transform.position;
        putLocation        = pObject.putLocation;
        putLocation.gameObject.SetActive(false);
        _isHolding = false;

        pObject.GetComponent <MovableInteractable>().putLocation = null;
        pObject.GetComponent <MovableInteractable>().SetModeHolding();
    }
Beispiel #3
0
    void DoLockInteraction()
    {
        if (!holdingObject.GetComponent <Key>())
        {
            return;
        }

        holdingObject.GetComponent <Key>().Unlock();
        hooverObject.GetComponent <Lock>().Unlock();

        holdingObject = null;
    }
Beispiel #4
0
    void TakeObject(MovableInteractable pObject = null)
    {
        if (pObject == null)
        {
            holdingObject = hooverObject.GetComponent <MovableInteractable>();
        }
        else
        {
            holdingObject = pObject;
        }

        holdingObject.SetInteractionMode();
    }
Beispiel #5
0
 void DoPutInteraction(PutInteractable pFreeSpace)
 {
     holdingObject.PutObject(pFreeSpace);
     holdingObject = null;
 }