public void Init() { // Debug.Log("book viewer init"); _cameraZoom = gameObject.GetComponent <CameraZoom>(); _cameraZoom.Init(); _translateAgent = gameObject.GetComponent <TranslateAgent>(); _translateAgent.Init(); _defaultInput = new InputObject(); _defaultInput.horizontal = 0; _defaultInput.vertical = 0; _defaultInput.depth = 0; _input = _defaultInput; }
private void FixedUpdate() { if (!isActivated) { return; } if (_input.isCancelDown) { // Debug.Log("deactivate"); _input = _defaultInput; Deactivate(); return; } if (_input.isRightDown) { NextPage(); } else if (_input.isLeftDown) { PreviousPage(); } if (_input.isZoomInDown) { ZoomIn(); } if (_input.isZoomOutDown) { ZoomOut(); } Move(_input.horizontal, _input.vertical); _input = _defaultInput; }
public void SetInput(InputObject input) { _input = input; }