more
This commit is contained in:
@@ -5,6 +5,7 @@ using UnityEngine.InputSystem;
|
||||
|
||||
public class PlayerBehavior : MonoBehaviour
|
||||
{
|
||||
public PlayerData Data;
|
||||
|
||||
[Header("Physics:")]
|
||||
private float _hInput;
|
||||
@@ -105,7 +106,17 @@ public class PlayerBehavior : MonoBehaviour
|
||||
}
|
||||
if (!playerController.IsGrounded() && (currentDashTime < maxDashTime))
|
||||
{
|
||||
Vector3 dashSpeed = new Vector3(1f,1f,1f) * dashMult;
|
||||
//float speed = dashMult * Data.runMaxSpeed;
|
||||
|
||||
Vector2 dashSpeed;
|
||||
if(forward == 1)
|
||||
{
|
||||
dashSpeed = new Vector2(1,-1) * dashMult;
|
||||
}
|
||||
else
|
||||
{
|
||||
dashSpeed = new Vector2(-1,-1) * dashMult;
|
||||
}
|
||||
|
||||
_rb.AddForce(dashSpeed, ForceMode2D.Force);
|
||||
currentDashTime += dashStopSpeed;
|
||||
|
||||
Reference in New Issue
Block a user