public void OnPaddleUp(Vector2 inputValue) { if (inputValue.x <= screen_w / 2) { OnPaddleLeftDown?.Invoke(); } else { OnPaddleRightDown?.Invoke(); } }
private void DebugInput() { if (UnityEngine.Input.GetKeyDown(KeyCode.A)) { OnPaddleLeftDown?.Invoke(); } if (UnityEngine.Input.GetKeyUp(KeyCode.A)) { OnPaddleLeftUp?.Invoke(); } if (UnityEngine.Input.GetKeyDown(KeyCode.D)) { OnPaddleRightDown?.Invoke(); } if (UnityEngine.Input.GetKeyUp(KeyCode.D)) { OnPaddleRightUp?.Invoke(); } // if (UnityEngine.Input.GetKey(KeyCode.Space)) // { // OnNudge?.Invoke(); // } if (UnityEngine.Input.GetKeyDown(KeyCode.Space)) { StartPlunger?.Invoke(new Vector3(0, 1, 0)); } if (UnityEngine.Input.GetKeyUp(KeyCode.Space)) { ShootPlunger?.Invoke(new Vector3(0, -10000, 0)); } }