put cola in basket
This commit is contained in:
@@ -8,14 +8,14 @@ public class ColaFreezer : BaseInteractableObject
|
||||
|
||||
public override void Interact(Player player)
|
||||
{
|
||||
//if (!player.IsHoldContainer())
|
||||
//{
|
||||
// //player.BuyObject(_sellableItemSO);
|
||||
// // Spawn new object and set to player
|
||||
// var transform = Instantiate(_sellableItemSO.prefab, _playerArrivePoint);
|
||||
// var foodObject = transform.GetComponent<FoodItem>();
|
||||
// player.SetFoodObject(foodObject);
|
||||
//}
|
||||
if (player.IsHoldContainerItem())
|
||||
{
|
||||
var transform = Instantiate(_sellableItemSO.prefab, player.GetContainerItem().transform);
|
||||
var sellableItem = transform.GetComponent<SellableItem>();
|
||||
|
||||
var container = player.GetContainerItem();
|
||||
container.AddItem(sellableItem);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user