public void ReadInput() { if (!HasInputModel) { return; } InputInfo.ResetChange(); input = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical")); input = input.normalized; InputInfo.IsRunning = Input.GetKey(KeyCode.LeftShift); InputInfo.MovementPosX = input.x; InputInfo.MovementPosY = input.y; if (InputChanged != null && InputInfo.IsInputChanged) { InputChanged(this.InputInfo); } }
public void Reset() { InputInfo.ResetChange(); }