void Update() { if (input.GetKey(KeyCode.Keypad1)) { if (input.IsPlaying()) { Debug.Log("Recording: 1"); } else { Debug.Log("1"); } } if (input.GetKey(KeyCode.Keypad2)) { if (input.IsPlaying()) { Debug.Log("Recording: 2"); } else { Debug.Log("2"); } } if (input.GetKey(KeyCode.Keypad3)) { if (input.IsPlaying()) { Debug.Log("Recording: 3"); } else { Debug.Log("3"); } } if (Input.GetKeyDown(KeyCode.A)) { input.StartRecording(); } if (Input.GetKeyDown(KeyCode.D)) { Record record = input.StopRecording(); if (record != null) { input.Play(record); } } }
void Update() { if (input.GetKey(KeyCode.A)) { transform.position -= transform.right * Time.deltaTime * velocity; } else if (input.GetKey(KeyCode.D)) { transform.position += transform.right * Time.deltaTime * velocity; } if (input.GetKey(KeyCode.S)) { transform.position -= transform.forward * Time.deltaTime * velocity; } else if (input.GetKey(KeyCode.W)) { transform.position += transform.forward * Time.deltaTime * velocity; } }