Guest User

Untitled

a guest
Dec 18th, 2019
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. //<----------Dash
  2. //Listen for dash call
  3. if ((Input.GetButton("DashRight") ||Input.GetButton("DashLeft")) && dashControl.canDash && !dashControl.isDashing)
  4. {
  5. //Air Dash Check //Ground dash
  6. if((!isGrounded && dashControl.hasAirDash) || isGrounded)
  7. {
  8. dashControl.isDashing = true;
  9. dashControl.canDash = false;
  10. //Need to listen to specifically which button was pressed down
  11. if (Input.GetButton("DashRight"))
  12. dashControl.dirOfDash = dashClass.dirOfDashEnum.EAST;
  13. if (Input.GetButton("DashLeft"))
  14. dashControl.dirOfDash = dashClass.dirOfDashEnum.WEST;
  15. StartCoroutine(dash());
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment