|
@@ -58,7 +58,7 @@ public class Trans_Cook : MonoBehaviour
|
|
|
private void BottleMove()
|
|
private void BottleMove()
|
|
|
{
|
|
{
|
|
|
curBottle.transform.position += new Vector3(dir * speed * Time.deltaTime, 0, 0);
|
|
curBottle.transform.position += new Vector3(dir * speed * Time.deltaTime, 0, 0);
|
|
|
- if (dir == 1 && curBottle.transform.position.x >= maxDis || dir == -1 && curBottle.transform.position.x <= -maxDis)
|
|
|
|
|
|
|
+ if (curBottle.GetComponent<Rigidbody>().velocity.y <= -throwForceUp.y)
|
|
|
{
|
|
{
|
|
|
curBottle.SetActive(false);
|
|
curBottle.SetActive(false);
|
|
|
isThrow = false;
|
|
isThrow = false;
|