|
|
|
|
|
|
public Animator playerAnimator; |
|
|
|
|
|
|
|
[Header("Input")] |
|
|
|
public bool useOldInputManager = false; |
|
|
|
public PlayerInput playerInput; |
|
|
|
private string actionMapGameplay = "Player Controls"; |
|
|
|
private string actionMapMenu = "Menu Controls"; |
|
|
|
|
|
|
void CalculateMovementInput() |
|
|
|
{ |
|
|
|
|
|
|
|
if(useOldInputManager) |
|
|
|
{ |
|
|
|
var v = Input.GetAxisRaw("Vertical"); |
|
|
|
var h = Input.GetAxisRaw("Horizontal"); |
|
|
|
inputDirection = new Vector3(h, 0, v); |
|
|
|
} |
|
|
|
var v = Input.GetAxisRaw("Vertical"); |
|
|
|
var h = Input.GetAxisRaw("Horizontal"); |
|
|
|
inputDirection = new Vector3(h, 0, v); |
|
|
|
|
|
|
|
|
|
|
|
if(inputDirection == Vector3.zero) |
|
|
|
{ |
|
|
|
currentInput = false; |
|
|
|
|
|
|
void CalculateAttackInput() |
|
|
|
{ |
|
|
|
|
|
|
|
if(Input.GetKeyDown(KeyCode.E)) |
|
|
|
if(useOldInputManager) |
|
|
|
playerAnimator.SetTrigger("Attack"); |
|
|
|
if(Input.GetKeyDown(KeyCode.E)) |
|
|
|
{ |
|
|
|
playerAnimator.SetTrigger("Attack"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|