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

        holdingObject.PutObject(lSwitchObject.putLocation);
        lSwitchObject.putLocation = null;
        TakeObject(lSwitchObject);
    }
Exemple #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();
    }
Exemple #3
0
    void DoLockInteraction()
    {
        if (!holdingObject.GetComponent <Key>())
        {
            return;
        }

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

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

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