private void Update() { if (Input.GetKey(KeyCode.Escape)) { MenuScript temp = new MenuScript(); temp.GoToPlay("MenuScene"); } if (Input.GetMouseButtonDown(0)) { ChangeStep(); } else { Vector3 retVector = Vector3.zero; float theta = Time.realtimeSinceStartup * Speed; for (int i = 0; i < CurrentStep; i++) { funcs[i](ref retVector, theta); } Trans.position = retVector; } }