Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //<----------Dash
- //Listen for dash call
- if ((Input.GetButton("DashRight") ||Input.GetButton("DashLeft")) && dashControl.canDash && !dashControl.isDashing)
- {
- //Air Dash Check //Ground dash
- if((!isGrounded && dashControl.hasAirDash) || isGrounded)
- {
- dashControl.isDashing = true;
- dashControl.canDash = false;
- //Need to listen to specifically which button was pressed down
- if (Input.GetButton("DashRight"))
- dashControl.dirOfDash = dashClass.dirOfDashEnum.EAST;
- if (Input.GetButton("DashLeft"))
- dashControl.dirOfDash = dashClass.dirOfDashEnum.WEST;
- StartCoroutine(dash());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment