Fixed Item swap
This commit is contained in:
parent
dfe1451d3b
commit
40b2ab5bde
|
@ -82,7 +82,7 @@ public class Character : MonoBehaviour
|
||||||
|
|
||||||
public void PickupItem(PickupInteractible itemToPickup)
|
public void PickupItem(PickupInteractible itemToPickup)
|
||||||
{
|
{
|
||||||
if (_carriedItemModel)
|
if (_carriedInteractible)
|
||||||
{
|
{
|
||||||
_carriedInteractible.gameObject.SetActive(true);
|
_carriedInteractible.gameObject.SetActive(true);
|
||||||
_carriedInteractible.transform.parent = null;
|
_carriedInteractible.transform.parent = null;
|
||||||
|
@ -107,6 +107,7 @@ public class Character : MonoBehaviour
|
||||||
itemToPickup.transform.parent = model.transform;
|
itemToPickup.transform.parent = model.transform;
|
||||||
itemToPickup.gameObject.SetActive(false);
|
itemToPickup.gameObject.SetActive(false);
|
||||||
|
|
||||||
|
_carriedItemModel = model;
|
||||||
_carriedInteractible = itemToPickup;
|
_carriedInteractible = itemToPickup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue