|
|
@@ -163,10 +163,22 @@ public class Trans_Assassin : MonoBehaviour
|
|
|
}
|
|
|
public void ReadyToDash(Vector2 leftDir)
|
|
|
{
|
|
|
- if(leftDir != Vector2.zero)
|
|
|
+ if(leftDir == Vector2.zero)
|
|
|
+ {
|
|
|
+ if (player.transform.localScale.x > 0)
|
|
|
+ {
|
|
|
+ targetDir = Vector3.right;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ targetDir = Vector3.left;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
targetDir = leftDir.normalized;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -229,7 +241,8 @@ public class Trans_Assassin : MonoBehaviour
|
|
|
player.bodyTrans.rotation = Quaternion.Euler(new Vector3(0, 0, k));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ print(targetDir);
|
|
|
+ print(rushSpeed);
|
|
|
player.rb.velocity = targetDir * rushSpeed;
|
|
|
}
|
|
|
}
|