// Update is called once per frame void Update() { if (characterMove) { characterMove.Animate(Input.GetAxis("Vertical"), Input.GetAxis("Horizontal")); if (Input.GetButtonDown("Jump")) { //characterMove.Jump(); } if (Input.GetButtonDown("Attack1")) { attackManager.Attack1(); } if (Input.GetButtonDown("Attack2")) { attackManager.Attack2(); } if (Input.GetButtonDown("Attack3")) { attackManager.Attack3(); } } if (mainCam) { if (other.requireInputForTurn) { if (Input.GetAxis(input.horizontalAxis) != 0 || Input.GetAxis(input.verticalAxis) != 0) { CharacterLook(); } } } }
// Update is called once per frame void Update() { if (characterMove) { characterMove.Animate(Input.GetAxis("Vertical"), Input.GetAxis("Horizontal")); if (Input.GetButtonDown("Jump")) { characterMove.Jump(); } } if (mainCam) { if (other.requireInputForTurn) { if (Input.GetAxis(input.horizontalAxis) != 0 || Input.GetAxis(input.verticalAxis) != 0) { CharacterLook(); } else { CharacterLook(); } } } }
//Handles character logic void CharacterLogic() { if (!characterMove) { return; } characterMove.Animate(Input.GetAxis(input.verticalAxis), Input.GetAxis(input.horizontalAxis)); if (Input.GetButtonDown(input.jumpButton)) { characterMove.Jump(); } }