// Update is called once per frame void Update() { velocityHandRight = scriptVelocity.CalculateVelocity(scriptBodySourceView.manoDer, positionsListRight); velocityHandLeft = scriptVelocity.CalculateVelocity(scriptBodySourceView.manoIzk, positionsListLeft); if (velocityHandRight.x > 10 || velocityHandRight.x < -10) { tableMovScript.speed += 0.001f; if (tableMovScript.speed > 0.080f) { tableMovScript.speed = 0.080f; } } if (velocityHandLeft.x > 10 || velocityHandLeft.x < -10) { tableMovScript.speed += 0.001f; if (tableMovScript.speed > 0.080f) { tableMovScript.speed = 0.080f; } } }
// Update is called once per frame void Update() { velocityRightHand = scriptVelocity.CalculateVelocity(scriptBodySourceView.manoDer, positionsListRight); velocityLeftHand = scriptVelocity.CalculateVelocity(scriptBodySourceView.manoIzk, positionsListLeft); if (velocityRightHand.y > 20) { canStartRight = true; } if (velocityLeftHand.y > 20) { canStartLeft = true; } }
// Update is called once per frame void Update() { velocity = scriptVelocity.CalculateVelocity(gameObject.transform.position, positionsList).magnitude; print(velocity); StartCoroutine(WaitTimeRunning()); if (!running) { if (velocity > i) { Debug.Log("running"); projector.StartUp(); //running = true; //StartCoroutine(WaitTimeRunning()); } } else if (!notRunning) { if (velocity < 0) { Debug.Log("notRunning"); projector.Stopping(); //notRunning = true; //StartCoroutine(WaitTimeNotRunning()); } } }
// Update is called once per frame void Update() { velocity = scriptVelocity.CalculateVelocity(scriptBodySourceView.manoDer, positionsList); if (velocity.x > 10 && !runOnce) { scriptBallSpawnerRight.shootBall(); runOnce = true; } else if (velocity.x < -10 && !runOnce) { scriptBallSpawnerLeft.shootBall(); runOnce = true; } else if (velocity.y > 10) { scriptBallSpawnerBottom.shootBall(); } else { runOnce = false; } }
// Update is called once per frame void Update() { velocity = scriptVelocity.CalculateVelocity(scriptBodySourceView.manoDer, positionsList); if (velocity.y > 15) { canStart = false; } if (velocity.y < -7) { canStart = true; } }
// Update is called once per frame void Update() { velocity = scriptVelocity.CalculateVelocity(scriptBodySourceView.manoDer, positionsList); if (velocity.x > 10) { canStartRight = true; canStartLeft = false; } if (velocity.x < -10) { canStartLeft = true; canStartRight = false; } }
// Update is called once per frame void Update() { velocityHandRight = scriptVelocity.CalculateVelocity(scriptBodySourceView.manoDer, positionsListRight); velocityHandLeft = scriptVelocity.CalculateVelocity(scriptBodySourceView.manoIzk, positionsListLeft); if (velocityHandRight.x > 10) { GetComponent <Rigidbody>().AddRelativeForce(0, 0, 100f); } if (velocityHandRight.x < -10) { GetComponent <Rigidbody>().AddRelativeForce(0, 0, -100f); } if (velocityHandLeft.x > 10) { GetComponent <Rigidbody>().AddRelativeForce(0, 0, 100f); } if (velocityHandLeft.x < -10) { GetComponent <Rigidbody>().AddRelativeForce(0, 0, -100f); } }
// Update is called once per frame void Update() { velocity = scriptVelocity.CalculateVelocity(scriptBodySourceView.manoDer, positionsList); if (velocity.z > 8 || velocity.z < -8) { rb.AddTorque(-transform.forward * speed * 90); tunnelRb.AddRelativeTorque(0, 40, 0); } else if (velocity.z > 8 || velocity.z < -8) { tunnelRb.AddRelativeTorque(0, 100, 0); } print(arrowScript.buildingUpFactor); if (arrowScript.buildingUpFactor < 0.6) { arrowScript.buildingUpFactor = (velocity.z / 20); } else { arrowScript.buildingUpFactor = 1; } }