void CheckForInputs() { Movement.CheckInput(); Jump.CheckInput(); Action_1.CheckInput(); Action_2.CheckInput(); Action_3.CheckInput(); }
public void CheckInput() { inputVector.x = Horizontal.CheckInput(); inputVector.y = Vertical.CheckInput(); if (normalize && inputVector.magnitude > 1f) { inputVector.Normalize(); } if (inputVector.magnitude > 0f) { sendUpEvent = true; if (!sentDownEvent) { if (Down != null) { Down(inputVector); } sentDownEvent = true; } else { if (Hold != null) { Hold(inputVector); } } } else { if (sendUpEvent) { if (Up != null) { Up(inputVector); } sendUpEvent = false; sentDownEvent = false; } } }