android build
This commit is contained in:
@@ -88,15 +88,20 @@ public class Player : Character
|
||||
_isHoldingHammer = true;
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Space) && !_isFalling)
|
||||
if (FireButtonPressed() && !_isFalling)
|
||||
{
|
||||
if (_hammer == null)
|
||||
{
|
||||
_animator.SetTrigger("Body_ThrowHammer");
|
||||
}
|
||||
}
|
||||
var move=_inputActions.Player.Movement.ReadValue<Vector2>();
|
||||
base.MoveTo(move.x, isAllowVertical? move.y:0);
|
||||
var move = _inputActions.Player.Movement.ReadValue<Vector2>();
|
||||
base.MoveTo(move.x, isAllowVertical ? move.y : 0);
|
||||
}
|
||||
|
||||
private bool FireButtonPressed()
|
||||
{
|
||||
return _inputActions.Player.Fire.triggered && _inputActions.Player.Fire.ReadValue<float>() > 0;
|
||||
}
|
||||
|
||||
public void ThrowHammerObject()
|
||||
|
||||
Reference in New Issue
Block a user