void Update() { direction = new Vector2(playerInput.Vertical, playerInput.Horizontal); MoveControl3.Move(direction, playerInput.Jumped); mouseInput.x = Mathf.Lerp(mouseInput.x, playerInput.MouseInput.x, 1f / MouseControl.Damping.x); mouseInput.y = Mathf.Lerp(mouseInput.y, playerInput.MouseInput.y, 1f / MouseControl.Damping.y); transform.Rotate(Vector3.up * mouseInput.x * MouseControl.Sensitivity.x); currCharacter.specialMovement.TakeInput(); Crosshair.LookHeight(mouseInput.y * MouseControl.Sensitivity.y); if (playerInput.Fire1) { currCharacter.pulseBlastShooter.Fire(); } if (playerInput.ActivatableItem) { CharacterInventory.switchCharacter(0); } if (playerInput.CharacterInventoryOpen) { CharacterInventory.ShowInventory(); } if (playerInput.TestButton) { CharacterInventory.switchCharacter(1); } }
private void OnEnable() { if (mc3 == null) { mc3 = GetComponent <MoveControl3>(); } ci = GetComponent <CharInfo>(); }