void FixedUpdate() { Enable.ExitGame(KeyCode.Escape); if (Input.GetKeyDown(KeyCode.UpArrow)) { secPerHour -= .5f; } else if (Input.GetKeyDown(KeyCode.DownArrow)) { secPerHour += .5f; } secPerHour = Mathf.Clamp(secPerHour, 0, 15); roadAni.transform.position += Vector3.right * .75f; roadAni.transform.position = roadAni.transform.position.x > 40f ? new Vector3(-20, roadAni.transform.position.y, roadAni.transform.position.z) : roadAni.transform.position; }
// Update is called once per frame void Update() { Enable.ExitGame(KeyCode.Escape); // if (Input.GetKeyDown(KeyCode.Space)) { Automate(); } // if (Input.GetKeyDown(KeyCode.LeftControl)) { Application.LoadLevel(Application.loadedLevel); } if (cruching || Input.GetKeyDown(KeyCode.Backspace)) { Next(); } }