void Update() { orbitCamera.target = inputObject.transform; _inputObject = inputObject.GetComponent <IValueManager>(); _inputObject.SetAxis("Horizontal", Input.GetAxis("Horizontal")); _inputObject.SetAxis("Vertical", Input.GetAxis("Vertical")); }
void Update() { Vector3 projectedPoint = viewingCamera.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, viewingCamera.transform.position.y)); valueManager.SetAxis("Horizontal", projectedPoint.x); valueManager.SetAxis("Vertical", projectedPoint.z); valueManager.SetToggle("Grab", Input.GetMouseButton(0)); prevMousePos = Input.mousePosition; }
// Update is called once per frame void Update() { float x = player.GetAxis("Horizontal"); float y = player.GetAxis("Vertical"); controlValues.SetAxis("horizontal", x); controlValues.SetAxis("vertical", y); controlValues.SetToggle("crossBtn", player.GetButton("Jog")); controlValues.SetToggle("triangleBtn", player.GetButton("EnterExitVehicle")); controlValues.SetToggle("circleBtn", player.GetButton("Roll")); controlValues.SetToggle("squareBtn", player.GetButton("Attack")); controlValues.SetToggle("r1Btn", player.GetButton("Sheath")); controlValues.SetToggle("l2Btn", player.GetButton("Block")); controlValues.SetToggle("r2Btn", player.GetButton("Strafe")); controlValues.SetToggle("down", player.GetButton("ToggleAstral")); }