Add simple fridge logic
This commit is contained in:
@@ -120,23 +120,6 @@ public class Player : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void SetFoodObject(FoodObject foodObject)
|
||||
{
|
||||
foodObject.transform.parent = _holdPoint;
|
||||
foodObject.transform.localPosition = Vector3.zero;
|
||||
_foodObject = foodObject;
|
||||
Debug.Log($"player hold {foodObject.GetFoodObjectSO().name}");
|
||||
|
||||
}
|
||||
public FoodObject GetFoodObject()
|
||||
{
|
||||
return _foodObject;
|
||||
}
|
||||
public void ClearFoodObject()
|
||||
{
|
||||
_foodObject = null;
|
||||
}
|
||||
|
||||
private TaskStatus MoveToPoint()
|
||||
{
|
||||
SetPlayerAnimation(AnimationStates.Walking);
|
||||
@@ -257,4 +240,27 @@ public class Player : MonoBehaviour
|
||||
return attr != null;
|
||||
}
|
||||
|
||||
|
||||
public void SetFoodObject(FoodObject foodObject)
|
||||
{
|
||||
foodObject.transform.parent = _holdPoint;
|
||||
foodObject.transform.localPosition = Vector3.zero;
|
||||
_foodObject = foodObject;
|
||||
Debug.Log($"player hold {foodObject.GetFoodObjectSO().name}");
|
||||
|
||||
}
|
||||
public FoodObject GetFoodObject()
|
||||
{
|
||||
return _foodObject;
|
||||
}
|
||||
public void ClearFoodObject()
|
||||
{
|
||||
Destroy(_foodObject.gameObject);
|
||||
_foodObject = null;
|
||||
}
|
||||
|
||||
public bool HasFoodObject()
|
||||
{
|
||||
return _foodObject != null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user