IEnumerator MoveCoroutine() { m_bMove = true; m_controlManager.ImpenetrableOn(); m_animFuntion.SetBool(m_animFuntion.hashBMove, true); while (true) { if (this.transform.localScale.x < 0) { m_characterMove.MoveLeft(m_playerInfo.fMoveSpeed); } else { m_characterMove.MoveRight(m_playerInfo.fMoveSpeed); } yield return(null); if (!m_bMove) { m_controlManager.ImpenetrableOff(); m_animFuntion.SetBool(m_animFuntion.hashBMove, false); m_characterMove.MoveStop(); yield break; } } }
private void AddMeve(float _speed) { if (Input.GetAxisRaw("Horizontal") < 0 || m_playerInput.joystickState == PlayerInput.JOYSTICK_STATE.JOYSTICK_LEFT) { m_characterMove.MoveLeft(_speed); } else if (Input.GetAxisRaw("Horizontal") > 0 || m_playerInput.joystickState == PlayerInput.JOYSTICK_STATE.JOYSTICK_RIGHT) { m_characterMove.MoveRight(_speed); } }
public void Move(float _speed) { if (m_playerTransform.position.x - m_monsterTransform.position.x > 0) { m_characterMove.MoveRight(_speed); } else { m_characterMove.MoveLeft(_speed); } }
private void Move() { if (Input.GetAxisRaw("Horizontal") < 0) { m_animFuntion.SetBool(m_animFuntion.hashBMove, true); m_characterMove.MoveLeft(m_playerInfo.fMoveSpeed); m_underUI.transform.localScale = new Vector3(-1, 1, 1); } else if (Input.GetAxisRaw("Horizontal") > 0) { m_animFuntion.SetBool(m_animFuntion.hashBMove, true); m_characterMove.MoveRight(m_playerInfo.fMoveSpeed); m_underUI.transform.localScale = new Vector3(1, 1, 1); } else if (m_animFuntion.GetBool(m_animFuntion.hashBMove)) { m_animFuntion.SetBool(m_animFuntion.hashBMove, false); m_characterMove.MoveStop(); } }
private void ButtonOnClick(EInputState inputValue) { switch (inputValue) { case EInputState.Left: _playerMoves.MoveLeft(); break; case EInputState.Right: _playerMoves.MoveRight(); break; case EInputState.Down: _playerMoves.ThrowBox(); break; } }